Skip to content

Windows: add build scripts for the installer #18

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 1 commit into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
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
Binary file added platforms/Windows/Resources/swift.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions platforms/Windows/installer.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup>

<PropertyGroup>
<OutputName>installer</OutputName>
<OutputType>Bundle</OutputType>
<ProjectGuid>8ae3ad4d-2df4-42b7-890e-decdd5cead0b</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<ProductVersion Condition=" '$(ProductVersion)' == '' ">0.0.0</ProductVersion>
<ProductVersion>$(ProductVersion)</ProductVersion>
</PropertyGroup>

<PropertyGroup>
<OutputPath>build\</OutputPath>
<IntermediateOutputPath>build\obj\</IntermediateOutputPath>
<DefineSolutionProperties>false</DefineSolutionProperties>
</PropertyGroup>

<Import Project="$(WixTargetsPath)" />

<PropertyGroup>
<DefineConstants>ProductVersion=$(ProductVersion);MSI_LOCATION=$(MSI_LOCATION);</DefineConstants>
</PropertyGroup>

<ItemGroup>
<WixExtension Include="WixBalExtension">
<HintPath>$(WixExtDir)\WixBalExtension.dll</HintPath>
<Name>WixBalExtension</Name>
</WixExtension>
</ItemGroup>

<ItemGroup>
<Compile Include="installer.wxs" />
</ItemGroup>
</Project>
18 changes: 18 additions & 0 deletions platforms/Windows/installer.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Swift" Version="$(var.ProductVersion)" Manufacturer="swift.org" UpgradeCode="8c75f32a-7bdf-4c61-abf6-c7e1c4b8fbf6">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="" LogoFile="Resources/swift.png" SuppressOptionsUI="yes" SuppressRepair="no" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resources/swift.png

Where is this image comping from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I yanked it from swift.org

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should mention that if you have a better way to get the project logo, I'm happy to use that, I don't really have any issue with adjusting the content.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the Resources directory located, is it in swift-installer-scripts repo or another location?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in the same repository, it is being created as part of this commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://developer.apple.com/swift/resources/ at the bottom of the page it contains logos.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to use svg format?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, thats where I originally grabbed the image from. I don't think that the SVG format works for this, which is why I have the png.

</BootstrapperApplicationRef>

<Chain>
<MsiPackage SourceFile="$(var.MSI_LOCATION)\toolchain.msi" Compressed="yes">
<MsiProperty Name="INSTALL_DEBUGINFO" Value="[INSTALL_DEBUGINFO]" />
</MsiPackage>
<MsiPackage SourceFile="$(var.MSI_LOCATION)\sdk.msi" Compressed="yes" />
<MsiPackage SourceFile="$(var.MSI_LOCATION)\devtools.msi" Compressed="yes" />
<MsiPackage SourceFile="$(var.MSI_LOCATION)\runtime.msi" Compressed="yes" />
<MsiPackage SourceFile="$(var.MSI_LOCATION)\icu.msi" Compressed="yes" />
</Chain>
</Bundle>
</Wix>