forked from Pulover/PuloversMacroCreator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Compile.ahk
57 lines (50 loc) · 1.79 KB
/
Compile.ahk
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
#NoEnv
SetWorkingDir %A_ScriptDir%
SplitPath, A_AhkPath,, AhkDir
FileCreateDir, Compiled
FileCreateDir, Documentation\MacroCreator_Help-doc\Commands
IfWinExist, ahk_exe MacroCreator.exe
{
WinClose
WinWaitClose
}
FileDelete, Documentation\MacroCreator_Help-doc\*.html
FileDelete, Documentation\MacroCreator_Help-doc\Commands\*.html
FileCopy, Documentation\License.html, Documentation\MacroCreator_Help-doc, 1
RunWait, Documentation\GenDocs-mod.ahk,, UseErrorLevel
If ErrorLevel
ExitApp
RunWait, BuildFiles.ahk,, UseErrorLevel
If ErrorLevel
ExitApp
RunWait, Documentation\MacroCreator_Help-doc\CompileCHM.ahk,, UseErrorLevel
If ErrorLevel
ExitApp
FileCopy, Documentation\MacroCreator_Help-doc\MacroCreator_Help.chm, Compiled\MacroCreator_Help.chm, 1
FileDelete, Compiled\Resources.dll
FileDelete, Compiled\SciLexer-x64.dll
FileDelete, Compiled\SciLexer-x86.dll
FileCopy, Resources.dll, Compiled\Resources.dll, 1
FileCopy, SciLexer-x64.dll, Compiled\SciLexer-x64.dll, 1
FileCopy, SciLexer-x86.dll, Compiled\SciLexer-x86.dll, 1
RunWait, %AhkDir%\Compiler\Ahk2Exe.exe /in MacroCreator.ahk /out Compiled\MacroCreator.exe /icon Resources\PMC4_Mult.ico /bin "%AhkDir%\Compiler\Unicode 32-bit.bin" /mpress 1,, UseErrorLevel
If ErrorLevel = ERROR
{
MsgBox, 0x40000, Error, Error code: %A_LastError%
ExitApp
}
RunWait, %AhkDir%\Compiler\Ahk2Exe.exe /in MacroCreator.ahk /out Compiled\MacroCreator-x64.exe /icon Resources\PMC4_Mult.ico /bin "%AhkDir%\Compiler\Unicode 64-bit.bin" /mpress 1,, UseErrorLevel
If ErrorLevel = ERROR
{
MsgBox, 0x40000, Error, Error code: %A_LastError%
ExitApp
}
RunWait, %ProgramFiles%\Inno Setup 5\iscc.exe %A_ScriptDir%\Installer.iss,, UseErrorLevel
If ErrorLevel = ERROR
{
MsgBox, 0x40000, Error, Error code: %A_LastError%
ExitApp
}
TrayTip,, Finished compiling files.
Sleep, 2000
return