Skip to content

build: adjust the paths for the runtime MSI packaging rules #67961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 26 additions & 80 deletions utils/build-windows-toolchain.bat
Original file line number Diff line number Diff line change
Expand Up @@ -928,100 +928,46 @@ endlocal
:PackageToolchain
setlocal enableextensions enabledelayedexpansion

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

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

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

:: Package ide.msi
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\ide\ide.wixproj ^
:: Package Online Installer
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\bundle\installer.wixproj ^
-m ^
-restore ^
-p:BundleFlavor=online ^
-p:BaseReleaseDownloadUrl=https://download.swift.org/development/windows ^
-p:Configuration=Release ^
-p:BaseOutputPath=%PackageRoot%\ide\ ^
-p:BaseOutputPath=%PackageRoot%\online\ ^
-p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain
:: TODO(compnerd) actually perform the code-signing
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\ide\ide.msi

:: Package sdk.msi
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\sdk\sdk.wixproj ^
-restore ^
-p:Configuration=Release ^
-p:BaseOutputPath=%PackageRoot%\sdk\ ^
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
-p:PLATFORM_ROOT=%PlatformRoot%\ ^
-p:SDK_ROOT=%SDKInstallRoot%\
:: TODO(compnerd) actually perform the code-signing
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\sdk\sdk.msi
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\online\installer.exe

:: Package runtime.msi
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\runtimemsi\runtimemsi.wixproj ^
-restore ^
-p:Configuration=Release ^
-p:BaseOutputPath=%PackageRoot%\runtime\ ^
-p:SDK_ROOT=%SDKInstallRoot%\
:: TODO(compnerd) actually perform the code-signing
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\runtime\runtime.msi

:: Collate MSIs
move %PackageRoot%\bld\Release\amd64\bld.msi %PackageRoot% || (exit /b)
move %PackageRoot%\cli\Release\amd64\cli.msi %PackageRoot% || (exit /b)
move %PackageRoot%\dbg\Release\amd64\dbg.msi %PackageRoot% || (exit /b)
move %PackageRoot%\ide\Release\amd64\ide.msi %PackageRoot% || (exit /b)
move %PackageRoot%\sdk\Release\amd64\sdk.msi %PackageRoot% || (exit /b)
move %PackageRoot%\runtime\Release\amd64\runtime.msi %PackageRoot% || (exit /b)

:: Build Installer
:: Package Offline Installer
msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\bundle\installer.wixproj ^
-m ^
-restore ^
-p:BundleFlavor=offline ^
-p:Configuration=Release ^
-p:BaseOutputPath=%PackageRoot%\installer\ ^
-p:MSI_LOCATION=%PackageRoot%\
-p:BaseOutputPath=%PackageRoot%\offline\ ^
-p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
-p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^
-p:PLATFORM_ROOT=%PlatformRoot%\ ^
-p:SDK_ROOT=%SDKInstallRoot%\
:: TODO(compnerd) actually perform the code-signing
:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\installer\installer.exe

:: Stage Artifacts
md %BuildRoot%\artifacts

:: Redistributable libraries for developers
:: bld
move %PackageRoot%\bld.msi %BuildRoot%\artifacts || (exit /b)
:: cli
move %PackageRoot%\cli.msi %BuildRoot%\artifacts || (exit /b)
:: dbg
move %PackageRoot%\dbg.msi %BuildRoot%\artifacts || (exit /b)
:: ide
move %PackageRoot%\ide.msi %BuildRoot%\artifacts || (exit /b)
:: sdk
move %PackageRoot%\sdk.msi %BuildRoot%\artifacts || (exit /b)
:: runtime
move %PackageRoot%\runtime.msi %BuildRoot%\artifacts || (exit /b)
:: installer
move %PackageRoot%\installer\Release\amd64\installer.exe %BuildRoot%\artifacts || (exit /b)
md %BuildRoot%\artifacts\online
md %BuildRoot%\artifacts\offline

move %PackageRoot%\offline\Release\amd64\installer.exe %BuildRoot%\artifacts\offline || (exit /b)
move %PackageRoot%\online\Release\amd64\*.cab %BuildRoot%\artifacts\online\ || (exit /b)
move %PackageRoot%\online\Release\amd64\*.exe %BuildRoot%\artifacts\online\ || (exit /b)
move %PackageRoot%\online\Release\amd64\*.msi %BuildRoot%\artifacts\online\ || (exit /b)

:: Workaround for lack of control over Jenkins ...
copy %BuildRoot%\artifacts\offline\installer.exe %BuildRoot%\artifacts\

goto :eof
endlocal
Expand Down