Browse Source
Moves Windows installer externals onto SVN and updates the build process to grab them automatically.
pull/9921/head
Moves Windows installer externals onto SVN and updates the build process to grab them automatically.
pull/9921/head
8 changed files with 100 additions and 70 deletions
-
59Tools/msi/README.txt
-
4Tools/msi/build.bat
-
8Tools/msi/buildrelease.bat
-
27Tools/msi/get_externals.bat
-
49Tools/msi/get_wix.py
-
2Tools/msi/msi.props
-
15Tools/msi/uploadrelease.bat
-
6Tools/msi/wix.props
@ -0,0 +1,27 @@ |
|||
@echo off |
|||
setlocal |
|||
rem Simple script to fetch source for external tools |
|||
|
|||
where /Q svn |
|||
if ERRORLEVEL 1 ( |
|||
echo.svn.exe must be on your PATH to get external tools. |
|||
echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the |
|||
echo.command line tools option. |
|||
popd |
|||
exit /b 1 |
|||
) |
|||
|
|||
if not exist "%~dp0..\..\externals" mkdir "%~dp0..\..\externals" |
|||
pushd "%~dp0..\..\externals" |
|||
|
|||
if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/ |
|||
|
|||
if not exist "windows-installer\.svn" ( |
|||
echo.Checking out installer dependencies to %CD%\windows-installer |
|||
svn co %SVNROOT%windows-installer |
|||
) else ( |
|||
echo.Updating installer dependencies in %CD%\windows-installer |
|||
svn up windows-installer |
|||
) |
|||
|
|||
popd |
|||
@ -1,49 +0,0 @@ |
|||
''' |
|||
Downloads and extracts WiX to a local directory |
|||
''' |
|||
|
|||
__author__ = 'Steve Dower <steve.dower@microsoft.com>' |
|||
|
|||
import io |
|||
import os |
|||
import sys |
|||
|
|||
from pathlib import Path |
|||
from subprocess import Popen |
|||
from zipfile import ZipFile |
|||
|
|||
EXTERNALS_DIR = None |
|||
for p in (Path.cwd() / __file__).parents: |
|||
if any(p.glob("PCBuild/*.vcxproj")): |
|||
EXTERNALS_DIR = p / "externals" |
|||
break |
|||
|
|||
if not EXTERNALS_DIR: |
|||
print("Cannot find project root") |
|||
sys.exit(1) |
|||
|
|||
WIX_BINARIES_ZIP = 'http://wixtoolset.org/downloads/v3.10.0.1823/wix310-binaries.zip' |
|||
TARGET_BIN_ZIP = EXTERNALS_DIR / "wix.zip" |
|||
TARGET_BIN_DIR = EXTERNALS_DIR / "wix" |
|||
|
|||
POWERSHELL_COMMAND = "[IO.File]::WriteAllBytes('{}', (Invoke-WebRequest {} -UseBasicParsing).Content)" |
|||
|
|||
if __name__ == '__main__': |
|||
if TARGET_BIN_DIR.exists() and any(TARGET_BIN_DIR.glob("*")): |
|||
print('WiX is already installed') |
|||
sys.exit(0) |
|||
|
|||
try: |
|||
TARGET_BIN_DIR.mkdir() |
|||
except FileExistsError: |
|||
pass |
|||
|
|||
print('Downloading WiX to', TARGET_BIN_ZIP) |
|||
p = Popen(["powershell.exe", "-Command", POWERSHELL_COMMAND.format(TARGET_BIN_ZIP, WIX_BINARIES_ZIP)]) |
|||
p.wait() |
|||
print('Extracting WiX to', TARGET_BIN_DIR) |
|||
with ZipFile(str(TARGET_BIN_ZIP)) as z: |
|||
z.extractall(str(TARGET_BIN_DIR)) |
|||
TARGET_BIN_ZIP.unlink() |
|||
|
|||
print('Extracted WiX') |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue