forked from smash64-dev/package-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
36 lines (29 loc) · 1.01 KB
/
build.bat
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
:: build.bat
:: compiles package-updater using ahk2exe.exe
:: you may have to whitelist with antivirus to build this
@ECHO OFF
ECHO Building package-updater...
IF EXIST "%ProgramFiles%\AutoHotkey\Compiler\Ahk2Exe.exe" (
SET "AHK=%ProgramFiles%\AutoHotkey\Compiler\Ahk2Exe.exe"
) ELSE (
IF EXIST "%ProgramFiles(x86)%\AutoHotkey\Compiler\Ahk2Exe.exe" (
SET "AHK=%ProgramFiles(x86)%\AutoHotkey\Compiler\Ahk2Exe.exe"
) ELSE (
ECHO - Unable to find Ahk2Exe.exe, please install AutoHotkey first (https://www.autohotkey.com/)
EXIT 1
)
)
if EXIST "build" (
ECHO - Cleaning build environment...
RMDIR /S /Q "build" >nul
)
MKDIR "build"
ECHO - Building to 'build' directory...
"%AHK%" /in "src\updater.ahk" /out "build\package-updater.exe" /icon "res\icon.ico" /cp 65001
ECHO - Creating config file...
COPY "src\updater.cfg" "build\updater.cfg" >nul
COPY "src\user.cfg" "build\user.cfg" >nul
ECHO - Copying Changelog...
COPY "CHANGELOG.md" "build\CHANGELOG.md" >nul
ECHO - Finshed
EXIT 0