~bzr-pqm/bzr/bzr.dev

4392.3.9 by Sidnei da Silva
- Getting really close now
1
@echo off
2
setlocal
3
4392.3.22 by Sidnei da Silva
- Fix a few SNAFUs
4
set ROOT=${buildout:directory}
5
4392.3.23 by Sidnei da Silva
- Define targets as 'release' and 'dev', allow passing them through make
6
set RELEASE=%ROOT%\release\bzr.${settings:bzr-release}
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
7
set DEV=%ROOT%\dev\bzr.dev
8
set TARGET=
9
set BZR_TARGET=
10
set PLUGIN_TARGET=
4392.3.22 by Sidnei da Silva
- Fix a few SNAFUs
11
4392.3.4 by Sidnei da Silva
- Start of a batch file
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
4392.3.19 by Sidnei da Silva
- Work around and build installers directly, copy all of them to the same directory
16
set INSTALLERS=%ROOT%\installers
4392.3.9 by Sidnei da Silva
- Getting really close now
17
set PYTHON=${buildout:executable}
4392.3.22 by Sidnei da Silva
- Fix a few SNAFUs
18
4392.3.17 by Sidnei da Silva
- Build tbzr with release bzrlib in path
19
set ORIGINAL_PYTHONPATH=%PYTHONPATH%
4392.3.9 by Sidnei da Silva
- Getting really close now
20
set ORIGINAL_DIRECTORY=%CD%
21
4392.3.22 by Sidnei da Silva
- Fix a few SNAFUs
22
set BUILD_ERROR=0
23
4392.3.9 by Sidnei da Silva
- Getting really close now
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
4392.3.14 by Sidnei da Silva
- Get rid of 'build' directory. Just call make installer
26
set TORTOISE_OVERLAYS_MSI_WIN32=${buildout:directory}/tortoise-overlays/%BASENAME%
4392.3.9 by Sidnei da Silva
- Getting really close now
27
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
4392.3.14 by Sidnei da Silva
- Get rid of 'build' directory. Just call make installer
30
set TORTOISE_OVERLAYS_MSI_X64=${buildout:directory}/tortoise-overlays/%BASENAME%
4392.3.9 by Sidnei da Silva
- Getting really close now
31
4392.3.12 by Sidnei da Silva
- Call 'make docs'
32
FOR /f "tokens=1 delims= " %%G IN ('cygpath %PYTHON%') DO set CYG_PYTHON=%%G
33
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
34
:ARGS
4392.3.23 by Sidnei da Silva
- Define targets as 'release' and 'dev', allow passing them through make
35
if "%1"=="release" (set TARGET=%RELEASE%) & (set BZR_TARGET=release) & shift & goto ARGS
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
36
if "%1"=="dev" (set TARGET=%DEV%) & (set BZR_TARGET=trunk) & shift & goto ARGS
4392.3.23 by Sidnei da Silva
- Define targets as 'release' and 'dev', allow passing them through make
37
if "%1"=="plugin-release" (set PLUGIN_TARGET=release) & shift & goto ARGS
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
38
if "%1"=="plugin-dev" (set PLUGIN_TARGET=trunk) & shift & goto ARGS
39
4392.3.23 by Sidnei da Silva
- Define targets as 'release' and 'dev', allow passing them through make
40
if not defined TARGET (set TARGET=%RELEASE%) & (set BZR_TARGET=release)
41
if not defined PLUGIN_TARGET (set PLUGIN_TARGET=release)
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
42
4392.3.22 by Sidnei da Silva
- Fix a few SNAFUs
43
%PYTHON% %ROOT%/ostools.py remove %TARGET%
44
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
45
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
46
%PYTHON% %ROOT%/ostools.py makedir %TARGET%
47
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
48
49
%PYTHON% %ROOT%/ostools.py makedir %INSTALLERS%
50
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
51
4580.5.7 by John Arbash Meinel
Use COMSPEC /c so that we can work with bzr.bat as needed.
52
rem Use %COMSPEC% /c in case bzr is actually a .bat file
53
%COMSPEC% /c bzr co %ROOT%/bzr/%BZR_TARGET% %TARGET%
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
54
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
55
4599.2.3 by John Arbash Meinel
Switch to just calling out to python setup.py directly, rather than passing the paths to Makefile.
56
rem Build the python installers first, because we don't want to
4580.5.13 by John Arbash Meinel
Switch back to using 'make python-installer'.
57
rem include any of the 3rd-party plugins, because we don't bundle
58
rem their dependencies.
59
cd %TARGET%
4599.2.3 by John Arbash Meinel
Switch to just calling out to python setup.py directly, rather than passing the paths to Makefile.
60
61
rem This is slightly redundant with 'make installer-all'
62
rem except in that case we have to do cygwin path translations for all the
63
rem different versions of python
64
${settings:python24} setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
65
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
66
67
${settings:python25} setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
68
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
69
70
${settings:python26} setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
4599.2.2 by John Arbash Meinel
If the python direct installers fail to build, we want to know right away.
71
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
4580.5.13 by John Arbash Meinel
Switch back to using 'make python-installer'.
72
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
73
cd %ROOT%/subvertpy/%PLUGIN_TARGET%
4392.3.25 by Sidnei da Silva
- Fixup a couple more targets
74
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
75
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
76
77
cd %ROOT%/bzrtools/%PLUGIN_TARGET%
4392.3.25 by Sidnei da Silva
- Fixup a couple more targets
78
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
79
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
80
81
cd %ROOT%/qbzr/%PLUGIN_TARGET%
4392.3.25 by Sidnei da Silva
- Fixup a couple more targets
82
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
83
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
84
85
cd %ROOT%/bzr-svn/%PLUGIN_TARGET%
4392.3.25 by Sidnei da Silva
- Fixup a couple more targets
86
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
87
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
88
4580.5.8 by John Arbash Meinel
rebase is now called rewrite... well sort of
89
cd %ROOT%/bzr-rewrite/%PLUGIN_TARGET%
4392.3.25 by Sidnei da Silva
- Fixup a couple more targets
90
%PYTHON% setup.py install -O1 --install-lib=%TARGET%
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
91
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
92
93
set PYTHONPATH=%PYTHONPATH%;%TARGET%
4392.3.17 by Sidnei da Silva
- Build tbzr with release bzrlib in path
94
cd %ROOT%/tbzr/trunk
95
%PYTHON% setup.py build
96
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
97
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
98
cd %TARGET%
4392.3.14 by Sidnei da Silva
- Get rid of 'build' directory. Just call make installer
99
make installer PYTHON=%CYG_PYTHON%
4392.3.9 by Sidnei da Silva
- Getting really close now
100
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
101
4392.3.21 by Sidnei da Silva
- Make build-installer work for both trunk and latest of both bzr and plugins
102
%PYTHON% %ROOT%/ostools.py copytodir %TARGET%/bzr*.exe %INSTALLERS%
4392.3.18 by Sidnei da Silva
- Make python-installer too
103
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End
104
4392.3.9 by Sidnei da Silva
- Getting really close now
105
:End
4392.3.17 by Sidnei da Silva
- Build tbzr with release bzrlib in path
106
set PYTHONPATH=%ORIGINAL_PYTHONPATH%
4392.3.9 by Sidnei da Silva
- Getting really close now
107
cd %ORIGINAL_DIRECTORY%
108
exit /b %BUILD_ERROR%