release.bat 1.4 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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
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
call sed_power.bat %community_dir%
goto RELEASE

:TQ
call sed_tq.bat %community_dir%
goto RELEASE

:PRO
call sed_pro.bat %community_dir%
goto RELEASE

:KH
call sed_kh.bat %community_dir%
goto RELEASE

:JH
call sed_jh.bat %community_dir%
goto RELEASE

:RELEASE
45 46 47
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
48
) else (
49 50
	rd /S /Q %internal_dir%\debug\ver-%2-%1-%3
	md %internal_dir%\debug\ver-%2-%1-%3
51
)
52 53 54 55 56 57 58 59 60 61 62 63
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
64 65
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
cmake ../../ -G "NMake Makefiles" -DVERNUMBER=%2 -DCPUTYPE=x64
66 67 68
GOTO MAKE_AND_INSTALL

:MAKE_AND_INSTALL
69 70 71 72 73
set CL=/MP4
nmake install
goto EXIT0

:USAGE
74
echo Usage: release.bat $productName $version $cpuType
75 76 77
goto EXIT0

:EXIT0