-
Notifications
You must be signed in to change notification settings - Fork 546
[One .NET] temporary Windows & macOS installers for .NET 6 #5225
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
[One .NET] temporary Windows & macOS installers for .NET 6 #5225
Conversation
27de15b
to
3c5705d
Compare
bd4bf60
to
5d50755
Compare
8dc9a8b
to
ce824db
Compare
...Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/GenerateWixFile.cs
Show resolved
Hide resolved
Why? Why not "extend" |
Yes, it builds all three now. We can only build the |
Language="1033" | ||
Version="@MSIVERSION@" | ||
Manufacturer="Microsoft" | ||
UpgradeCode="86a83cc9-6b75-489f-be10-27988df907c6"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where'd this value come from, if anywhere? What's it used for?
We might need links to relevant WiX docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Guid that is a unique identifier for the MSI, best docs I can find:
https://docs.microsoft.com/windows/win32/msi/upgradecode
I created this file originally from a File -> New WIX Setup Project in Visual Studio, and it generates a Guid for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add an XML comment to the .wix.in
file mentioning this, or leave it in the commit message?
<!--
DO NOT CHANGE UpgradeCode; see https://docs.microsoft.com/windows/win32/msi/upgradecode
-->
<Product Name=…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the commit message is fine, I doubt we will change .wix.in
much once it is working?
Manufacturer="Microsoft" | ||
UpgradeCode="86a83cc9-6b75-489f-be10-27988df907c6"> | ||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" /> | ||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ProductName]
? Is that replaced by WiX?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathanpeppers Right now you're using AndroidMSIVersion
for the MSI version but this will be problematic for MSI upgrades the way you have it right now since Windows installer only takes the first three parts of a version number into account (https://docs.microsoft.com/en-us/windows/win32/msi/upgrade-table):
Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field.
If you want to support upgrading to an .msi where only the fourth field changed then you need to set AllowSameVersionUpgrades="yes"
on the <MajorUpgrade>
node in the Wix source: https://wixtoolset.org/documentation/manual/v3/xsd/wix/majorupgrade.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And to answer the initial question, yes this placeholder gets replaced by the MSI product name and shows in an error message when you try to downgrade from a later version to an earlier version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akoeplinger adding AllowSameVersionUpgrades="yes"
causes a warning during the build now:
warning LGHT1076: ICE61: This product should remove only older versions of itself. The Maximum version is not less than the current product. (11.0.100.205 11.0.100.205)
Is there some other "maximum version" I should also set?
It's kind of hard to find info on WIX, but some are saying you will always get this warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After more reading, I think AllowSameVersionUpgrades="yes"
and suppressing the ICE61 warning is the way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that's we do in Mono, we suppress ICE61: https://github.com/mono/mono/blob/c5b88ec4f323f2bdb7c7d0a595ece28dae66579c/packaging/Windows/resources/MonoForWindows.wixproj#L12
3d4a0ed
to
3c75253
Compare
c2c76cb
to
43eef00
Compare
Depends on: dotnet#5195 For .NET 6 Preview 1, we will need to provide our own installers for the Android workload. This will also unblock the Xamarin.Forms / MAUI team as they build on top of the iOS and Android workloads for .NET 6. We will eventually do some kind of "insertion" process to provide our `.nupkg` files to the dotnet/installer repo, so these installers will go away completely at some point. For now, this creates two new installers: * Microsoft.Android.Workload.msi - installs to `C:\Program Files\dotnet\` * Microsoft.Android.Workload.pkg - installs to `/usr/local/share/dotnet/` Both installers have the following file structure underneath the root directory: * sdk\5.0.100-rtm.20509.5\EnableWorkloadResolver.sentinel * sdk-manifests\5.0.100\Microsoft.Android.Workload\** * packs\Microsoft.Android.Ref\** * packs\Microsoft.Android.Sdk\** The installers will have a hard dependency on .NET 5.0.100-rtm.20509.5, so we will need to have clear instructions for installing the correct version of .NET for the Android workload. The Windows installer is made using WIX, to mirror what dotnet/installer is using: * https://wixtoolset.org/ * https://github.com/dotnet/installer/blob/861a1dd12cb80bd834d0e51442d46ee7d1a4023f/src/redist/targets/GenerateMSIs.targets The `.msi` will need to be built on Windows and the `.pkg` will need to be built on macOS. `create-dotnet-msi.csproj` will download the WIX toolset to `~\android-toolchain\wix` and call `candle.exe` and `light.exe` appropriately. `create-dotnet-pkg.csproj` is based on `create-pkg.csproj`, and no additional tooling is needed. Changes to CI: * The `create-installers` make target now creates the .NET 6 `.pkg` installer. The `mac_build` stage creates one additional installer. * Any subsequent stages that download the `installers` artifact, now use a wildcard for the installer they need. This will improve some of the test stages that were downloading both the `.vsix` and `.pkg` installers before. * A `.NET 6 Preview Installers` Github status will appear that contains public download links for the new installers. * A `Build Results - .NET 6 Preview Installers` artifact will contain additional build logs.
43eef00
to
efe88a5
Compare
@@ -103,8 +103,8 @@ stages: | |||
displayName: make jenkins | |||
|
|||
- script: > | |||
echo "make create-installers V=1 CONFIGURATION=$(XA.Build.Configuration)" && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to continue calling make create-installers
, so that the new make create-workload-installers
target is executed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…or do we not want to create a Workload installer for the OSS pipeline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would have to add commands to create the .nupkg
files for create-installers
to work on the OSS pipeline. I would also have to make a Windows stage to create the .msi
.
I thought it was simpler to not create these installers on the OSS pipeline for now. But if we have a need, we could?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also have to make a Windows stage to create the
.msi
.
We don't have a Windows stage OSS build (but perhaps we should?), so I don't think this would be needed.
I'm largely "just pondering" the community engagement angle. Is there a reason to not provide "OSS-blessed" packages, and/or ensure that the OSS tree can produce the .nupkg
files?
That said, it might very well fail now, as the .nupkg
files likely pulls in proprietary files, so this should be done as a separate PR, if ever.
For .NET 6 Preview 1, we will need to provide our own installers for
the Android workload. This will also unblock the Xamarin.Forms / MAUI
team as they build on top of the iOS and Android workloads for .NET 6.
We will eventually do some kind of "insertion" process to provide our
.nupkg
files to the dotnet/installer repo, so these installers willgo away completely at some point.
For now, this creates two new installers:
C:\Program Files\dotnet\
/usr/local/share/dotnet/
Both installers have the following file structure underneath the root
directory:
The installers will have a hard dependency on .NET
5.0.100-rtm.20509.5, so we will need to have clear instructions for
installing the correct version of .NET for the Android workload.
The Windows installer is made using WIX, to mirror what
dotnet/installer is using:
The
.msi
will need to be built on Windows and the.pkg
will needto be built on macOS.
create-dotnet-msi.csproj
will download the WIXtoolset to
~\android-toolchain\wix
and callcandle.exe
andlight.exe
appropriately.create-dotnet-pkg.csproj
is based oncreate-pkg.csproj
, and no additional tooling is needed.Changes to CI:
create-installers
make target now creates the .NET 6.pkg
installer. The
mac_build
stage creates one additional installer.installers
artifact, nowuse a wildcard for the installer they need. This will improve some
of the test stages that were downloading both the
.vsix
and.pkg
installers before.
.NET 6 Preview Installers
Github status will appear thatcontains public download links for the new installers.
Build Results - .NET 6 Preview Installers
artifact will containadditional build logs.