Skip to content

Commit

Permalink
Improve build process and publish all as single file applications.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter-Simpson committed Nov 27, 2022
1 parent 84c9d38 commit 9e5fe9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Setup/ConformU.iss
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ Source: "J:\ConformU\publish\ConformU64\*.dll"; DestDir: "{app}"; Flags: ignorev
Source: "J:\ConformU\publish\ConformU64\*"; DestDir: "{app}"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: Is64BitInstallMode
Source: "J:\ConformU\publish\ConformU64\wwwroot\*"; DestDir: "{app}\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode

Source: "J:\ConformU\publish\ConformU86\*.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: Is64BitInstallMode
Source: "J:\ConformU\publish\ConformU86\*.dll"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: Is64BitInstallMode
Source: "J:\ConformU\publish\ConformU86\*"; DestDir: "{app}"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: Is64BitInstallMode
Source: "J:\ConformU\publish\ConformU86\wwwroot\*"; DestDir: "{app}\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode
Source: "J:\ConformU\publish\ConformU86\*.exe"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: not Is64BitInstallMode
Source: "J:\ConformU\publish\ConformU86\*.dll"; DestDir: "{app}"; Flags: ignoreversion signonce; Check: not Is64BitInstallMode
Source: "J:\ConformU\publish\ConformU86\*"; DestDir: "{app}"; Flags: ignoreversion; Excludes:"*.exe,*.dll"; Check: not Is64BitInstallMode
Source: "J:\ConformU\publish\ConformU86\wwwroot\*"; DestDir: "{app}\wwwroot"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: not Is64BitInstallMode

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

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

echo *** Signing Windows 64bit
rem signtool sign /a /as /v /fd SHA256 /tr http://time.certum.pl /td SHA256 "publish\ConformU64\*.dll"
rem signtool sign /a /as /fd SHA256 /tr http://time.certum.pl /td SHA256 "publish\ConformU64\*.exe"
echo ***Completed 64bit signing

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

echo *** Signing Windows 32bit
rem signtool sign /a /as /v /fd SHA256 /tr http://time.certum.pl /td SHA256 "publish\ConformU86\*.dll"
rem signtool sign /a /as /fd SHA256 /tr http://time.certum.pl /td SHA256 "publish\ConformU86\*.exe"
echo *** Completed 32bit signing

echo *** Creating Windows installer
cd setup
"C:\Program Files (x86)\Inno Script Studio\isstudio.exe" -compile "J:\ConformU\Setup\ConformU.iss"
Expand All @@ -47,17 +37,17 @@ bsdtar -cJf publish/conformu.macos-arm64.tar.xz -C publish\conformu.macos-arm64\
echo *** Completed MacOS Apple silicon

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

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

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

Expand Down

0 comments on commit 9e5fe9e

Please sign in to comment.