From f3e0819961c4d1895090132c90650941a2b218b2 Mon Sep 17 00:00:00 2001 From: Tlntin Date: Wed, 11 Jan 2023 22:32:48 +0800 Subject: [PATCH] add default icon for windows when icon not exsist. only usefull for mutlit compile in github action. --- script/build.bat | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/script/build.bat b/script/build.bat index 395cc01..1f18666 100644 --- a/script/build.bat +++ b/script/build.bat @@ -53,8 +53,17 @@ for /f "skip=1 tokens=1-4 delims=," %%i in (app.csv) do ( .\script\sd.exe -s !old_url! !url! src-tauri\tauri.conf.json ::replace pacakge name .\script\sd.exe !old_title! !title! src-tauri\tauri.conf.json - .\script\sd.exe !old_name! !name! src-tauri\tauri.windows.conf.json + if not exist src-tauri\png\!title!_32.ico( + set name=icon + .\script\sd.exe !old_name! icon src-tauri\tauri.windows.conf.json + ) + if not exist src-tauri\png\!title!_256.ico( + .\script\sd.exe !old_name! icon src-tauri\tauri.windows.conf.json + set name=icon + ) else ( + .\script\sd.exe !old_name! !name! src-tauri\tauri.windows.conf.json + ) echo. ::update package info set old_zh_name=!name_zh!