Skip to content

Commit 7c14384

Browse files
committed
buildReleaseZips.bat to build all zip/7z files
1 parent 5f2c10d commit 7c14384

1 file changed

Lines changed: 103 additions & 0 deletions

File tree

installer/buildReleaseZips.bat

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
:: Generate all .zip files
2+
@echo off
3+
4+
5+
SET ORIGINALDIR=%CD%
6+
7+
CD /d %~dp0
8+
9+
SET INSTALLERDIR=%CD%
10+
11+
IF NOT EXIST "buildPaths.bat" (
12+
echo You need to copy/rename buildPaths.bat.orig to buildPaths.bat, and edit it to your local configuration
13+
goto error
14+
)
15+
16+
CALL buildPaths.bat
17+
18+
IF NOT EXIST "%PYTHONBUILDDIR%\pcbuild\python.exe" (
19+
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain PCBuild\python.exe. Please set PYTHONBUILDDIR to the root of a built Python 2.7
20+
goto error
21+
)
22+
23+
IF NOT EXIST "%PYTHONBUILDDIR%\pcbuild\python27.dll" (
24+
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain PCBuild\python27.dll. Please set PYTHONBUILDDIR to the root of a built Python 2.7
25+
goto error
26+
)
27+
28+
IF EXIST "c:\program files\7-Zip\7z.exe" (
29+
SET SEVENZIPEXE="c:\program files\7-Zip\7z.exe"
30+
) ELSE (
31+
SET SEVENZIPEXE=7z.exe
32+
)
33+
34+
%SEVENZIPEXE% 2>&1 > temp\junk.txt
35+
36+
IF NOT [%ERRORLEVEL%]==[0] (
37+
echo Your 7z.exe doesn't seem to be in your PATH or in c:\program files\7-Zip, either add it to your path or install it
38+
goto error
39+
)
40+
41+
42+
43+
44+
45+
46+
%PYTHONBUILDDIR%\pcbuild\python extractVersion.py > temp\version.txt
47+
SET /p PYTHONSCRIPTVERSION= < temp\version.txt
48+
49+
echo Building Release for version %PYTHONSCRIPTVERSION%
50+
51+
echo.
52+
echo Clearing old release directory
53+
rd /s /q temp\release
54+
55+
echo Creating directories
56+
mkdir temp\release\Full\plugins\PythonScript\lib
57+
mkdir temp\release\Full\plugins\doc\PythonScript
58+
mkdir temp\release\Min\plugins\PythonScript\lib
59+
mkdir temp\release\Min\plugins\doc\PythonScript
60+
mkdir temp\release\Extra\plugins\PythonScript\lib
61+
mkdir temp\release\Tcl\plugins\PythonScript\lib\tcl
62+
63+
echo Copying Python27.dll
64+
copy %PYTHONBUILDDIR%\PCBuild\python27.dll temp\release\Full
65+
copy %PYTHONBUILDDIR%\PCBuild\python27.dll temp\release\Min
66+
67+
echo Copying PythonScript.dll
68+
copy ..\bin\Release\PythonScript.dll temp\release\Full\plugins
69+
copy ..\bin\release\PythonScript.dll temp\release\min\plugins
70+
71+
echo Copying Help
72+
copy ..\docs\build\htmlhelp\PythonScript.chm temp\release\full\plugins\doc\PythonScript
73+
copy ..\docs\build\htmlhelp\PythonScript.chm temp\release\min\plugins\doc\PythonScript
74+
75+
echo Copying Lib directories
76+
xcopy /s /q ..\PythonLib\full\*.* temp\release\full\plugins\PythonScript\lib
77+
xcopy /s /q ..\PythonLib\min\*.* temp\release\min\plugins\PythonScript\lib
78+
79+
echo Copying Extra lib directory
80+
xcopy /s /q ..\PythonLib\Extra\*.* temp\release\extra\plugins\pythonscript\lib
81+
82+
echo Copying Tcl directory
83+
xcopy /s /q ..\PythonLib\tcl\*.* temp\release\tcl\plugins\pythonscript\lib\tcl
84+
85+
86+
87+
cd temp\release\Full
88+
%SEVENZIPEXE% a -r -t7z %INSTALLERDIR%\build\PythonScript_Full_%PYTHONSCRIPTVERSION%.7z .
89+
%SEVENZIPEXE% a -r -tzip %INSTALLERDIR%\build\PythonScript_Full_%PYTHONSCRIPTVERSION%.zip .
90+
91+
cd %INSTALLERDIR%\temp\release\Min
92+
%SEVENZIPEXE% a -r -t7z %INSTALLERDIR%\build\PythonScript_Min_%PYTHONSCRIPTVERSION%.7z .
93+
%SEVENZIPEXE% a -r -tzip %INSTALLERDIR%\build\PythonScript_Min_%PYTHONSCRIPTVERSION%.zip .
94+
95+
cd %INSTALLERDIR%\temp\release\Extra
96+
%SEVENZIPEXE% a -r -t7z %INSTALLERDIR%\build\PythonScript_ExtraLibs_%PYTHONSCRIPTVERSION%.7z .
97+
%SEVENZIPEXE% a -r -tzip %INSTALLERDIR%\build\PythonScript_ExtraLibs_%PYTHONSCRIPTVERSION%.zip .
98+
99+
cd %INSTALLERDIR%\temp\release\Tcl
100+
%SEVENZIPEXE% a -r -t7z %INSTALLERDIR%\build\PythonScript_TclTk_%PYTHONSCRIPTVERSION%.7z .
101+
%SEVENZIPEXE% a -r -tzip %INSTALLERDIR%\build\PythonScript_TclTk_%PYTHONSCRIPTVERSION%.zip .
102+
103+
CD /d %ORIGINALDIR%

0 commit comments

Comments
 (0)