File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,18 @@ IF NOT EXIST "buildPaths.bat" (
1616
1717CALL buildPaths.bat
1818
19- SET PYTHONSCRIPTVERSION = 1.0.0.0
19+ IF NOT EXIST " %PYTHONBUILDDIR% \pcbuild\python.exe" (
20+ echo Your PYTHONBUILDDIR in buildPaths.bat does not contain PCBuild\python.exe. Please set PYTHONBUILDDIR to the root of a built Python 2.7
21+ goto error
22+ )
23+
24+ IF NOT EXIST " %PYTHONBUILDDIR% \pcbuild\python27.dll" (
25+ echo Your PYTHONBUILDDIR in buildPaths.bat does not contain PCBuild\python27.dll. Please set PYTHONBUILDDIR to the root of a built Python 2.7
26+ goto error
27+ )
28+
29+ %PYTHONBUILDDIR% \pcbuild\python extractVersion.py > temp\version.txt
30+ SET /p PYTHONSCRIPTVERSION = < temp\version.txt
2031
2132
2233echo Generating WiX information for ..\pythonlib\full
@@ -84,6 +95,10 @@ if NOT [%ERRORLEVEL%]==[0] (
8495 goto error
8596)
8697
98+ echo .
99+ echo .
100+ echo Installer created - build\PythonScript_%PYTHONSCRIPTVERSION% .msi
101+
87102goto end
88103
89104:error
Original file line number Diff line number Diff line change 1+ """Extracts the version number of PythonScript"""
2+
3+ import sys , os
4+ import re
5+
6+ pathToVersionFile = os .path .join (os .path .abspath (os .path .dirname (sys .argv [0 ])), '..\PythonScript\src\PythonScriptVersion.h' )
7+
8+ versionHeader = open (pathToVersionFile , 'r' )
9+ versionRegex = re .compile (r'PYSCR_VERSION_STRING\s+"([0-9.]+)"' )
10+
11+ for line in versionHeader :
12+ match = versionRegex .search (line )
13+ if match :
14+ print match .group (1 ),
15+ break
16+
17+
18+
You can’t perform that action at this time.
0 commit comments