-
Notifications
You must be signed in to change notification settings - Fork 5
/
deploy.bat
51 lines (43 loc) · 926 Bytes
/
deploy.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
@ECHO OFF
where npm >nul 2>nul
IF %errorlevel%==1 goto needsNode
IF %errorlevel%==0 goto ask
:needsNode
ECHO npm not found in path.
ECHO install node js - https://nodejs.org/en/
PAUSE
EXIT /B 0
:installNode
ECHO Installing node modules
npm install
EXIT /B 0
:ask
ECHO Select which platform to deploy for
ECHO w32 - For windows 32bit
ECHO w64 - For windows 64bit
SET /P INPUT= "Platform: "
If /I "%INPUT%"=="w32" goto w32
If /I "%INPUT%"=="w64" goto w64
ECHO Invalid Platform
goto ask
:beforeBuild
IF NOT EXIST node_modules CALL :installNode
EXIT /B 0
:afterBuild
ECHO Building complete
IF EXIST compiled RD /s /q compiled
EXIT /B 0
:w32
CALL :beforeBuild
ECHO Building Windows 32bit App
CALL npm run build-w32
CALL :afterBuild
PAUSE
EXIT /B 0
:w64
CALL :beforeBuild
ECHO Building Windows 64bit App
CALL npm run build-w64
CALL :afterBuild
PAUSE
EXIT /B 0