Skip to content
Open
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions .github/workflows/build-windows-executable-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ jobs:
</Directory>
<Directory Id="DesktopFolder" />
</Directory>
<Property Id="WORKSPACES_FOLDER" Value="AppSubFolder" />

<!-- Add components -->
<Feature Id="MainFeature" Title="Main Application" Level="1">
Expand Down Expand Up @@ -391,20 +392,51 @@ jobs:
<Binary Id="ShowMessageScript" SourceFile="SourceDir/ShowSuccessMessage.vbs" />
<CustomAction Id="ShowSuccessMessage" BinaryKey="ShowMessageScript" VBScriptCall="" Execute="immediate" Return="check" />

<!-- Custom Action: Write WORKSPACES_FOLDER to a text file -->
<CustomAction Id="WriteWorkspacePath" Directory="INSTALLFOLDER" Execute="deferred" Impersonate="no" ExeCommand="cmd.exe /c echo [WORKSPACES_FOLDER] > &quot;[AppSubFolder]workspace_path.txt&quot;" Return="ignore" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This i need to change to write to settings.json and update workspaces_dir key @t0mdavid-m

<!-- Add all Custom Actions -->
<InstallExecuteSequence>
<!-- Custom action display success message -->
<Custom Action="ShowSuccessMessage" After="InstallFinalize">NOT Installed</Custom>
<!-- Run app directly after installation -->
<!-- <Custom Action="RunApp" Before="InstallFinalize">NOT REMOVE</Custom> -->
<Custom Action="WriteWorkspacePath" Before="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>

<!-- Interface options -->
<UI>
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />

<!-- New Dialog to select workspaces -->
<Dialog Id="ChooseWorkspacesDlg" Width="370" Height="270" Title="!(loc.InstallDirDlg_Title)">
<Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="Click Next to choose default workspaces location or click Change to choose another folder" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}Workspaces Folder" />
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />

<!-- Browse for workspaces folder location -->
<Control Id="WorkspacesFolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="Please select a workspace location before continuing installation." />
<Control Id="WorkspacesFolder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WORKSPACES_FOLDER" Indirect="yes" />
<Control Id="ChangeWorkspacesFolder" Type="PushButton" X="20" Y="120" Width="56" Height="17" Text="Change" />

<!-- Navigation Buttons -->
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
</Dialog>

<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="ChooseWorkspacesDlg" Order="2">LicenseAccepted = "1"</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="ChooseWorkspacesDlg" Order="2">1</Publish>
<Publish Dialog="ChooseWorkspacesDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="2">1</Publish>
<Publish Dialog="ChooseWorkspacesDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="2">1</Publish>
<Publish Dialog="ChooseWorkspacesDlg" Control="ChangeWorkspacesFolder" Property="_BrowseProperty" Value="[WORKSPACES_FOLDER]" Order="2">1</Publish>
<Publish Dialog="ChooseWorkspacesDlg" Control="ChangeWorkspacesFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
</UI>

<!-- Provide license; it should exist in the SourceDir folder -->
<WixVariable Id="WixUILicenseRtf" Value="SourceDir/openms_license.rtf" />
</Product>
Expand Down