Skip to content

Commit 2f81b90

Browse files
committed
Update Windows build script for installer changes.
1 parent 1a010dd commit 2f81b90

File tree

1 file changed

+33
-75
lines changed

1 file changed

+33
-75
lines changed

utils/build-windows-toolchain.bat

Lines changed: 33 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -928,100 +928,58 @@ endlocal
928928
:PackageToolchain
929929
setlocal enableextensions enabledelayedexpansion
930930

931-
:: Package bld.msi
932-
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\bld\bld.wixproj ^
931+
:: Build web bundle
932+
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\bundle\installer.wixproj ^
933+
-m ^
933934
-restore ^
935+
-p:BundleFlavor=web ^
936+
-p:BaseReleaseDownloadUrl=todo://base/release/download/url ^
934937
-p:Configuration=Release ^
935-
-p:BaseOutputPath=%PackageRoot%\bld\ ^
938+
-p:BaseOutputPath=%PackageRoot%\web\ ^
936939
-p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
937-
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain
938-
:: TODO(compnerd) actually perform the code-signing
939-
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\bld\bld.msi
940+
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
941+
-p:PLATFORM_ROOT=%PlatformRoot%\ ^
942+
-p:SDK_ROOT=%SDKInstallRoot%\
943+
::-p:INCLUDE_SWIFT_FORMAT=true
944+
::-p:SWIFT_FORMAT_BUILD=directory\containing\swift-format.exe
945+
::-p:INCLUDE_SWIFT_INSPECT=true
946+
::-p:SWIFT_INSPECT_BUILD=directory\containing\swift-inspect.exe
940947

941-
:: Package cli.msi
942-
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\cli\cli.wixproj ^
943-
-restore ^
944-
-p:Configuration=Release ^
945-
-p:BaseOutputPath=%PackageRoot%\cli\ ^
946-
-p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
947-
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain
948948
:: TODO(compnerd) actually perform the code-signing
949-
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\cli\cli.msi
949+
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\installer\installer.exe
950950

951-
:: Package dbg.msi
952-
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\dbg\dbg.wixproj ^
953-
-restore ^
954-
-p:Configuration=Release ^
955-
-p:BaseOutputPath=%PackageRoot%\dbg\ ^
956-
-p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
957-
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain
958-
:: TODO(compnerd) actually perform the code-signing
959-
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\dbg\dbg.msi
960951

961-
:: Package ide.msi
962-
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\ide\ide.wixproj ^
952+
:: Build offline bundle
953+
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\bundle\installer.wixproj ^
954+
-m ^
963955
-restore ^
956+
-p:BundleFlavor=offline ^
964957
-p:Configuration=Release ^
965-
-p:BaseOutputPath=%PackageRoot%\ide\ ^
958+
-p:BaseOutputPath=%PackageRoot%\offline\ ^
966959
-p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
967-
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain
968-
:: TODO(compnerd) actually perform the code-signing
969-
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\ide\ide.msi
970-
971-
:: Package sdk.msi
972-
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\sdk\sdk.wixproj ^
973-
-restore ^
974-
-p:Configuration=Release ^
975-
-p:BaseOutputPath=%PackageRoot%\sdk\ ^
960+
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
976961
-p:PLATFORM_ROOT=%PlatformRoot%\ ^
977962
-p:SDK_ROOT=%SDKInstallRoot%\
978-
:: TODO(compnerd) actually perform the code-signing
979-
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\sdk\sdk.msi
963+
::-p:INCLUDE_SWIFT_FORMAT=true
964+
::-p:SWIFT_FORMAT_BUILD=directory\containing\swift-format.exe
965+
::-p:INCLUDE_SWIFT_INSPECT=true
966+
::-p:SWIFT_INSPECT_BUILD=directory\containing\swift-inspect.exe
980967

981-
:: Package runtime.msi
982-
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\runtimemsi\runtimemsi.wixproj ^
983-
-restore ^
984-
-p:Configuration=Release ^
985-
-p:BaseOutputPath=%PackageRoot%\runtime\ ^
986-
-p:SDK_ROOT=%SDKInstallRoot%\
987-
:: TODO(compnerd) actually perform the code-signing
988-
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\runtime\runtime.msi
989-
990-
:: Collate MSIs
991-
move %PackageRoot%\bld\Release\amd64\bld.msi %PackageRoot% || (exit /b)
992-
move %PackageRoot%\cli\Release\amd64\cli.msi %PackageRoot% || (exit /b)
993-
move %PackageRoot%\dbg\Release\amd64\dbg.msi %PackageRoot% || (exit /b)
994-
move %PackageRoot%\ide\Release\amd64\ide.msi %PackageRoot% || (exit /b)
995-
move %PackageRoot%\sdk\Release\amd64\sdk.msi %PackageRoot% || (exit /b)
996-
move %PackageRoot%\runtime\Release\amd64\runtime.msi %PackageRoot% || (exit /b)
997-
998-
:: Build Installer
999-
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\bundle\installer.wixproj ^
1000-
-restore ^
1001-
-p:Configuration=Release ^
1002-
-p:BaseOutputPath=%PackageRoot%\installer\ ^
1003-
-p:MSI_LOCATION=%PackageRoot%\
1004968
:: TODO(compnerd) actually perform the code-signing
1005969
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\installer\installer.exe
1006970

971+
1007972
:: Stage Artifacts
1008973
md %BuildRoot%\artifacts
974+
md %BuildRoot%\artifacts\web
975+
md %BuildRoot%\artifacts\offline
976+
977+
move %PackageRoot%\web\Release\amd64\*.exe %BuildRoot%\artifacts\web || (exit /b)
978+
move %PackageRoot%\web\Release\amd64\*.msi %BuildRoot%\artifacts\web || (exit /b)
979+
move %PackageRoot%\web\Release\amd64\*.cab %BuildRoot%\artifacts\web || (exit /b)
980+
981+
move %PackageRoot%\offline\Release\amd64\*.exe %BuildRoot%\artifacts\offline || (exit /b)
1009982

1010-
:: Redistributable libraries for developers
1011-
:: bld
1012-
move %PackageRoot%\bld.msi %BuildRoot%\artifacts || (exit /b)
1013-
:: cli
1014-
move %PackageRoot%\cli.msi %BuildRoot%\artifacts || (exit /b)
1015-
:: dbg
1016-
move %PackageRoot%\dbg.msi %BuildRoot%\artifacts || (exit /b)
1017-
:: ide
1018-
move %PackageRoot%\ide.msi %BuildRoot%\artifacts || (exit /b)
1019-
:: sdk
1020-
move %PackageRoot%\sdk.msi %BuildRoot%\artifacts || (exit /b)
1021-
:: runtime
1022-
move %PackageRoot%\runtime.msi %BuildRoot%\artifacts || (exit /b)
1023-
:: installer
1024-
move %PackageRoot%\installer\Release\amd64\installer.exe %BuildRoot%\artifacts || (exit /b)
1025983

1026984
goto :eof
1027985
endlocal

0 commit comments

Comments
 (0)