From 4c500ed13aacf8b751a8f07e08772fbae90f3c02 Mon Sep 17 00:00:00 2001 From: xianii Date: Thu, 7 Sep 2023 18:47:20 +0800 Subject: [PATCH] Fixed property set in version information --- .gitignore | 1 + app.ahk | 5 +---- distribution.ahk | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bebcb17..0b2bbaf 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ $RECYCLE.BIN/ dist/ *.ini +compile_prop.ahk diff --git a/app.ahk b/app.ahk index 3af272f..ec7f539 100644 --- a/app.ahk +++ b/app.ahk @@ -2,10 +2,7 @@ SetWorkingDir(A_ScriptDir) #SingleInstance force #include meta.ahk -;@Ahk2Exe-SetName %appName% -;@Ahk2Exe-SetVersion %version% -;@Ahk2Exe-SetMainIcon icon.ico -;@Ahk2Exe-ExeName %appName% +#include *i compile_prop.ahk #include prod.ahk diff --git a/distribution.ahk b/distribution.ahk index 27f49d6..e576953 100644 --- a/distribution.ahk +++ b/distribution.ahk @@ -3,6 +3,21 @@ SetWorkingDir(A_ScriptDir) #include meta.ahk +try +{ + props := FileOpen("compile_prop.ahk", "w") + props.WriteLine(";@Ahk2Exe-SetName " appName) + props.WriteLine(";@Ahk2Exe-SetVersion " version) + props.WriteLine(";@Ahk2Exe-SetMainIcon icon.ico") + props.WriteLine(";@Ahk2Exe-ExeName " appName) + props.Close() +} +catch as e +{ + MsgBox("Writting compile props`nERROR CODE=" . e.Message) + ExitApp +} + if FileExist(binaryFilename) { FileDelete(binaryFilename)