-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathwindows-build-binary.bat
35 lines (27 loc) · 1.03 KB
/
windows-build-binary.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
set OS=windows
set TARGET_BASE=enketo-validate-binaries
set TARGET_OS=%TARGET_BASE%\%OS%
set FILENAME=validate
set NODE_VERSION=8
echo Building binaries for %OS%...
rem Create the binary
mkdir %TARGET_OS%
echo Created folder %TARGET_OS%
call pkg validate --targets node%NODE_VERSION%-win-x64 --output %FILENAME%
echo Moving executable to %TARGET_OS%
move %FILENAME%.exe %TARGET_OS%
rem Copy the compiled libxmljs-mt files:
echo Copying the node_module packages
mkdir %TARGET_OS%\node_modules\libxmljs-mt\build\Release
copy node_modules\libxmljs-mt\build\Release\*.node %TARGET_OS%\node_modules\libxmljs-mt\build\Release\
rem Copy the compiled libxslt files:
mkdir %TARGET_OS%\node_modules\libxslt\build\Release
copy node_modules\libxslt\build\Release\*.node %TARGET_OS%\node_modules\libxslt\build\Release\
echo Done copying
echo All done, let us check if it works:
rem Test (a valid form, so it exits with 0)
call %TARGET_OS%\%FILENAME% test\xform\model-only.xml
rem zip it
cd %TARGET_OS%
call "\Program Files\7-Zip\7z" a -r %OS%.zip *
cd ..\..