-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add support for Windows x64 and arm64 builds #2230
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,19 @@ | ||
| <Project> | ||
| <Project> | ||
| <!-- Implicit SDK props import --> | ||
| <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
|
|
||
| <!-- Default RuntimeIdentifier to the host architecture if not specified --> | ||
| <PropertyGroup Condition="'$(RuntimeIdentifier)' == ''"> | ||
| <RuntimeIdentifier Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">win-x64</RuntimeIdentifier> | ||
| <RuntimeIdentifier Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X86'">win-x86</RuntimeIdentifier> | ||
| <RuntimeIdentifier Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">win-arm64</RuntimeIdentifier> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net472</TargetFramework> | ||
| <GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
| <EnableDefaultItems>false</EnableDefaultItems> | ||
| <PayloadPath>$(PlatformOutPath)Installer.Windows\bin\$(Configuration)\net472\win-x86</PayloadPath> | ||
| <PayloadPath>$(PlatformOutPath)Installer.Windows\bin\$(Configuration)\net472\$(RuntimeIdentifier)</PayloadPath> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
The other 'Installer/Packacing' projects for macOS/Linux don't do much except shell out to a shell script that dynamically computes the current host's RID when it's not specified. We can probably do some MSBuild fun with properties and discovering the current host's arch if RID has not been explicitly specified. OR.. mimic the macOS/Linux implementations and create some layout.ps1 and pack.ps1 scripts; not relying on project-project dependencies to build the PayloadPath contents.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great catch, thank you! I just updated the implementation to default to the host architecture if a |
||
| <InnoSetupVersion>6.3.1</InnoSetupVersion> | ||
| </PropertyGroup> | ||
|
|
||
|
|
@@ -27,12 +34,20 @@ | |
|
|
||
| <Target Name="CoreCompile" Condition="'$(OSPlatform)'=='windows'"> | ||
| <PropertyGroup> | ||
| <InnoSetupCommandSystem>"$(NuGetPackageRoot)Tools.InnoSetup\$(InnoSetupVersion)\tools\ISCC.exe" /DPayloadDir="$(PayloadPath)" /DInstallTarget=system "$(RepoSrcPath)\windows\Installer.Windows\Setup.iss" /O"$(OutputPath)"</InnoSetupCommandSystem> | ||
| <InnoSetupCommandUser>"$(NuGetPackageRoot)Tools.InnoSetup\$(InnoSetupVersion)\tools\ISCC.exe" /DPayloadDir="$(PayloadPath)" /DInstallTarget=user "$(RepoSrcPath)\windows\Installer.Windows\Setup.iss" /O"$(OutputPath)"</InnoSetupCommandUser> | ||
| <InnoSetupCommandSystem>"$(NuGetPackageRoot)Tools.InnoSetup\$(InnoSetupVersion)\tools\ISCC.exe" /DPayloadDir="$(PayloadPath)" /DInstallTarget=system /DGcmRuntimeIdentifier="$(RuntimeIdentifier)" "$(RepoSrcPath)\windows\Installer.Windows\Setup.iss" /O"$(OutputPath)"</InnoSetupCommandSystem> | ||
| <InnoSetupCommandUser>"$(NuGetPackageRoot)Tools.InnoSetup\$(InnoSetupVersion)\tools\ISCC.exe" /DPayloadDir="$(PayloadPath)" /DInstallTarget=user /DGcmRuntimeIdentifier="$(RuntimeIdentifier)" "$(RepoSrcPath)\windows\Installer.Windows\Setup.iss" /O"$(OutputPath)"</InnoSetupCommandUser> | ||
| </PropertyGroup> | ||
|
|
||
| <Message Text="Lay Out" Importance="High" /> | ||
| <Exec Condition="'$(NoLayout)'!='true'" Command="powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -Command "& {&'$(MSBuildProjectDirectory)\layout.ps1' -Configuration '$(Configuration)' -Output '$(PayloadPath)'}"" /> | ||
| <Exec Condition="'$(NoLayout)'!='true'" | ||
| ConsoleToMSBuild="true" | ||
| Command="powershell.exe –NonInteractive –ExecutionPolicy Unrestricted -Command "& {&'$(MSBuildProjectDirectory)\layout.ps1' -Configuration '$(Configuration)' -Output '$(PayloadPath)' -RuntimeIdentifier '$(RuntimeIdentifier)'; if ($?) { exit 0 } else { exit 1 }}"" | ||
| IgnoreExitCode="true"> | ||
| <!-- If we want to display the console output if the exit code is not 0, we need to capture it and then output it using the <Error /> below --> | ||
| <Output TaskParameter="ExitCode" PropertyName="ExitCodeOfExec" /> | ||
| <Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" /> | ||
| </Exec> | ||
| <Error Condition="'$(NoLayout)'!='true' AND '$(ExitCodeOfExec)' != '0'" Text="Layout script failed with exit code $(ExitCodeOfExec) and message $(OutputOfExec)" /> | ||
| <Message Text="$(InnoSetupCommandSystem)" Importance="High" /> | ||
| <Exec Command="$(InnoSetupCommandSystem)" /> | ||
| <Message Text="$(InnoSetupCommandUser)" Importance="High" /> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.