Skip to content

Commit

Permalink
Manually ported code from the mess of git lfs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frodo45127 committed Feb 16, 2024
1 parent b0be20f commit c3d17ac
Show file tree
Hide file tree
Showing 23 changed files with 89 additions and 66 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

6 changes: 3 additions & 3 deletions .github/workflows/post_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ jobs:
if: steps.check_version_format_bash.outputs.is_beta == 0
with:
path: './rpfm_lib'
args: --no-verify
args: --no-verify --lib rpfm_lib
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- uses: katyo/publish-crates@v2
if: steps.check_version_format_bash.outputs.is_beta == 0
with:
path: './rpfm_extensions'
args: --no-verify
args: --no-verify --lib rpfm_extensions
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- uses: katyo/publish-crates@v2
if: steps.check_version_format_bash.outputs.is_beta == 0
with:
path: './rpfm_cli'
args: --no-verify
args: --no-verify --bin rpfm_cli
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

9 changes: 8 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ jobs:
# TODO: Build this from tag.
cp C:\QtRMV2Widget.lib C:\actions-runner\_work\rpfm\rpfm\3rdparty\builds\
cp C:\ImportExport.lib C:\actions-runner\_work\rpfm\rpfm\3rdparty\builds\
cp C:\QtRenderingWidget.lib C:\actions-runner\_work\rpfm\rpfm\3rdparty\builds\
cp C:\Rldx.lib C:\actions-runner\_work\rpfm\rpfm\3rdparty\builds\
cd C:\actions-runner\_work\rpfm\rpfm
# First build every executable one by one, so we can speed up compilation.
cargo build --release --bin rpfm_cli
cargo build --release --features "support_rigidmodel support_modern_dds enable_tools" --bin rpfm_ui
cargo build --release --features "support_rigidmodel support_model_renderer support_modern_dds enable_tools" --bin rpfm_ui
- name: Prepare Assets for Release (Linux)
id: build_linux
Expand Down Expand Up @@ -242,6 +245,10 @@ jobs:
cp C:\actions-runner\_work\rpfm\rpfm/locale/* ${{ matrix.DDISK }}:\deploy\rpfm-release-assets\locale\
cp C:\actions-runner\_work\rpfm\rpfm/rpfm_ui/ui_templates/* ${{ matrix.DDISK }}:\deploy\rpfm-release-assets\ui\
# These assets are for the model renderer.
mkdir assets
cp C:\actions-runner\_work\rpfm\rpfm/assets/* ${{ matrix.DDISK }}:\deploy\rpfm-release-assets\assets\
# Execute windeployqt to add missing translations and the vcredist if needed.
${{ matrix.DDISK }}:\Craft\craft\craftenv.ps1
cd ${{ matrix.DDISK }}:\deploy\rpfm-release-assets
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
]

[workspace.package]
version = "4.2.5"
version = "4.2.6"
authors = ["Frodo45127 <frodo_gv@hotmail.com>"]
rust-version = "1.67"
edition = "2021"
Expand Down
12 changes: 11 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ and this project doesn't adhere to [Semantic Versioning](https://semver.org/spec

If you're looking for the changes included in the latest beta (against the latest stable version), check the unreleased section.

## [4.2.6]
### Added
- Implemented "Multi-Folder FilePicker" feature.
- Implemented "Model Renderer" for RigidModels ranging from Rome 2 to Warhammer 3 (by [@mr-phazer](https://github.com/mr-phazer)).

### Fixed
- Fixed i64 columns not saving their value on focus out.
- Fixed decompression failing in vanilla files.

## [4.2.5]
### Added
- Implemented setting to allow export tsv to export with the alternative (as seen in dave) column order.
Expand Down Expand Up @@ -1288,7 +1297,8 @@ If you're looking for the changes included in the latest beta (against the lates
## [2.1.4] - 2020-08-15
- For this update and older ones, check the release page.

[Unreleased]: https://github.com/Frodo45127/rpfm/compare/v4.2.5...HEAD
[Unreleased]: https://github.com/Frodo45127/rpfm/compare/v4.2.6...HEAD
[4.2.6]: https://github.com/Frodo45127/rpfm/compare/v4.2.5...v4.2.6
[4.2.5]: https://github.com/Frodo45127/rpfm/compare/v4.2.4...v4.2.5
[4.2.4]: https://github.com/Frodo45127/rpfm/compare/v4.2.3...v4.2.4
[4.2.3]: https://github.com/Frodo45127/rpfm/compare/v4.2.2...v4.2.3
Expand Down
Binary file added assets/LandscapeCubeMapIBLDiffuse.dds
Binary file not shown.
Binary file added assets/LandscapeCubeMapIBLSpecular.dds
Binary file not shown.
Binary file added assets/PS_Attila_Weigted.cso
Binary file not shown.
Binary file added assets/PS_NoTextures.cso
Binary file not shown.
Binary file added assets/PS_Simple.cso
Binary file not shown.
Binary file added assets/PS_Three_Kingdoms.cso
Binary file not shown.
Binary file added assets/PS_Troy.cso
Binary file not shown.
Binary file added assets/SkyCubemapIBLDiffuse.dds
Binary file not shown.
Binary file added assets/SkyCubemapIBLSpecular.dds
Binary file not shown.
Binary file added assets/VS_Simple.cso
Binary file not shown.
Binary file added assets/myfile.spritefont
Binary file not shown.
4 changes: 2 additions & 2 deletions rpfm_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ rust-version.workspace = true
[dependencies]

# Internal dependencies.
rpfm_lib = { path = "../rpfm_lib", version = "4.2.5", features = ["integration_log", "integration_git"] }
rpfm_extensions = { path = "../rpfm_extensions", version = "4.2.5" }
rpfm_lib = { path = "../rpfm_lib", version = "4.2.6", features = ["integration_log", "integration_git"] }
rpfm_extensions = { path = "../rpfm_extensions", version = "4.2.6" }

# Error managing.
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion rpfm_extensions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rust-version.workspace = true
[dependencies]

# Internal dependencies.
rpfm_lib = { path = "../rpfm_lib", version = "4.2.5", features = ["integration_log", "integration_assembly_kit", "support_error_bincode"] }
rpfm_lib = { path = "../rpfm_lib", version = "4.2.6", features = ["integration_log", "integration_assembly_kit", "support_error_bincode"] }

# Basic get/set support.
getset = "^0.1"
Expand Down
4 changes: 2 additions & 2 deletions rpfm_ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ default = []
[dependencies]

# Internal dependencies.
rpfm_lib = { path = "../rpfm_lib", version = "4.2.5", features = ["integration_log", "integration_git"] }
rpfm_extensions = { path = "../rpfm_extensions", version = "4.2.5" }
rpfm_lib = { path = "../rpfm_lib", version = "4.2.6", features = ["integration_log", "integration_git"] }
rpfm_extensions = { path = "../rpfm_extensions", version = "4.2.6" }
rpfm_ui_common = { path = "../rpfm_ui_common" }

# Config dependencies.
Expand Down
100 changes: 52 additions & 48 deletions rpfm_ui/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,59 +38,63 @@ fn main() {
let assets_path = "./../assets/";
DirBuilder::new().recursive(true).create(assets_path).unwrap();

// TODO: unhardcode this path once the folder is moved to a 3rdparty subrepo.
let renderer_path = "./../../QtRenderingWidget/";
println!("cargo:rerun-if-changed={}", renderer_path);

println!("cargo:rustc-link-lib=dylib=ImportExport");
println!("cargo:rustc-link-lib=dylib=Rldx");
println!("cargo:rustc-link-lib=dylib=QtRenderingWidget");

// This compiles the model renderer and related libs.
match Command::new("msbuild")
.arg("./QtRenderingWidget_RPFM.sln")
.arg("-m") // Enable multithread build.
.arg("-t:Build")
//.arg("-t:Rebuild") // If the linker misbehaves, use this instead of Build.
.arg("-p:Configuration=Release")
.arg("-p:Platform=x64")
.current_dir(renderer_path).output() {
Ok(output) => {
stdout().write_all(&output.stdout).unwrap();
stderr().write_all(&output.stderr).unwrap();

// On ANY error, fail compilation.
if !output.stderr.is_empty() {
let error = String::from_utf8_lossy(&output.stderr);
error.lines().filter(|line| !line.is_empty()).for_each(|line| {
println!("cargo:warning={:?}", line);
});
exit(98)
// This compiles the model renderer and related libs. Only in debug mode, as on releases we may not have access to the source code,
// so we use precompiled binaries instead.
if cfg!(debug_assertions) {

// TODO: unhardcode this path once the folder is moved to a 3rdparty subrepo.
let renderer_path = "./../../QtRenderingWidget/";
println!("cargo:rerun-if-changed={}", renderer_path);

match Command::new("msbuild")
.arg("./QtRenderingWidget_RPFM.sln")
.arg("-m") // Enable multithread build.
.arg("-t:Build")
//.arg("-t:Rebuild") // If the linker misbehaves, use this instead of Build.
.arg("-p:Configuration=Release")
.arg("-p:Platform=x64")
.current_dir(renderer_path).output() {
Ok(output) => {
stdout().write_all(&output.stdout).unwrap();
stderr().write_all(&output.stderr).unwrap();

// On ANY error, fail compilation.
if !output.stderr.is_empty() {
let error = String::from_utf8_lossy(&output.stderr);
error.lines().filter(|line| !line.is_empty()).for_each(|line| {
println!("cargo:warning={:?}", line);
});
exit(98)
}

// If nothing broke, copy the files to the correct folders.
copy(renderer_path.to_owned() + "x64/Release/ImportExport.lib", "./../3rdparty/builds/ImportExport.lib").unwrap();
copy(renderer_path.to_owned() + "x64/Release/QtRenderingWidget.lib", "./../3rdparty/builds/QtRenderingWidget.lib").unwrap();
copy(renderer_path.to_owned() + "x64/Release/Rldx.lib", "./../3rdparty/builds/Rldx.lib").unwrap();

copy(renderer_path.to_owned() + "x64/Release/PS_Attila_Weigted.cso", assets_path.to_owned() + "PS_Attila_Weigted.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/PS_NoTextures.cso", assets_path.to_owned() + "PS_NoTextures.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/PS_Simple.cso", assets_path.to_owned() + "PS_Simple.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/PS_Three_Kingdoms.cso", assets_path.to_owned() + "PS_Three_Kingdoms.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/PS_Troy.cso", assets_path.to_owned() + "PS_Troy.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/VS_Simple.cso", assets_path.to_owned() + "VS_Simple.cso").unwrap();

copy(renderer_path.to_owned() + "Rldx/Rldx/RenderResources/Textures/CubeMaps/LandscapeCubeMapIBLDiffuse.dds", assets_path.to_owned() + "LandscapeCubeMapIBLDiffuse.dds").unwrap();
copy(renderer_path.to_owned() + "Rldx/Rldx/RenderResources/Textures/CubeMaps/LandscapeCubeMapIBLSpecular.dds", assets_path.to_owned() + "LandscapeCubeMapIBLSpecular.dds").unwrap();
copy(renderer_path.to_owned() + "Rldx/Rldx/RenderResources/Textures/CubeMaps/SkyCubemapIBLDiffuse.dds", assets_path.to_owned() + "SkyCubemapIBLDiffuse.dds").unwrap();
copy(renderer_path.to_owned() + "Rldx/Rldx/RenderResources/Textures/CubeMaps/SkyCubemapIBLSpecular.dds", assets_path.to_owned() + "SkyCubemapIBLSpecular.dds").unwrap();

copy(renderer_path.to_owned() + "QtRenderingWidget/myfile.spritefont", assets_path.to_owned() + "myfile.spritefont").unwrap();
}
Err(error) => {
stdout().write_all(error.to_string().as_bytes()).unwrap();
stdout().write_all(b"ERROR: You either don't have msbuild installed, it's not in the path, or there was an error while executing it. Fix that before continuing.").unwrap();
exit(99);
}

// If nothing broke, copy the files to the correct folders.
copy(renderer_path.to_owned() + "x64/Release/ImportExport.lib", "./../3rdparty/builds/ImportExport.lib").unwrap();
copy(renderer_path.to_owned() + "x64/Release/QtRenderingWidget.lib", "./../3rdparty/builds/QtRenderingWidget.lib").unwrap();
copy(renderer_path.to_owned() + "x64/Release/Rldx.lib", "./../3rdparty/builds/Rldx.lib").unwrap();

copy(renderer_path.to_owned() + "x64/Release/PS_Attila_Weigted.cso", assets_path.to_owned() + "PS_Attila_Weigted.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/PS_NoTextures.cso", assets_path.to_owned() + "PS_NoTextures.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/PS_Simple.cso", assets_path.to_owned() + "PS_Simple.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/PS_Three_Kingdoms.cso", assets_path.to_owned() + "PS_Three_Kingdoms.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/PS_Troy.cso", assets_path.to_owned() + "PS_Troy.cso").unwrap();
copy(renderer_path.to_owned() + "x64/Release/VS_Simple.cso", assets_path.to_owned() + "VS_Simple.cso").unwrap();

copy(renderer_path.to_owned() + "Rldx/Rldx/RenderResources/Textures/CubeMaps/LandscapeCubeMapIBLDiffuse.dds", assets_path.to_owned() + "LandscapeCubeMapIBLDiffuse.dds").unwrap();
copy(renderer_path.to_owned() + "Rldx/Rldx/RenderResources/Textures/CubeMaps/LandscapeCubeMapIBLSpecular.dds", assets_path.to_owned() + "LandscapeCubeMapIBLSpecular.dds").unwrap();
copy(renderer_path.to_owned() + "Rldx/Rldx/RenderResources/Textures/CubeMaps/SkyCubemapIBLDiffuse.dds", assets_path.to_owned() + "SkyCubemapIBLDiffuse.dds").unwrap();
copy(renderer_path.to_owned() + "Rldx/Rldx/RenderResources/Textures/CubeMaps/SkyCubemapIBLSpecular.dds", assets_path.to_owned() + "SkyCubemapIBLSpecular.dds").unwrap();

copy(renderer_path.to_owned() + "QtRenderingWidget/myfile.spritefont", assets_path.to_owned() + "myfile.spritefont").unwrap();
}
Err(error) => {
stdout().write_all(error.to_string().as_bytes()).unwrap();
stdout().write_all(b"ERROR: You either don't have msbuild installed, it's not in the path, or there was an error while executing it. Fix that before continuing.").unwrap();
exit(99);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions rpfm_ui/src/app_ui/slots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,7 @@ impl AppUISlots {
<li>RigidModel research by: <b>Mr.Jox</b>, <b>Der Spaten</b>, <b>Maruka</b>, <b>phazer</b> and <b>Frodo45127</b>.</li>
<li>RigidModel module until v1.6.2 by: <b>Frodo45127</b>.</li>
<li>RigidModel module since v2.4.99 by: <b>Phazer</b>.</li>
<li>Model Renderer by: <b>Phazer</b>.</li>
<li>TW: Arena research and coding: <b>Trolldemorted</b>.</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions rpfm_ui_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ rust-version.workspace = true
[dependencies]

# Internal dependencies.
rpfm_lib = { path = "../rpfm_lib", version = "4.2.5", features = ["integration_log", "integration_git"] }
rpfm_extensions = { path = "../rpfm_extensions", version = "4.2.5" }
rpfm_lib = { path = "../rpfm_lib", version = "4.2.6", features = ["integration_log", "integration_git"] }
rpfm_extensions = { path = "../rpfm_extensions", version = "4.2.6" }

# Config dependencies.
directories = "^5.0"
Expand Down

0 comments on commit c3d17ac

Please sign in to comment.