-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Compile_EPKL.bat
64 lines (57 loc) · 2.18 KB
/
Compile_EPKL.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@echo off
rem Copyright by krzysiu.net, 2017
rem Licensed as MIT (full text: https://opensource.org/licenses/MIT)
rem Modified for EPKL compilation by DreymaR, 2019-03
SETLOCAL
echo **********************************************
echo ***** EPKL COMPILER, using AHK2EXE *****
echo **********************************************
echo.
REM *** SET YOUR PATH TO THE AHK COMPILER HERE
set src=Source\
set ahk=AHK-Compiler_v1-1
cd /d "%src%"
echo * Working from %src%
REM *** SHUT DOWN ANY RUNNING EPKL.exe AND SUBPROCESSES TO ALLOW OVERWRITING IT
echo * Stopping any running EPKL processes...
taskkill /F /IM EPKL.exe /T
echo.
REM *** COMPILE FOR UNICODE32
rem echo Please choose binary base:
rem echo 1) Unicode 64 bit
rem echo 2) Unicode 32 bit (default in 3 seconds)
rem echo 3) ANSI 32 bit
rem echo.
rem set binImg1=Unicode 64-bit
rem set binImg2=Unicode 32-bit
rem set binImg3=ANSI 32-bit
rem choice /c 123 /t 2 /d 3 /m "Your choice:"
rem if "%ERRORLEVEL%" == "1" set binImg=%binImg1%
rem if "%ERRORLEVEL%" == "2" set binImg=%binImg2%
rem if "%ERRORLEVEL%" == "3" set binImg=%binImg3%
set binImg=Unicode 32-bit
echo * Compiling as %binImg%
rem echo.
set binImg="%ahk%\%binImg%.bin"
REM *** USE MPRESS COMPRESSION IF AVAILABLE (MAY NOT MATTER?)
rem choice /c yn /t 2 /d y /m "Do you want to compress file using MPRESS? Default in 2 sec.: yes."
rem if "%ERRORLEVEL%" == "1" set doComp=1
rem if "%ERRORLEVEL%" == "2" set doComp=0
echo * Compiling using MPRESS compression
rem echo.
set doComp=1
REM *** %~dpn1 IS THE DRIVE-PATH-NAME OF DROPPED SCRIPT DIR
rem if exist "%~dpn1.ico" set iconPath=/icon "%~dpn1.ico"
set iconPath="EPKL_Resources\Main.ico"
REM *** THE ORIGINAL SCRIPT WAS DRAG-N-DROP
echo Compiling with %ahk%...
rem ahk2exe /in %1 /out "%~dpn1.exe" %iconParam% /bin "%binImg%.bin" /mpress %doComp%endlocal
rem /ahk /bin /mpress are deprecated, but since when? Probably AHK v1.1.33 so we need to get there first.
rem See https://www.autohotkey.com/docs/Scripts.htm#ahk2exe for more info
%ahk%\ahk2exe /in "EPKL.ahk" /out "..\EPKL.exe" /icon %iconPath% /bin %binImg% /mpress %doComp%
echo.
echo * Done compiling!
echo Press any key to run EPKL or Ctrl+C to quit...
pause >nul
start %~dp0"EPKL.exe"
ENDLOCAL