Skip to content

Commit

Permalink
Fix bugs introduced when adding support for Windows ARM64.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-Simpson committed Jan 11, 2024
1 parent 5b633e9 commit e8effdc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
42 changes: 24 additions & 18 deletions Setup/ConformU.iss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ AppSupportURL={#MyAppSupportURL}
AppUpdatesURL={#MyAppUpdatesURL}
AppVerName={#MyAppName}
AppVersion={#MyAppVersion}
ArchitecturesInstallIn64BitMode=x64
ArchitecturesInstallIn64BitMode=x64 arm64
Compression=lzma2/max
DefaultDirName={autopf}\ASCOM\ConformU
DefaultGroupName=ASCOMConformUniversal
Expand Down Expand Up @@ -96,23 +96,29 @@ Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"

[Files]
; 64bit OS - Install the 64bit app
Source: "..\publish\ConformU64\*.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: Is64BitInstallMode
Source: "..\publish\ConformU64\*.dll"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: Is64BitInstallMode
Source: "..\publish\ConformU64\*"; DestDir: "{app}"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: Is64BitInstallMode
Source: "..\publish\ConformU64\wwwroot\*"; DestDir: "{app}\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode

; 64bit OS - Install the 32bit app
Source: "..\publish\ConformU86\*.exe"; DestDir: "{app}\32bit"; Flags: ignoreversion signonce; Check: Is64BitInstallMode
Source: "..\publish\ConformU86\*.dll"; DestDir: "{app}\32bit"; Flags: ignoreversion signonce; Check: Is64BitInstallMode
Source: "..\publish\ConformU86\*"; DestDir: "{app}\32bit"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: Is64BitInstallMode
Source: "..\publish\ConformU86\wwwroot\*"; DestDir: "{app}\32bit\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode

; 32bit OS - Install the 32bit app
Source: "..\publish\ConformU86\*.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: not Is64BitInstallMode
Source: "..\publish\ConformU86\*.dll"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: not Is64BitInstallMode
Source: "..\publish\ConformU86\*"; DestDir: "{app}"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: not Is64BitInstallMode
Source: "..\publish\ConformU86\wwwroot\*"; DestDir: "{app}\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: not Is64BitInstallMode
; ARM 64bit OS - Install the 64bit app
Source: "..\publish\ConformUArm64\*.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: Is64BitInstallMode and IsARM64
Source: "..\publish\ConformUArm64\*.dll"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: Is64BitInstallMode and IsARM64
Source: "..\publish\ConformUArm64\*"; DestDir: "{app}"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: Is64BitInstallMode and IsARM64
Source: "..\publish\ConformUArm64\wwwroot\*"; DestDir: "{app}\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode and IsARM64

; Intel 64bit OS - Install the 64bit app
Source: "..\publish\ConformUx64\*.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: Is64BitInstallMode and IsX64
Source: "..\publish\ConformUx64\*.dll"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: Is64BitInstallMode and IsX64
Source: "..\publish\ConformUx64\*"; DestDir: "{app}"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: Is64BitInstallMode and IsX64
Source: "..\publish\ConformUx64\wwwroot\*"; DestDir: "{app}\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode and IsX64

; Intel 64bit OS - Install the 32bit app
Source: "..\publish\ConformUx86\*.exe"; DestDir: "{app}\32bit"; Flags: ignoreversion signonce; Check: Is64BitInstallMode
Source: "..\publish\ConformUx86\*.dll"; DestDir: "{app}\32bit"; Flags: ignoreversion signonce; Check: Is64BitInstallMode
Source: "..\publish\ConformUx86\*"; DestDir: "{app}\32bit"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: Is64BitInstallMode
Source: "..\publish\ConformUx86\wwwroot\*"; DestDir: "{app}\32bit\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode

; Intel 32bit OS - Install the 32bit app
Source: "..\publish\ConformUx86\*.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: IsX86 and not Is64BitInstallMode
Source: "..\publish\ConformUx86\*.dll"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: IsX86 and not Is64BitInstallMode
Source: "..\publish\ConformUx86\*"; DestDir: "{app}"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: IsX86 and not Is64BitInstallMode
Source: "..\publish\ConformUx86\wwwroot\*"; DestDir: "{app}\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: IsX86 and not Is64BitInstallMode

[Icons]
Name: "{autoprograms}\ASCOM Conform Universal"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\ASCOM.ico"
Expand Down
20 changes: 10 additions & 10 deletions publish.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,43 @@ MSBuild ConformU.sln /p:Configuration=Debug /p:Platform="Any CPU" /t:Rebuild
echo *** Completed Build

echo *** Publishing MacOS Intel silicon
dotnet publish -c Debug -p:Platform="Any CPU" -r osx-x64 --framework net8.0 --self-contained true /p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRunShowWarnings=true
bsdtar -cJf publish/conformu.macos-x64.tar.xz -C ConformU\bin\Debug\net 8.0\osx-x64\publish\ *
dotnet publish -c Debug -p:Platform="Any CPU" -r osx-x64 --framework net8.0 --self-contained true /p:PublishTrimmed=false -p:PublishSingleFile=true -p:PublishReadyToRunShowWarnings=true
bsdtar -cJf publish/conformu.macos-x64.tar.xz -C ConformU\bin\Debug\net8.0\osx-x64\publish\ *
echo *** Completed MacOS Intel silicon

echo *** Publishing MacOS Apple silicon
dotnet publish -c Debug -p:Platform="Any CPU" -r osx-arm64 --framework net8.0 --self-contained true /p:PublishTrimmed=false -p:PublishSingleFile=true
bsdtar -cJf publish/conformu.macos-arm64.tar.xz -C ConformU\bin\Debug\net 8.0\osx-arm64\publish\ *
bsdtar -cJf publish/conformu.macos-arm64.tar.xz -C ConformU\bin\Debug\net8.0\osx-arm64\publish\ *
echo *** Completed MacOS Apple silicon

echo *** Publishing Linux ARM32
dotnet publish -c Debug /p:Platform="Any CPU" -r linux-arm --framework net8.0 --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true
bsdtar -cJf publish/conformu.linux-arm32.needsexec.tar.xz -C ConformU\bin\Debug\net 8.0\linux-arm\publish\ *
bsdtar -cJf publish/conformu.linux-arm32.needsexec.tar.xz -C ConformU\bin\Debug\net8.0\linux-arm\publish\ *
echo *** Completed Linux ARM32

echo *** Publishing Linux ARM64
dotnet publish -c Debug /p:Platform="Any CPU" -r linux-arm64 --framework net8.0 --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true
bsdtar -cJf publish/conformu.linux-arm64.needsexec.tar.xz -C ConformU\bin\Debug\net 8.0\linux-arm64\publish\ *
bsdtar -cJf publish/conformu.linux-arm64.needsexec.tar.xz -C ConformU\bin\Debug\net8.0\linux-arm64\publish\ *
echo *** Completed Linux ARM64

echo *** Publishing Linux X64
dotnet publish -c Debug /p:Platform="Any CPU" -r linux-x64 --framework net8.0 --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true
bsdtar -cJf publish/conformu.linux-x64.needsexec.tar.xz -C ConformU\bin\Debug\net 8.0\linux-x64\publish\ *
bsdtar -cJf publish/conformu.linux-x64.needsexec.tar.xz -C ConformU\bin\Debug\net8.0\linux-x64\publish\ *
echo *** Completed Linux X64

echo *** Publishing Windows ARM 64bit
dotnet publish ConformU/ConformU.csproj -c Debug /p:Platform="Any CPU" -r win-arm64 --framework net8.0-windows --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/ConformU64/
dotnet publish ConformU/ConformU.csproj -c Debug /p:Platform="Any CPU" -r win-arm64 --framework net8.0-windows --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/ConformUArm64/
echo *** Completed 64bit publish

echo *** Publishing Windows Intel 64bit
dotnet publish ConformU/ConformU.csproj -c Debug /p:Platform="Any CPU" -r win-x64 --framework net8.0-windows --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/ConformU64/
dotnet publish ConformU/ConformU.csproj -c Debug /p:Platform="Any CPU" -r win-x64 --framework net8.0-windows --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/ConformUx64/
echo *** Completed 64bit publish

echo *** Publishing Windows Intel 32bit
dotnet publish ConformU/ConformU.csproj -c Debug /p:Platform="Any CPU" -r win-x86 --framework net8.0-windows --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/ConformU86/
dotnet publish ConformU/ConformU.csproj -c Debug /p:Platform="Any CPU" -r win-x86 --framework net8.0-windows --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/ConformUx86/
echo *** Completed 32bit publish

editbin /LARGEADDRESSAWARE ./publish/ConformU86/Conformu.exe
editbin /LARGEADDRESSAWARE ./publish/ConformUx86/Conformu.exe
echo *** Completed setting large address aware flag on 32bit EXE

echo *** Creating Windows installer
Expand Down

0 comments on commit e8effdc

Please sign in to comment.