summaryrefslogtreecommitdiff
path: root/windows/neo-vars/src/make-build.bat
blob: 56f39f5781b2adbb5988fb3ef8be1e43100441c8 (plain)
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
@echo off

echo Setting default local path variables
:: TortoiseSVN and its clever tool SubWCRev
set Tsvnpath=C:\Programme\TortoiseSVN\bin
set  ahkpath=C:\Programme\AutoHotkey

if exist _local_paths.bat call _local_paths.bat

set SubWCRev=%Tsvnpath%\SubWCRev.exe
set  Ahk2Exe=%ahkpath%\Compiler\Ahk2Exe.exe

REM The path to the authohotkey directory in the local svn copy, MUST be "."
set srcdir=.
set outdir=..\out
set Ssrcdir=%srcdir%\source
set ahkrevtemplate1=%Ssrcdir%\_subwcrev1.tmpl.ahk
set   ahkrevoutput1=%Ssrcdir%\_subwcrev1.generated.ahk
set batrevtemplate1=%Ssrcdir%\_subwcrev1.tmpl.bat
set   batrevoutput1=%Ssrcdir%\_subwcrev1.bat

set     NEO2AppData=%APPDATA%\NEO2
set       customahk=%NEO2AppData%\custom.ahk
set  customahkbuild=%customahk%.buildtmp

REM The path to the directory used for generating a consistent SVN version (revision number)
set svnversiondir1=.

echo Generating Version File
"%SubWCRev%" "%svnversiondir1%" "%ahkrevtemplate1%" "%ahkrevoutput1%"
"%SubWCRev%" "%svnversiondir1%" "%batrevtemplate1%" "%batrevoutput1%"
call "%batrevoutput1%"

set fnexe=%outdir%\neo20.exe
"%SubWCRev%" "%svnversiondir1%" -nm
if errorlevel 1 (
  set fnexe=%outdir%\neo20-r%Revision%.exe
)

echo removing old version(s) of NEO AHK Exe file
del "%outdir%\neo20-r*.exe" 2> nul

set fnahk=%srcdir%\neo20-all.ahk

if exist "%customahk%" (
  move "%customahk%" "%customahkbuild%"
)

echo Compiling the new Driver using Autohotkey
"%Ahk2Exe%" /in "%fnahk%" /out "%fnexe%" /icon "%srcdir%\neo_enabled.ico"

if exist "%customahkbuild%" (
  move "%customahkbuild%" "%customahk%"
)

echo Driver Update complete! You can now close this log-window.
pause