Skip to content

Commit

Permalink
Build now extracts App Details from AHK script
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsmith1968 committed Dec 7, 2019
1 parent c4f8c8e commit 9b1fb22
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions _Build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,36 @@ SETLOCAL EnableDelayedExpansion
PUSHD "%~dp0"

SET APPNAME=WindowExtensions
SET APPDESCRIPTION=Window Extensions Menu and HotKeys
SET APPFILENAME=%APPNAME%.ahk
SET APPVERSION=1.4.1.0
SET EXEFILENAME=%APPNAME%.exe
SET ICONFILENAME=Icons\windows.ico

CALL :ExtractVariable AppDescription "%APPFILENAME%"
CALL :ExtractVariable AppVersion "%APPFILENAME%"

REM GREP -i "^AppVersion" "%APPFILENAME%" | SED -e "s/:=/=/g" -e "s/ //g" -e "s/[a-z]/\U&/g" -e "s/^/@SET /g" -e "s/\""//g" > Version.cmd
REM CALL Version.cmd

SET ZIPFILENAME=%APPNAME%.%APPVERSION%.zip

CALL BuildAHK.cmd -b "%~n0" -a "%APPNAME%" -d "%APPDESCRIPTION%" -f "%APPFILENAME%" -e "%EXEFILENAME%" -i "%ICONFILENAME%" -v "%APPVERSION%" %1
CALL BuildAHK.cmd -b "%~n0" -a "%APPNAME%" -d "%APPDESCRIPTION%" -f "%APPFILENAME%" -e "%EXEFILENAME%" -i "%ICONFILENAME%" -v "%APPVERSION%" %1 -w 0

IF EXIST "%ZIPFILENAME%" DEL /Q "%ZIPFILENAME%"

ZIP "%ZIPFILENAME%" "%APPNAME%.exe" "%APPNAME%.icl"
ECHO.Building: %ZIPFILENAME%...
ZIP -v "%ZIPFILENAME%" "%APPNAME%.exe" "%APPNAME%.icl"

POPD

GOTO :EOF

:ExtractVariable
IF "%~1" == "" GOTO :EOF
IF "%~2" == "" GOTO :EOF

CALL BUILDUNIQUETEMPFILENAME.CMD "%~n0"

GREP -i "^%~1" "%~2" | SED -e "s/:=/=/g" -e "s/ //g" -e "s/[a-z]/\U&/g" -e "s/^/@SET /g" -e "s/\""//g" > "%UNIQUETEMPFILENAME%.cmd"
CALL "%UNIQUETEMPFILENAME%.cmd"

GOTO :EOF

0 comments on commit 9b1fb22

Please sign in to comment.