@@ -25,21 +25,27 @@ jobs:
2525 rustup default 1.92.0
2626 rustup target add x86_64-pc-windows-gnu
2727
28+ - name : Download rcedit
29+ run : |
30+ curl -L https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe -o rcedit-x64.exe
31+
2832 - name : Compile Krokiet Release
2933 if : ${{ github.ref == 'refs/heads/master' }}
3034 run : |
3135 sed -i 's/#lto = /lto = /g' Cargo.toml
3236 sed -i 's/#codegen-units /codegen-units /g' Cargo.toml
33- cargo build --release --target x86_64-pc-windows-gnu --bin krokiet --features "add_windows_icon"
37+ cargo build --release --target x86_64-pc-windows-gnu --bin krokiet
3438 mv target/x86_64-pc-windows-gnu/release/krokiet.exe windows_krokiet_on_linux.exe
39+ wine rcedit-x64.exe windows_krokiet_on_linux.exe --set-icon krokiet/icons/krokiet_logo_flag.ico
3540
3641 - name : Compile Krokiet Debug
3742 if : ${{ github.ref != 'refs/heads/master' }}
3843 run : |
3944 sed -i 's/^\(\[profile\.dev\.package.*\)/#\1/' Cargo.toml
4045 sed -i 's|^opt-level = 3 # OPT PACKAGES|#opt-level = 3 # OPT PACKAGES|' Cargo.toml
41- cargo build --target x86_64-pc-windows-gnu --bin krokiet --features "add_windows_icon"
46+ cargo build --target x86_64-pc-windows-gnu --bin krokiet
4247 mv target/x86_64-pc-windows-gnu/debug/krokiet.exe windows_krokiet_on_linux.exe
48+ wine rcedit-x64.exe windows_krokiet_on_linux.exe --set-icon krokiet/icons/krokiet_logo_flag.ico
4349
4450 - name : Pack with 7z
4551 run : |
@@ -74,37 +80,39 @@ jobs:
7480 run : |
7581 rustup default 1.92.0
7682
83+ - name : Download rcedit
84+ run : |
85+ curl -L https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe -o rcedit-x64.exe
86+
7787 - name : Compile Krokiet Release
7888 if : ${{ github.ref == 'refs/heads/master' }}
7989 run : |
80- # Replace '#lto = ' with 'lto = ' in Cargo.toml
8190 powershell -Command "(Get-Content Cargo.toml) -replace '#lto = ', 'lto = ' | Set-Content Cargo.toml"
82- # Replace '#codegen-units ' with 'codegen-units ' in Cargo.toml
8391 powershell -Command "(Get-Content Cargo.toml) -replace '#codegen-units ', 'codegen-units ' | Set-Content Cargo.toml"
84- cargo build --release --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software,add_windows_icon "
92+ cargo build --release --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
8593 mv target/release/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
86- cargo build --release --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software,add_windows_icon "
94+ cargo build --release --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
8795 mv target/release/krokiet.exe windows_krokiet_on_windows_skia_vulkan.exe
88- cargo build --release --bin krokiet --no-default-features --features "femtovg_wgpu,add_windows_icon "
96+ cargo build --release --bin krokiet --no-default-features --features "femtovg_wgpu"
8997 mv target/release/krokiet.exe windows_krokiet_on_windows_femtovg_wgpu.exe
90- cargo build --release --bin krokiet --no-default-features --features "winit_femtovg,winit_skia_opengl,winit_skia_vulkan,winit_software,femtovg_wgpu,add_windows_icon "
98+ cargo build --release --bin krokiet --no-default-features --features "winit_femtovg,winit_skia_opengl,winit_skia_vulkan,winit_software,femtovg_wgpu"
9199 mv target/release/krokiet.exe windows_krokiet_on_windows_all_backends.exe
100+ Get-ChildItem windows_krokiet_on_windows_*.exe | ForEach-Object { ./rcedit-x64.exe $_.Name --set-icon krokiet/icons/krokiet_logo_flag.ico }
92101
93102 - name : Compile Krokiet Debug
94103 if : ${{ github.ref != 'refs/heads/master' }}
95104 run : |
96- # Comment out '[profile.dev.package.*' lines
97105 powershell -Command "(Get-Content Cargo.toml) -replace '^\[profile\.dev\.package.*', { '#' + \$_ } | Set-Content Cargo.toml"
98- # Comment out 'opt-level = 3 # OPT PACKAGES'
99106 powershell -Command "(Get-Content Cargo.toml) -replace '^opt-level = 3 # OPT PACKAGES', '#opt-level = 3 # OPT PACKAGES' | Set-Content Cargo.toml"
100- cargo build --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software,add_windows_icon "
107+ cargo build --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
101108 mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
102- cargo build --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software,add_windows_icon "
109+ cargo build --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
103110 mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_vulkan.exe
104- cargo build --bin krokiet --no-default-features --features "femtovg_wgpu,add_windows_icon "
111+ cargo build --bin krokiet --no-default-features --features "femtovg_wgpu"
105112 mv target/debug/krokiet.exe windows_krokiet_on_windows_femtovg_wgpu.exe
106- cargo build --bin krokiet --no-default-features --features "winit_femtovg,winit_skia_opengl,winit_skia_vulkan,winit_software,femtovg_wgpu,add_windows_icon "
113+ cargo build --bin krokiet --no-default-features --features "winit_femtovg,winit_skia_opengl,winit_skia_vulkan,winit_software,femtovg_wgpu"
107114 mv target/debug/krokiet.exe windows_krokiet_on_windows_all_backends.exe
115+ Get-ChildItem windows_krokiet_on_windows_*.exe | ForEach-Object { ./rcedit-x64.exe $_.Name --set-icon krokiet/icons/krokiet_logo_flag.ico }
108116
109117 - name : Upload artifacts
110118 uses : actions/upload-artifact@v4
@@ -145,25 +153,27 @@ jobs:
145153 rustup target add x86_64-pc-windows-gnu
146154
147155 mkdir -p package
148- mkdir -p package_with_icon_tmp
156+ curl -L https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe -o rcedit-x64.exe
149157
150158 - name : Cross compile for Windows - Release
151159 if : ${{ github.ref == 'refs/heads/master' }}
152160 run : |
153161 source "$HOME/.cargo/env"
154162 export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig:$MINGW_PREFIX/lib/pkgconfig/:/usr/x86_64-w64-mingw32/lib/pkgconfig/
155- cargo build --target=x86_64-pc-windows-gnu --release --locked --features "add_windows_icon"
163+ cargo build --target=x86_64-pc-windows-gnu --release --locked
156164 cp target/x86_64-pc-windows-gnu/release/czkawka_gui.exe package/
157165 cp target/x86_64-pc-windows-gnu/release/czkawka_cli.exe package/
166+ wine rcedit-x64.exe package/czkawka_gui.exe --set-icon czkawka_gui/icons/icon.ico
158167
159168 - name : Cross compile for Windows - Debug
160169 if : ${{ github.ref != 'refs/heads/master' }}
161170 run : |
162171 source "$HOME/.cargo/env"
163172 export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig:$MINGW_PREFIX/lib/pkgconfig/:/usr/x86_64-w64-mingw32/lib/pkgconfig/
164- cargo build --target=x86_64-pc-windows-gnu --locked --profile fastci --features "add_windows_icon"
173+ cargo build --target=x86_64-pc-windows-gnu --locked --profile fastci
165174 cp target/x86_64-pc-windows-gnu/fastci/czkawka_gui.exe package/
166175 cp target/x86_64-pc-windows-gnu/fastci/czkawka_cli.exe package/
176+ wine rcedit-x64.exe package/czkawka_gui.exe --set-icon czkawka_gui/icons/icon.ico
167177
168178 - name : Package
169179 run : |
0 commit comments