Skip to content

Commit d57ac5f

Browse files
committed
Added build script for Windows
1 parent c260b29 commit d57ac5f

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed

build.cmd

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@ECHO off
2+
3+
CD %~dp0
4+
CALL build\deps.cmd
5+
CALL build\gui.cmd
6+
CALL build\pipy.cmd
7+
8+
IF NOT EXIST bin (MD bin)
9+
COPY pipy\bin\Release\pipy.exe bin\pipy.exe
10+
11+
ECHO The final product is ready at bin\pipy.exe

build/deps.cmd

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@ECHO off
2+
3+
SET cur_dir=%CD%
4+
5+
CD %~dp0
6+
CD ..
7+
SET ztm_dir=%CD%
8+
9+
CD "%ztm_dir%"
10+
CMD /c "git submodule update --init"
11+
12+
CD "%ztm_dir%\pipy"
13+
CMD /c "npm install --no-audit"
14+
15+
CD "%ztm_dir%\gui"
16+
CMD /c "npm install --no-audit"
17+
18+
CD "%cur_dir%"

build/gui.cmd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@ECHO off
2+
3+
SET cur_dir=%CD%
4+
5+
CD %~dp0
6+
CD ..
7+
SET ztm_dir=%CD%
8+
9+
CD "%ztm_dir%\gui"
10+
CMD /c "npm run build"
11+
12+
CD "%cur_dir%"

build/pipy.cmd

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@ECHO off
2+
3+
SET cur_dir=%CD%
4+
5+
CD %~dp0
6+
CD ..
7+
SET ztm_dir=%CD%
8+
9+
CD "%ztm_dir%\pipy"
10+
11+
IF NOT EXIST build (MD build)
12+
13+
CD build
14+
SET codebases="ztm/ca:../ca,ztm/hub:../hub,ztm/agent:../agent"
15+
CMD /c "cmake .. -DCMAKE_BUILD_TYPE=Release -DPIPY_GUI=OFF -DPIPY_CODEBASES=ON -DPIPY_CUSTOM_CODEBASES=%codebases%"
16+
CMD /c "msbuild pipy.sln -t:pipy -p:Configuration=Release"
17+
18+
CD "%cur_dir%"

0 commit comments

Comments
 (0)