3535 sed -i 's/#codegen-units /codegen-units /g' Cargo.toml
3636 cargo build --release --target x86_64-pc-windows-gnu --bin krokiet
3737 mv target/x86_64-pc-windows-gnu/release/krokiet.exe windows_krokiet_on_linux.exe
38- add_icon_exe windows_krokiet_on_linux.exe krokiet/icons/krokiet_logo_flag.ico
3938
4039 - name : Compile Krokiet Debug
4140 if : ${{ github.ref != 'refs/heads/master' }}
4443 sed -i 's|^opt-level = 3 # OPT PACKAGES|#opt-level = 3 # OPT PACKAGES|' Cargo.toml
4544 cargo build --target x86_64-pc-windows-gnu --bin krokiet
4645 mv target/x86_64-pc-windows-gnu/debug/krokiet.exe windows_krokiet_on_linux.exe
47- add_icon_exe windows_krokiet_on_linux.exe krokiet/icons/krokiet_logo_flag.ico
46+
47+ - name : Add icon
48+ run : |
49+ wget -q -O ./rcedit-x64.exe "https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe"
50+ wine ./rcedit-x64.exe windows_krokiet_on_linux.exe --set-icon "krokiet/icons/krokiet_logo_flag.ico"
4851
4952 - name : Pack with 7z
5053 run : |
9295 powershell -Command "(Get-Content Cargo.toml) -replace '#codegen-units ', 'codegen-units ' | Set-Content Cargo.toml"
9396 cargo build --release --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
9497 mv target/release/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
95- add_icon_exe windows_krokiet_on_windows_skia_opengl.exe krokiet/icons/krokiet_logo_flag.ico
9698 cargo build --release --bin krokiet --no-default-features --features "winit_skia_vulkan,winit_software"
9799 mv target/release/krokiet.exe windows_krokiet_on_windows_skia_vulkan.exe
98- add_icon_exe windows_krokiet_on_windows_skia_vulkan.exe krokiet/icons/krokiet_logo_flag.ico
99100
100101 - name : Compile Krokiet Debug
101102 if : ${{ github.ref != 'refs/heads/master' }}
@@ -106,7 +107,15 @@ jobs:
106107 powershell -Command "(Get-Content Cargo.toml) -replace '^opt-level = 3 # OPT PACKAGES', '#opt-level = 3 # OPT PACKAGES' | Set-Content Cargo.toml"
107108 cargo build --bin krokiet --no-default-features --features "winit_skia_opengl,winit_software"
108109 mv target/debug/krokiet.exe windows_krokiet_on_windows_skia_opengl.exe
109- add_icon_exe windows_krokiet_on_windows_skia_opengl.exe krokiet/icons/krokiet_logo_flag.ico
110+
111+ - name : Add icon
112+ run : |
113+ Invoke-WebRequest -Uri "https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe" -OutFile ".\\rcedit-x64.exe"
114+ $rcedit = ".\\rcedit-x64.exe"
115+ if (-not (Test-Path $rcedit)) { Write-Error "rcedit not found"; exit 1 }
116+ foreach ($f in @("windows_krokiet_on_windows_skia_opengl.exe","windows_krokiet_on_windows_skia_vulkan.exe")) {
117+ if (Test-Path $f) { & $rcedit $f --set-icon "krokiet/icons/krokiet_logo_flag.ico" } else { Write-Host "$f not found" }
118+ }
110119
111120 - name : Upload artifacts
112121 uses : actions/upload-artifact@v4
@@ -156,10 +165,6 @@ jobs:
156165 cargo build --target=x86_64-pc-windows-gnu --release --locked
157166 cp target/x86_64-pc-windows-gnu/release/czkawka_gui.exe package/
158167 cp target/x86_64-pc-windows-gnu/release/czkawka_cli.exe package/
159-
160- add_icon_exe package/czkawka_gui.exe czkawka_gui/icons/icon_about.png
161- add_icon_exe package/czkawka_cli.exe czkawka_gui/icons/icon_about.png
162-
163168
164169 - name : Cross compile for Windows - Debug
165170 if : ${{ github.ref != 'refs/heads/master' }}
@@ -169,9 +174,17 @@ jobs:
169174 cargo build --target=x86_64-pc-windows-gnu --locked --profile fastci
170175 cp target/x86_64-pc-windows-gnu/fastci/czkawka_gui.exe package/
171176 cp target/x86_64-pc-windows-gnu/fastci/czkawka_cli.exe package/
172-
173- add_icon_exe package/czkawka_gui.exe czkawka_gui/icons/icon_about.png
174- add_icon_exe package/czkawka_cli.exe czkawka_gui/icons/icon_about.png
177+
178+ - name : Add icon
179+ run : |
180+ wget -q -O ./rcedit-x64.exe "https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe"
181+ for f in package/czkawka_gui.exe package/czkawka_cli.exe; do
182+ if [ -f "$f" ]; then
183+ wine ./rcedit-x64.exe "$f" --set-icon "czkawka_gui/icons/icon_about.png"
184+ else
185+ echo "$f not found, skipping"
186+ fi
187+ done
175188
176189 - name : Package
177190 run : |
0 commit comments