-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_Build.cmd
40 lines (25 loc) · 1.05 KB
/
_Build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@ECHO OFF
SETLOCAL EnableDelayedExpansion
PUSHD "%~dp0"
SET APPNAME=WindowExtensions
SET APPFILENAME=%APPNAME%.ahk
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 -w 0
IF EXIST "%ZIPFILENAME%" DEL /Q "%ZIPFILENAME%"
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