Skip to content

Commit

Permalink
Fixed ARM64 installer issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Apr 11, 2023
1 parent 07fb073 commit e3af05a
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 26 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ T4MVC.cs
/Setup/Files64.wxs
/Setup/Files86.wxs
/Setup/FilesARM64.wxs
Setup/Components.wxi
Setup/Paths.wxi
4 changes: 4 additions & 0 deletions Setup/Components64.wxi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
<ComponentGroupRef Id="Files64" />
</Include>
4 changes: 4 additions & 0 deletions Setup/Components86.wxi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
<ComponentGroupRef Id="Files86" />
</Include>
4 changes: 4 additions & 0 deletions Setup/ComponentsARM64.wxi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
<ComponentGroupRef Id="FilesARM64" />
</Include>
14 changes: 11 additions & 3 deletions Setup/JexusManager.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
<Compile Include="Files86.wxs" />
<Compile Include="Files64.wxs" />
<Compile Include="FilesARM64.wsx" />
<Compile Condition=" '$(Platform)' == 'x86' " Include="Files86.wxs" />
<Compile Condition=" '$(Platform)' == 'x64' " Include="Files64.wxs" />
<Compile Condition=" '$(Platform)' == 'ARM64' " Include="FilesARM64.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
Expand All @@ -70,6 +70,14 @@
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<Target Name="BeforeBuild">
<Exec Command="copy /Y Components86.wxi Components.wxi" Condition=" '$(Platform)' == 'x86' " />
<Exec Command="copy /Y Paths86.wxi Paths.wxi" Condition=" '$(Platform)' == 'x86' " />
<Exec Command="copy /Y Components64.wxi Components.wxi" Condition=" '$(Platform)' == 'x64' " />
<Exec Command="copy /Y Paths64.wxi Paths.wxi" Condition=" '$(Platform)' == 'x64' " />
<Exec Command="copy /Y ComponentsARM64.wxi Components.wxi" Condition=" '$(Platform)' == 'ARM64' " />
<Exec Command="copy /Y PathsARM64.wxi Paths.wxi" Condition=" '$(Platform)' == 'ARM64' " />
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
Expand Down
4 changes: 4 additions & 0 deletions Setup/OS.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<Condition Message="!(loc.Windows64Required)">
<![CDATA[Installed OR VersionNT64]]>
</Condition>
<?elif $(var.Platform) = arm64 ?>
<Condition Message="!(loc.Windows64Required)">
<![CDATA[Installed OR (VersionNT64 AND PROCESSOR_ARCHITECTURE = ARM64)]]>
</Condition>
<?else?>
<Condition Message="!(loc.Windows32Required)">
<![CDATA[Installed OR not VersionNT64]]>
Expand Down
5 changes: 5 additions & 0 deletions Setup/Paths64.wxi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define PlatformProgramFilesFolder="ProgramFiles64Folder" ?>
<?define SourceDir=..\bin\x64?>
</Include>
5 changes: 5 additions & 0 deletions Setup/Paths86.wxi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define PlatformProgramFilesFolder="ProgramFilesFolder" ?>
<?define SourceDir=..\bin\x86?>
</Include>
5 changes: 5 additions & 0 deletions Setup/PathsARM64.wxi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define PlatformProgramFilesFolder="ProgramFiles64Folder" ?>
<?define SourceDir=..\bin\arm64?>
</Include>
9 changes: 2 additions & 7 deletions Setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<?include "Variables.wxi" ?>
<?include "Paths.wxi" ?>

<Product Id="*"
Name="$(var.ProductName) $(var.ProductVersion)"
Expand Down Expand Up @@ -48,13 +49,7 @@
ConfigurableDirectory="INSTALLDIR">

<!-- Files installed -->
<?if $(var.Platform) = x64 ?>
<ComponentGroupRef Id="Files64" />
<?elif $(var.Platform) = arm64 ?>
<ComponentGroupRef Id="FilesARM64" />
<?else ?>
<ComponentGroupRef Id="Files86" />
<?endif ?>
<?include "Components.wxi" ?>
<ComponentRef Id="ProgramMenuItems" />
<ComponentRef Id="MainExecutable" />
</Feature>
Expand Down
11 changes: 0 additions & 11 deletions Setup/Variables.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@
<?define Manufacturer="!(loc.Manufacturer)"?>
<?define ProductDescription="!(loc.ProductDescription)"?>

<?if $(var.Platform) = x64 ?>
<?define PlatformProgramFilesFolder="ProgramFiles64Folder" ?>
<?define SourceDir=..\bin\x64?>
<?elif $(var.Platform) = arm64 ?>
<?define PlatformProgramFilesFolder="ProgramFiles64Folder" ?>
<?define SourceDir=..\bin\arm64?>
<?else ?>
<?define PlatformProgramFilesFolder="ProgramFilesFolder" ?>
<?define SourceDir=..\bin\x86?>
<?endif ?>

<?define Icon="iis.ico" ?>
<?define MinimalVersion="12.0.0" ?>

Expand Down
10 changes: 5 additions & 5 deletions build.installer.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
del bin\Release\en-us\JexusManager.msi
%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild .\Setup\JexusManager.wixproj /t:Rebuild /property:Configuration=Release /property:Platform=x86
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild .\Setup\JexusManager.wixproj /t:Rebuild /property:Configuration=Release /property:Platform=arm64
copy bin\Release\en-us\JexusManager.msi .\JexusManager_arm64.msi
del bin\Release\en-us\JexusManager.msi
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild .\Setup\JexusManager.wixproj /t:Rebuild /property:Configuration=Release /property:Platform=x86
copy bin\Release\en-us\JexusManager.msi .\JexusManager_x86.msi
del bin\Release\en-us\JexusManager.msi
%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild .\Setup\JexusManager.wixproj /t:Rebuild /property:Configuration=Release /property:Platform=x64
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild .\Setup\JexusManager.wixproj /t:Rebuild /property:Configuration=Release /property:Platform=x64
copy bin\Release\en-us\JexusManager.msi .\JexusManager_x64.msi
del bin\Release\en-us\JexusManager.msi
%WINDIR%\Microsoft.NET\Framework\v3.5\msbuild .\Setup\JexusManager.wixproj /t:Rebuild /property:Configuration=Release /property:Platform=ARM64
copy bin\Release\en-us\JexusManager.msi .\JexusManager_arm64.msi

0 comments on commit e3af05a

Please sign in to comment.