4
set ROOT=${buildout:directory}
6
set RELEASE=%ROOT%\release\bzr.${settings:bzr-release}
7
set DEV=%ROOT%\dev\bzr.dev
12
set SVN_DEV=${buildout:directory}/${svn-dev:destination}
13
set SVN_BDB=${buildout:directory}/${svn-db4:destination}
14
set SVN_LIBINTL=${buildout:directory}/${svn-libintl:destination}
15
set TBZR=${buildout:directory}/tbzr/trunk
16
set INSTALLERS=%ROOT%\installers
17
set PYTHON=${buildout:executable}
19
set ORIGINAL_PYTHONPATH=%PYTHONPATH%
20
set ORIGINAL_DIRECTORY=%CD%
24
set TORTOISE_OVERLAYS_MSI_WIN32_CMD=%PYTHON% %ROOT%/ostools.py basename ${settings:tortoise-overlays-win32-url}
25
FOR /f "tokens=1 delims= " %%G IN ('%TORTOISE_OVERLAYS_MSI_WIN32_CMD%') DO set BASENAME=%%G
26
set TORTOISE_OVERLAYS_MSI_WIN32=${buildout:directory}/tortoise-overlays/%BASENAME%
28
set TORTOISE_OVERLAYS_MSI_X64_CMD=%PYTHON% %ROOT%/ostools.py basename ${settings:tortoise-overlays-x64-url}
29
FOR /f "tokens=1 delims= " %%G IN ('%TORTOISE_OVERLAYS_MSI_X64_CMD%') DO set BASENAME=%%G
30
set TORTOISE_OVERLAYS_MSI_X64=${buildout:directory}/tortoise-overlays/%BASENAME%
32
FOR /f "tokens=1 delims= " %%G IN ('cygpath %PYTHON%') DO set CYG_PYTHON=%%G
35
if "%1"=="release" (set TARGET=%RELEASE%) & (set BZR_TARGET=release) & shift & goto ARGS
36
if "%1"=="dev" (set TARGET=%DEV%) & (set BZR_TARGET=trunk) & shift & goto ARGS
37
if "%1"=="plugin-release" (set PLUGIN_TARGET=release) & shift & goto ARGS
38
if "%1"=="plugin-dev" (set PLUGIN_TARGET=trunk) & shift & goto ARGS
40
if not defined TARGET (set TARGET=%RELEASE%) & (set BZR_TARGET=release)
41
if not defined PLUGIN_TARGET (set PLUGIN_TARGET=release)
43
%PYTHON% %ROOT%/ostools.py remove %TARGET%
44
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
46
%PYTHON% %ROOT%/ostools.py makedir %TARGET%
47
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
49
%PYTHON% %ROOT%/ostools.py makedir %INSTALLERS%
50
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
52
bzr co %ROOT%/bzr/%BZR_TARGET% %TARGET%
53
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
55
cd %ROOT%/subvertpy/%PLUGIN_TARGET%
56
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
57
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
59
cd %ROOT%/bzrtools/%PLUGIN_TARGET%
60
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
61
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
63
cd %ROOT%/qbzr/%PLUGIN_TARGET%
64
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
65
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
67
cd %ROOT%/bzr-svn/%PLUGIN_TARGET%
68
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
69
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
71
cd %ROOT%/bzr-rebase/%PLUGIN_TARGET%
72
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
73
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
75
set PYTHONPATH=%PYTHONPATH%;%TARGET%
77
%PYTHON% setup.py build
78
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
81
make installer PYTHON=%CYG_PYTHON%
82
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
84
rem Enable this when this branch is merged.
85
rem make python-installer PYTHON24=${settings:python24} PYTHON25=${settings:python25}
86
rem @if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
88
${settings:python24} setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
89
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
91
${settings:python25} setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
92
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
94
%PYTHON% %ROOT%/ostools.py copytodir %TARGET%/bzr*.exe %INSTALLERS%
95
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
98
set PYTHONPATH=%ORIGINAL_PYTHONPATH%
99
cd %ORIGINAL_DIRECTORY%
100
exit /b %BUILD_ERROR%