Skip to content

Commit

Permalink
Make GUI and CLI Windows exes single-file, update MSI accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
James A Sutherland committed Oct 16, 2023
1 parent 3fc6790 commit 89d2029
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 90 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ jobs:

- name: Package
run: |
dotnet publish Application/ResearchDataManagementPlatform/ResearchDataManagementPlatform.csproj -r win-x64 --self-contained -c Release -o PublishWinForms -p:GenerateDocumentationFile=false -p:PublishSingleFile=true -p:PublishReadyToRun=true --verbosity minimal --nologo
dotnet publish Tools/rdmp/rdmp.csproj -r win-x64 --self-contained -c Release -o PublishWindows -p:GenerateDocumentationFile=false -p:PublishSingleFile=true -p:PublishReadyToRun=true --verbosity minimal --nologo
dotnet publish Application/ResearchDataManagementPlatform/ResearchDataManagementPlatform.csproj -r win-x64 --self-contained -c Release -o PublishWinForms -p:GenerateDocumentationFile=false -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --verbosity minimal --nologo
dotnet publish Tools/rdmp/rdmp.csproj -r win-x64 --self-contained -c Release -o PublishWindows -p:GenerateDocumentationFile=false -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --verbosity minimal --nologo
dotnet publish Tools/rdmp/rdmp.csproj -r linux-x64 --self-contained -c Release -o PublishLinux -p:GenerateDocumentationFile=false -p:PublishSingleFile=true -p:PublishReadyToRun=true --verbosity minimal --nologo
- name: BundleSource
shell: bash
Expand All @@ -130,11 +130,11 @@ jobs:
mkdir -p dist
cmd /c wix\\build.cmd ${{ steps.version.outputs.rdmpversion }}
echo '"'$signtool'"' 'Sign /f GitHubActionsWorkflow.pfx /fd sha256 /tr http://timestamp.digicert.com /td sha256 /p ${{ secrets.DIGICERT_PASSWORD }} dist/rdmp.msi' | cmd
(cd PublishWindows ; echo 7z a -mx=9 ../dist/rdmp-${{ steps.version.outputs.rdmpversion }}-cli-win-x64.zip . | cmd)
(cd PublishWindows ; echo 7z a -mx=9 ../dist/rdmp-${{ steps.version.outputs.rdmpversion }}-cli-win-x64.zip rdmp.exe NLog.config *.yaml | cmd)
(cd PublishLinux ; echo 7z a -mx=0 ../dist/rdmp-${{ steps.version.outputs.rdmpversion }}-cli-linux-x64.zip . | cmd)
mv PublishLinux rdmp-${{ steps.version.outputs.rdmpversion }}-cli-linux
echo 7z a dist/rdmp-${{ steps.version.outputs.rdmpversion }}-cli-linux-x64.tar rdmp-${{ steps.version.outputs.rdmpversion }}-cli-linux | cmd
(cd PublishWinForms ; echo 7z a -mx=9 ../dist/rdmp-${{ steps.version.outputs.rdmpversion }}-client.zip . | cmd)
(cd PublishWinForms ; echo 7z a -mx=9 ../dist/rdmp-${{ steps.version.outputs.rdmpversion }}-client.zip ResearchDataManagementPlatform.exe | cmd)
- name: Install Perl dependencies
uses: shogo82148/[email protected]
Expand Down Expand Up @@ -178,6 +178,7 @@ jobs:
rm dist/rdmp-${{ steps.version.outputs.rdmpversion }}-cli-linux-x64.tar
- name: Build Nuget packages
if: contains(github.ref, 'refs/tags/v')
shell: bash
run: |
for i in Rdmp.Core/Rdmp.Core.csproj Rdmp.UI/Rdmp.UI.csproj Tests.Common/Tests.Common.csproj
Expand Down
4 changes: 2 additions & 2 deletions wix/build.cmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@echo off
set RDMPVERSION=%1
set wix="C:\Program Files (x86)\WiX Toolset v3.11\bin"
cd /d wix
cd /d %~dp0
%wix%\candle.exe rdmp.wxs -dVersion=%RDMPVERSION% -arch x64 -ext WixUtilExtension -nologo
if errorlevel 1 exit 1
%wix%\light.exe rdmp.wixobj -ext WixUtilExtension -nologo
if errorlevel 1 exit 1
move rdmp.cli ..\dist\
move rdmp.msi ..\dist\
84 changes: 0 additions & 84 deletions wix/rdmp.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,6 @@
<Directory Id="DesktopFolder" />
<Directory Id="ProgramFiles64Folder">
<Directory Id="pub" Name="RDMP" FileSource="..\PublishWinForms">
<Component Id="D3DCompiler_47_cor3.dll" Guid="AB93A932-5DCE-4396-ADD6-874F5477CBF6">
<File Id="D3DCompiler_47_cor3.dll" KeyPath="yes" Name="D3DCompiler_47_cor3.dll" />
</Component>
<Component Id="en_US.aff" Guid="5D1F7C08-7F81-4DA9-B5FB-86CFFE2A9EB4">
<File Id="en_US.aff" KeyPath="yes" Name="en_US.aff" />
</Component>
<Component Id="en_US.dic" Guid="DCC6D548-8C06-44DD-9271-0E23D4E65CE3">
<File Id="en_US.dic" KeyPath="yes" Name="en_US.dic" />
</Component>
<Component Id="Hunspellx64.dll" Guid="9B97C2D4-3D72-430C-A335-DCD74D67BEF7">
<File Id="Hunspellx64.dll" KeyPath="yes" Name="Hunspellx64.dll" />
</Component>
<Component Id="Hunspellx86.dll" Guid="1DCD16D0-A74E-421D-931B-418F30F1584E">
<File Id="Hunspellx86.dll" KeyPath="yes" Name="Hunspellx86.dll" />
</Component>
<Component Id="hyph_en_US.dic" Guid="8D2F3538-2AB9-4328-8B37-667F474487D1">
<File Id="hyph_en_US.dic" KeyPath="yes" Name="hyph_en_US.dic" />
</Component>
<Component Id="Microsoft.Data.SqlClient.SNI.dll" Guid="D102D57B-6A8B-4DBB-979E-257DEDA493E7">
<File Id="Microsoft.Data.SqlClient.SNI.dll" KeyPath="yes" Name="Microsoft.Data.SqlClient.SNI.dll" />
</Component>
<Component Id="NLog.template.config" Guid="CAB176B1-0BC8-4BA9-A723-CB0F6C525EAA">
<File Id="NLog.template.config" KeyPath="yes" Name="NLog.template.config" />
</Component>
<Component Id="Pencil.cur" Guid="00E12D9B-8A46-4E19-9BFA-E3334AE03420">
<File Id="Pencil.cur" KeyPath="yes" Name="Pencil.cur" />
</Component>
<Component Id="PenImc_cor3.dll" Guid="5B70CC2F-4EDB-4AFB-9E3F-74985584BC6D">
<File Id="PenImc_cor3.dll" KeyPath="yes" Name="PenImc_cor3.dll" />
</Component>
<Component Id="PresentationNative_cor3.dll" Guid="B9B25C0E-BFAA-4F2C-9A0F-3739AFB8E1F1">
<File Id="PresentationNative_cor3.dll" KeyPath="yes" Name="PresentationNative_cor3.dll" />
</Component>
<Component Id="ResearchDataManagementPlatform.exe" Guid="C16CA8A9-FEEC-4095-8453-FC595B31B3B2">
<File Id="ResearchDataManagementPlatform.exe" KeyPath="yes" Name="ResearchDataManagementPlatform.exe" />
<Shortcut Id="ApplicationStartMenuShortcut"
Expand All @@ -71,37 +38,7 @@
WorkingDirectory="pub"
Advertise="yes"
Icon="rdmp.ico"/>

