release.bat 1.8 KB
Newer Older
1 2 3 4 5 6 7 8
@echo off

set internal_dir=%~dp0\..\..\
set community_dir=%~dp0\..
cd %community_dir%
git checkout -- .
cd %community_dir%\packaging

9
:: %1 name %2 version %3 cpuType
10 11
if !%1==! GOTO USAGE
if !%2==! GOTO USAGE
12
if !%3==! GOTO USAGE
13 14 15 16 17 18 19 20 21 22 23 24
if %1 == taos GOTO TAOS
if %1 == power GOTO POWER
if %1 == tq GOTO TQ
if %1 == pro GOTO PRO
if %1 == kh GOTO KH
if %1 == jh GOTO JH
GOTO USAGE

:TAOS
goto RELEASE

:POWER
Z
zyyang 已提交
25
cd %internal_dir%\enterprise\packaging\oem
26
call sed_power.bat %community_dir%
Z
zyyang 已提交
27
cd %community_dir%\packaging
28 29 30
goto RELEASE

:TQ
Z
zyyang 已提交
31
cd %internal_dir%\enterprise\packaging\oem
32
call sed_tq.bat %community_dir%
Z
zyyang 已提交
33
cd %community_dir%\packaging
34 35 36
goto RELEASE

:PRO
Z
zyyang 已提交
37
cd %internal_dir%\enterprise\packaging\oem
38
call sed_pro.bat %community_dir%
Z
zyyang 已提交
39
cd %community_dir%\packaging
40 41 42
goto RELEASE

:KH
Z
zyyang 已提交
43
cd %internal_dir%\enterprise\packaging\oem
44
call sed_kh.bat %community_dir%
Z
zyyang 已提交
45
cd %community_dir%\packaging
46 47 48
goto RELEASE

:JH
Z
zyyang 已提交
49
cd %internal_dir%\enterprise\packaging\oem
50
call sed_jh.bat %community_dir%
Z
zyyang 已提交
51
cd %community_dir%\packaging
52 53 54
goto RELEASE

:RELEASE
55 56 57
echo release windows-client for %1, version: %2, cpyType: %3
if not exist %internal_dir%\debug\ver-%2-%1-%3 (
	md %internal_dir%\debug\ver-%2-%1-%3
58
) else (
59 60
	rd /S /Q %internal_dir%\debug\ver-%2-%1-%3
	md %internal_dir%\debug\ver-%2-%1-%3
61
)
62 63 64 65 66 67 68 69 70 71 72 73
cd %internal_dir%\debug\ver-%2-%1-%3

if %3% == x64 GOTO X64
if %3% == x86 GOTO X86
GOTO USAGE

:X86
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
cmake ../../ -G "NMake Makefiles" -DVERNUMBER=%2 -DCPUTYPE=x86
GOTO MAKE_AND_INSTALL

:X64
74 75
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
cmake ../../ -G "NMake Makefiles" -DVERNUMBER=%2 -DCPUTYPE=x64
76 77 78
GOTO MAKE_AND_INSTALL

:MAKE_AND_INSTALL
79 80 81 82 83
set CL=/MP4
nmake install
goto EXIT0

:USAGE
84
echo Usage: release.bat $productName $version $cpuType
85 86 87
goto EXIT0

:EXIT0