From 940f6a8f11b5ef0f9fa85b0be4b95608efebb2e8 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 31 Oct 2015 12:17:11 -0700 Subject: Improves handling of test markers for building Python without intefering with actual installs. --- PCbuild/build.bat | 3 +++ PCbuild/pyproject.props | 4 ++-- PCbuild/python.props | 16 ++++++++++++---- Tools/msi/build.bat | 24 +++++++++++++++--------- Tools/msi/bundle/Default.thm | 2 +- Tools/msi/bundle/bundle.targets | 8 ++++++-- Tools/msi/bundle/bundle.wxs | 27 ++++++++++++++++++++------- Tools/msi/common.wxs | 4 ++-- Tools/msi/launcher/launcher_files.wxs | 8 ++++---- Tools/msi/launcher/launcher_reg.wxs | 34 +++++++++++++++++----------------- Tools/msi/msi.props | 8 ++------ Tools/msi/msi.targets | 2 +- Tools/msi/tcltk/tcltk_reg.wxs | 16 ++++++++-------- 13 files changed, 93 insertions(+), 63 deletions(-) diff --git a/PCbuild/build.bat b/PCbuild/build.bat index 2c41fb2..cfbc4a2 100644 --- a/PCbuild/build.bat +++ b/PCbuild/build.bat @@ -38,6 +38,7 @@ echo. -p x64 ^| Win32 echo. Set the platform (default: Win32) echo. -t Build ^| Rebuild ^| Clean ^| CleanAll echo. Set the target manually +echo. --test-marker Enable the test marker within the build. exit /b 127 :Run @@ -62,6 +63,7 @@ if "%~1"=="-m" (set parallel=/m) & shift & goto CheckOpts if "%~1"=="-M" (set parallel=) & shift & goto CheckOpts if "%~1"=="-v" (set verbose=/v:n) & shift & goto CheckOpts if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts +if "%~1"=="--test-marker" (set UseTestMarker=true) & shift & goto CheckOpts if "%~1"=="-V" shift & goto Version rem These use the actual property names used by MSBuild. We could just let rem them in through the environment, but we specify them on the command line @@ -93,6 +95,7 @@ msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^ /p:Configuration=%conf% /p:Platform=%platf%^ /p:IncludeExternals=%IncludeExternals%^ /p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^ + /p:UseTestMarker=%UseTestMarker%^ %1 %2 %3 %4 %5 %6 %7 %8 %9 @goto :eof diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index a2c44f3..25cdfcc 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -128,8 +128,8 @@ foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses - - + + _d + + -test + + + -32 + $(BuildPath)python$(PyDebugExt).exe @@ -129,17 +135,17 @@ $([msbuild]::Multiply($(MicroVersionNumber), 1000)) )) )) + $([msbuild]::Add($(Field3Value), 9000)) python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt) - .cp$(MajorVersionNumber)$(MinorVersionNumber)-win32 - .cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64 + .cp$(MajorVersionNumber)$(MinorVersionNumber)-win32 + .cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64 - $(MajorVersionNumber).$(MinorVersionNumber) - $(SysWinVer)-32 + $(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt) @@ -148,5 +154,7 @@ + + diff --git a/Tools/msi/build.bat b/Tools/msi/build.bat index b11579b..a61ace8 100644 --- a/Tools/msi/build.bat +++ b/Tools/msi/build.bat @@ -6,16 +6,18 @@ set PCBUILD=%D%..\..\PCBuild\ set BUILDX86= set BUILDX64= set BUILDDOC= -set BUILDPX= +set BUILDTEST=--test-marker set BUILDPACK= +set REBUILD= :CheckOpts if "%~1" EQU "-h" goto Help if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts -if "%~1" EQU "--test-marker" (set BUILDPX=1) && shift && goto CheckOpts +if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts +if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1) @@ -24,15 +26,15 @@ call "%D%get_externals.bat" call "%PCBUILD%env.bat" x86 if defined BUILDX86 ( - call "%PCBUILD%build.bat" -d -e + call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST% if errorlevel 1 goto :eof - call "%PCBUILD%build.bat" -e + call "%PCBUILD%build.bat" -e %REBUILD% %BUILDTEST% if errorlevel 1 goto :eof ) if defined BUILDX64 ( - call "%PCBUILD%build.bat" -p x64 -d -e + call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST% if errorlevel 1 goto :eof - call "%PCBUILD%build.bat" -p x64 -e + call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST% if errorlevel 1 goto :eof ) @@ -42,12 +44,15 @@ if defined BUILDDOC ( ) set BUILD_CMD="%D%bundle\snapshot.wixproj" -if defined BUILDPX ( +if defined BUILDTEST ( set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true ) if defined BUILDPACK ( set BUILD_CMD=%BUILD_CMD% /p:Pack=true ) +if defined REBUILD ( + set BUILD_CMD=%BUILD_CMD% /t:Rebuild +) if defined BUILDX86 ( msbuild %BUILD_CMD% @@ -61,10 +66,11 @@ if defined BUILDX64 ( exit /B 0 :Help -echo build.bat [-x86] [-x64] [--doc] [-h] [--test-marker] [--pack] +echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r] echo. echo -x86 Build x86 installers echo -x64 Build x64 installers echo --doc Build CHM documentation -echo --test-marker Build installers with 'x' markers +echo --no-test-marker Build without test markers echo --pack Embed core MSIs into installer +echo -r Rebuild rather than incremental build diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm index 903af4f..8ff4c3b 100644 --- a/Tools/msi/bundle/Default.thm +++ b/Tools/msi/bundle/Default.thm @@ -64,7 +64,7 @@ #(loc.Include_testLabel) #(loc.Include_testHelpLabel) - #(loc.Include_launcherLabel) + #(loc.Include_launcherLabel) #(loc.InstallLauncherAllUsersLabel) #(loc.Include_launcherHelpLabel) diff --git a/Tools/msi/bundle/bundle.targets b/Tools/msi/bundle/bundle.targets index 9b7d090..57ca1dc 100644 --- a/Tools/msi/bundle/bundle.targets +++ b/Tools/msi/bundle/bundle.targets @@ -88,8 +88,12 @@ - - + diff --git a/Tools/msi/bundle/bundle.wxs b/Tools/msi/bundle/bundle.wxs index ffaadbd..b8430a4 100644 --- a/Tools/msi/bundle/bundle.wxs +++ b/Tools/msi/bundle/bundle.wxs @@ -22,22 +22,26 @@ - - + + + + + + - + - + - - - + + + VersionNT > 600 - - + + VersionNT > 600 - - + + VersionNT > 600 - + VersionNT > 600 - + @@ -31,14 +31,14 @@ VersionNT = 600 - + VersionNT = 600 - + -- cgit v0.12 From 04a4316acc1bc4cfeb131517ddeac34f50c6c5c9 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Sat, 31 Oct 2015 12:41:46 -0700 Subject: Issue #25450: Updates shortcuts to start Python in installation directory. --- Misc/NEWS | 2 ++ Tools/msi/doc/doc.wxs | 3 ++- Tools/msi/exe/exe.wxs | 3 ++- Tools/msi/tcltk/tcltk.wxs | 6 ++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index 47c129b..5b02c78 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -348,6 +348,8 @@ Build Windows ------- +- Issue #25450: Updates shortcuts to start Python in installation directory. + - Issue #25164: Changes default all-users install directory to match per-user directory. diff --git a/Tools/msi/doc/doc.wxs b/Tools/msi/doc/doc.wxs index bbe30a1..8dd0e21 100644 --- a/Tools/msi/doc/doc.wxs +++ b/Tools/msi/doc/doc.wxs @@ -22,7 +22,8 @@ + Description="!(loc.ShortcutDescription)" + WorkingDirectory="InstallDirectory" /> diff --git a/Tools/msi/exe/exe.wxs b/Tools/msi/exe/exe.wxs index dcbf646..154cee5 100644 --- a/Tools/msi/exe/exe.wxs +++ b/Tools/msi/exe/exe.wxs @@ -20,7 +20,8 @@ + Description="!(loc.ShortcutDescription)" + WorkingDirectory="InstallDirectory" /> diff --git a/Tools/msi/tcltk/tcltk.wxs b/Tools/msi/tcltk/tcltk.wxs index 0b83c5c..eeae8e8 100644 --- a/Tools/msi/tcltk/tcltk.wxs +++ b/Tools/msi/tcltk/tcltk.wxs @@ -49,7 +49,8 @@ Description="!(loc.ShortcutDescription)" Target="[PYTHONW_EXE]" Arguments='"[#Lib_idlelib_idle.pyw]"' - Icon="idle.exe"> + Icon="idle.exe" + WorkingDirectory="InstallDirectory"> + Icon="idle.exe" + WorkingDirectory="InstallDirectory" /> -- cgit v0.12