</Component>
<Component Id="SourceCodeForSelfAwareness.zip" Guid="B115CA1E-BB1B-49C3-B017-9551CEF9F53A">
<File Id="SourceCodeForSelfAwareness.zip" KeyPath="yes" Name="SourceCodeForSelfAwareness.zip" />
</Component>
<Component Id="vcruntime140_cor3.dll" Guid="1747032B-707D-4824-AE37-2EE7320A7C39">
<File Id="vcruntime140_cor3.dll" KeyPath="yes" Name="vcruntime140_cor3.dll" />
</Component>
<Component Id="WebView2Loader.dll" Guid="16868C7C-7EB2-4567-9AF5-CDE99B634640">
<File Id="WebView2Loader.dll" KeyPath="yes" Name="WebView2Loader.dll" />
</Component>
<Component Id="wpfgfx_cor3.dll" Guid="1486CDE3-33A7-4850-A5CC-96DA509F08EC">
<File Id="wpfgfx_cor3.dll" KeyPath="yes" Name="wpfgfx_cor3.dll" />
</Component>
<Directory Id="Curation" Name="Curation">
<Component Id="KeywordHelp.txt" Guid="8D283AA4-8813-47A2-9F5D-26C7FAF92C18">
<File Id="KeywordHelp.txt" KeyPath="yes" Name="KeywordHelp.txt" />
</Component>
</Directory>
<Directory Id="Icon" Name="Icon">
<Component Id="main.png" Guid="E0384048-21C2-4869-8CE4-5469E61761FD">
<File Id="main.png" KeyPath="yes" Name="main.png" />
</Component>
</Directory>
<Directory Id="WindowManagement" Name="WindowManagement">
<Directory Id="Licenses" Name="Licenses">
<Component Id="LICENSE" Guid="C9062287-6492-42BB-AFDC-A3933A667D87">
<File Id="LICENSE" KeyPath="yes" Name="LICENSE" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
Expand All @@ -121,30 +58,9 @@

<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentRef Id="ApplicationShortcuts"/>
<ComponentRef Id="D3DCompiler_47_cor3.dll" />
<ComponentRef Id="en_US.aff" />
<ComponentRef Id="en_US.dic" />
<ComponentRef Id="Hunspellx64.dll" />
<ComponentRef Id="Hunspellx86.dll" />
<ComponentRef Id="hyph_en_US.dic" />
<ComponentRef Id="Microsoft.Data.SqlClient.SNI.dll" />
<ComponentRef Id="NLog.template.config" />
<ComponentRef Id="Pencil.cur" />
<ComponentRef Id="PenImc_cor3.dll" />
<ComponentRef Id="PresentationNative_cor3.dll" />
<ComponentRef Id="ResearchDataManagementPlatform.exe" />
<ComponentRef Id="SourceCodeForSelfAwareness.zip" />
<ComponentRef Id="vcruntime140_cor3.dll" />
<ComponentRef Id="WebView2Loader.dll" />
<ComponentRef Id="wpfgfx_cor3.dll" />
<ComponentRef Id="KeywordHelp.txt" />
<ComponentRef Id="main.png" />
<ComponentRef Id="LICENSE" />
</Feature>

<!--<WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />-->
<!--WixVariable Id="WixUIBannerBmp" Value="bmp" /--> <!-- 493 X 58 -->
<!--WixVariable Id="WixUIDialogBmp" Value="bmp" /--> <!-- 493 X 312 -->
<Property Id="ARPPRODUCTICON" Value="rdmp.ico" />
<Property Id="WixAppFolder" Value="WixPerUserFolder" />

Expand Down

0 comments on commit 89d2029

Please sign in to comment.