Skip to content

Commit e27d545

Browse files
committed
TST
1 parent 84969f7 commit e27d545

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/windows.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
sed -i 's/#codegen-units /codegen-units /g' Cargo.toml
3737
cargo build --release --target x86_64-pc-windows-gnu --bin krokiet
3838
mv target/x86_64-pc-windows-gnu/release/krokiet.exe windows_krokiet_on_linux.exe
39+
40+
export WINEPREFIX=$(mktemp -d)
3941
wine rcedit-x64.exe windows_krokiet_on_linux.exe --set-icon krokiet/icons/krokiet_logo_flag.ico
4042
4143
- name: Compile Krokiet Debug
@@ -45,6 +47,8 @@ jobs:
4547
sed -i 's|^opt-level = 3 # OPT PACKAGES|#opt-level = 3 # OPT PACKAGES|' Cargo.toml
4648
cargo build --target x86_64-pc-windows-gnu --bin krokiet
4749
mv target/x86_64-pc-windows-gnu/debug/krokiet.exe windows_krokiet_on_linux.exe
50+
51+
export WINEPREFIX=$(mktemp -d)
4852
wine rcedit-x64.exe windows_krokiet_on_linux.exe --set-icon krokiet/icons/krokiet_logo_flag.ico
4953
5054
- name: Pack with 7z
@@ -87,8 +91,7 @@ jobs:
8791
- name: Compile Krokiet Release
8892
if: ${{ github.ref == 'refs/heads/master' }}
8993
run: |
90-
powershell -Command "(Get-Content Cargo.toml) -replace '#lto = ', 'lto = ' | Set-Content Cargo.toml"
91-
powershell -Command "(Get-Content Cargo.toml) -replace '#codegen-units ', 'codegen-units ' | Set-Content Cargo.toml"
94+
powershell -Command "(Get-Content Cargo.toml) -replace '#lto = ', 'lto = ' | Set-Content Cargo.toml; (Get-Content Cargo.toml) -replace '#codegen-units ', 'codegen-units ' | Set-Content Cargo.toml"
9295
cargo build --release --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
9396
mv target/release/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
9497
cargo build --release --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
@@ -102,8 +105,8 @@ jobs:
102105
- name: Compile Krokiet Debug
103106
if: ${{ github.ref != 'refs/heads/master' }}
104107
run: |
105-
powershell -Command "(Get-Content Cargo.toml) -replace '^\[profile\.dev\.package.*', { '#' + \$_ } | Set-Content Cargo.toml"
106-
powershell -Command "(Get-Content Cargo.toml) -replace '^opt-level = 3 # OPT PACKAGES', '#opt-level = 3 # OPT PACKAGES' | Set-Content Cargo.toml"
108+
(Get-Content Cargo.toml) -replace '#lto = ','lto = ' -replace '#codegen-units ','codegen-units ' -replace '^\[profile\.dev\.package','#\[profile.dev.package' -replace '^opt-level = 3 # OPT PACKAGES','#opt-level = 3 # OPT PACKAGES' | Set-Content Cargo.toml
109+
107110
cargo build --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
108111
mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
109112
cargo build --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
@@ -112,6 +115,7 @@ jobs:
112115
mv target/debug/krokiet.exe windows_krokiet_on_windows_femtovg_wgpu.exe
113116
cargo build --bin krokiet --no-default-features --features "winit_femtovg,winit_skia_opengl,winit_skia_vulkan,winit_software,femtovg_wgpu"
114117
mv target/debug/krokiet.exe windows_krokiet_on_windows_all_backends.exe
118+
115119
Get-ChildItem windows_krokiet_on_windows_*.exe | ForEach-Object { ./rcedit-x64.exe $_.Name --set-icon krokiet/icons/krokiet_logo_flag.ico }
116120
117121
- name: Upload artifacts
@@ -163,6 +167,8 @@ jobs:
163167
cargo build --target=x86_64-pc-windows-gnu --release --locked
164168
cp target/x86_64-pc-windows-gnu/release/czkawka_gui.exe package/
165169
cp target/x86_64-pc-windows-gnu/release/czkawka_cli.exe package/
170+
171+
export WINEPREFIX=$(mktemp -d)
166172
wine rcedit-x64.exe package/czkawka_gui.exe --set-icon czkawka_gui/icons/icon.ico
167173
168174
- name: Cross compile for Windows - Debug
@@ -173,6 +179,8 @@ jobs:
173179
cargo build --target=x86_64-pc-windows-gnu --locked --profile fastci
174180
cp target/x86_64-pc-windows-gnu/fastci/czkawka_gui.exe package/
175181
cp target/x86_64-pc-windows-gnu/fastci/czkawka_cli.exe package/
182+
183+
export WINEPREFIX=$(mktemp -d)
176184
wine rcedit-x64.exe package/czkawka_gui.exe --set-icon czkawka_gui/icons/icon.ico
177185
178186
- name: Package

0 commit comments

Comments
 (0)