Skip to content

Commit e7c091d

Browse files
committed
upgrade to v4 and see
1 parent c086337 commit e7c091d

File tree

1 file changed

+28
-107
lines changed

1 file changed

+28
-107
lines changed

.github/workflows/build-windows-executable-app.yaml

Lines changed: 28 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -339,155 +339,76 @@ jobs:
339339
run: |
340340
cat <<EOF > streamlit_exe.wxs
341341
<?xml version="1.0"?>
342-
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
343-
<Product Id="*" Name="${{ env.APP_NAME }}" Language="1033" Version="1.0.0.0" Codepage="1252" Manufacturer="OpenMS Developer Team" UpgradeCode="${{ env.APP_UpgradeCode }}">
344-
<Package Id="*" InstallerVersion="300" Compressed="yes" InstallPrivileges="elevated" Platform="x64" />
345-
<Media Id="1" Cabinet="streamlit.cab" EmbedCab="yes" />
346-
347-
<!-- Folder structure -->
342+
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
343+
344+
<Package Name="${{ env.APP_NAME }}" Manufacturer="OpenMS Developer Team"
345+
Version="1.0.0.0" UpgradeCode="${{ env.APP_UpgradeCode }}"
346+
InstallerVersion="500" Compressed="yes" Platform="x64">
347+
348348
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
349-
<!-- Store workspaces path as empty string which will be later updated in custom action -->
350349
<Property Id="WORKSPACES_PATH" Value="INSTALLFOLDER" />
350+
351351
<Directory Id="TARGETDIR" Name="SourceDir">
352-
<Directory Id="ProgramFilesFolder">
352+
<Directory Id="ProgramFilesFolder">
353353
<Directory Id="INSTALLFOLDER" Name="${{ env.APP_NAME }}">
354-
<Directory Id="AppSubFolder" Name="${{ env.APP_NAME }}" />
354+
<Directory Id="AppSubFolder" Name="${{ env.APP_NAME }}" />
355355
<Component Id="CreateAppFolder" Guid="95dbfa06-d36a-427f-995c-e87769ac2e59">
356356
<CreateFolder>
357357
<Permission User="Everyone" GenericAll="yes" />
358358
</CreateFolder>
359359
</Component>
360-
<!-- Create workspaces folder inside installation directory -->
361360
<Directory Id="WORKSPACES_FOLDER" Name="workspaces">
362361
<Component Id="CreateWorkspacesFolder" Guid="0068c3ca-f39f-4f70-adee-43ced04296a1">
363362
<CreateFolder>
364363
<Permission User="Everyone" GenericAll="yes" />
365364
</CreateFolder>
366365
</Component>
367-
</Directory>
366+
</Directory>
368367
</Directory>
369368
</Directory>
370369
<Directory Id="DesktopFolder" />
371370
</Directory>
372-
373-
<!-- Add components -->
371+
374372
<Feature Id="MainFeature" Title="Main Application" Level="1">
375-
<ComponentGroupRef Id="StreamlitExeFiles" />
376373
<ComponentRef Id="CreateAppFolder" />
377374
<ComponentRef Id="CreateWorkspacesFolder" />
378375
<ComponentRef Id="DesktopShortcutComponent" />
379376
<ComponentRef Id="InstallDirShortcutComponent" />
380377
</Feature>
381-
382-
<!-- Create shortcut for running app on desktop -->
383-
<Component Id="DesktopShortcutComponent" Guid="3597b243-9180-4d0b-b105-30d8b0d1a334" Directory="DesktopFolder">
384-
<Shortcut Id="DesktopShortcut" Name="${{ env.APP_NAME }}" Description="Launch ${{ env.APP_NAME }}" Target="[AppSubFolder]${{ env.APP_NAME }}.bat" WorkingDirectory="AppSubFolder" Icon="AppIcon" />
385-
<RegistryValue Root="HKCU" Key="Software\\OpenMS\\${{ env.APP_NAME }}" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes" />
386-
</Component>
387-
388-
<!-- Create shortcut for running app in installer folder -->
389-
<Component Id="InstallDirShortcutComponent" Guid="c2df9472-3b45-4558-a56d-6034cf7c8b72" Directory="AppSubFolder">
390-
<Shortcut Id="InstallDirShortcut" Name="${{ env.APP_NAME }}" Description="Launch ${{ env.APP_NAME }}" Target="[AppSubFolder]${{ env.APP_NAME }}.bat" WorkingDirectory="AppSubFolder" Icon="AppIcon" />
391-
<RegistryValue Root="HKCU" Key="Software\\OpenMS\\${{ env.APP_NAME }}" Name="InstallFolderShortcut" Type="integer" Value="1" KeyPath="yes" />
392-
</Component>
393-
394-
<!-- Provide icon here; it should exist in the SourceDir folder -->
395-
<Icon Id="AppIcon" SourceFile="SourceDir/openms.ico" />
396-
397-
<!-- Run app directly after installation -->
398-
<!-- <CustomAction Id="RunApp" Directory="AppSubFolder" Execute="deferred" Return="asyncNoWait" Impersonate="no"
399-
ExeCommand="cmd.exe /c &quot;[AppSubFolder]${{ env.APP_NAME }}.bat&quot;" /> -->
400-
401-
<!-- Custom Action to Show Success Message -->
402-
<Binary Id="ShowMessageScript" SourceFile="SourceDir/ShowSuccessMessage.vbs" />
403-
<CustomAction Id="ShowSuccessMessage" BinaryKey="ShowMessageScript" VBScriptCall="" Execute="immediate" Return="check" />
404-
405-
<InstallUISequence>
406-
<Show Dialog="MaintenanceWelcomeDlg" Sequence="1295" />
407-
<Show Dialog="ResumeDlg" Sequence="1296" />
408-
<Show Dialog="WelcomeDlg" Sequence="1297" />
409-
<Show Dialog="CustomWorkspacesFolderDlg" Sequence="1298" />
410-
<Show Dialog="ProgressDlg" Sequence="1299" />
411-
</InstallUISequence>
412-
413-
<!-- Add all Custom Actions -->
414-
<InstallExecuteSequence>
415-
<!-- Custom action display success message -->
416-
<Custom Action="ShowSuccessMessage" After="InstallFinalize">NOT Installed</Custom>
417-
<!-- Run app directly after installation -->
418-
<!-- <Custom Action="RunApp" Before="InstallFinalize">NOT REMOVE</Custom> -->
419-
</InstallExecuteSequence>
420-
421-
<!-- Interface options -->
422-
<UI>
423-
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
424-
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
425-
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
426-
427-
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
428378
429-
<Property Id="WixUI_Mode" Value="InstallDir" />
379+
<UI>
430380
<Dialog Id="CustomWorkspacesFolderDlg" Width="370" Height="270" Title="Select Workspaces Folder">
431-
<Control Id="WorkspacesFolderPathLabel" Type="Text" X="15" Y="10" Width="340" Height="30" Text="Select the folder to store workspaces" />
432-
<Control Id="WorkspacesFolderPathEdit" Type="PathEdit" X="15" Y="50" Width="300" Height="20" Property="WORKSPACES_PATH" />
433-
<Control Id="WorkspacesFolderPathBrowseButton" Type="PushButton" X="320" Y="50" Width="30" Height="20" Text="Browse...">
381+
<Control Id="WorkspacesFolderPathLabel" Type="Text" X="15" Y="10" Width="340" Height="30"
382+
Text="Select the folder to store workspaces" />
383+
<Control Id="WorkspacesFolderPathEdit" Type="PathEdit" X="15" Y="50" Width="300" Height="20"
384+
Property="WORKSPACES_PATH" />
385+
<Control Id="WorkspacesFolderPathBrowseButton" Type="PushButton" X="320" Y="50" Width="30" Height="20"
386+
Text="Browse...">
434387
<Publish Event="SpawnDialog" Value="BrowseDlg" />
435388
</Control>
436-
<Control Id="WorkspacesFolderPathConfirmButton" Type="PushButton" X="200" Y="200" Width="80" Height="30" Default="yes" Text="Next">
389+
<Control Id="WorkspacesFolderPathConfirmButton" Type="PushButton" X="200" Y="200" Width="80" Height="30"
390+
Default="yes" Text="Next">
437391
<Publish Event="NewDialog" Value="VerifyReadyDlg" />
438392
</Control>
439-
<Control Id="WorkspacesFolderPathCancelButton" Type="PushButton" X="290" Y="200" Width="80" Height="30" Cancel="yes" Text="Cancel">
393+
<Control Id="WorkspacesFolderPathCancelButton" Type="PushButton" X="290" Y="200" Width="80" Height="30"
394+
Cancel="yes" Text="Cancel">
440395
<Publish Event="EndDialog" Value="Exit" />
441396
</Control>
442397
</Dialog>
443398
444399
<DialogRef Id="BrowseDlg" />
445-
<DialogRef Id="DiskCostDlg" />
446-
<DialogRef Id="ErrorDlg" />
447-
<DialogRef Id="FatalError" />
448-
<DialogRef Id="FilesInUse" />
449-
<DialogRef Id="MsiRMFilesInUse" />
450-
<DialogRef Id="PrepareDlg" />
451400
<DialogRef Id="ProgressDlg" />
452-
<DialogRef Id="ResumeDlg" />
453-
<DialogRef Id="UserExit" />
454-
455-
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
456-
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
457-
458-
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
459401
460-
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomWorkspacesFolderDlg">NOT Installed</Publish>
461-
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomWorkspacesFolderDlg">Installed AND PATCH</Publish>
462-
463-
<Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
464-
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>
465-
466-
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
467-
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
468-
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
469-
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
470-
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
471-
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
472-
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
402+
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomWorkspacesFolderDlg">
403+
NOT Installed
404+
</Publish>
473405
474-
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
475-
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
476-
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>
477-
478-
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
479-
480-
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
481-
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
482-
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
483-
484-
<Property Id="ARPNOMODIFY" Value="1" />
406+
<Publish Dialog="CustomWorkspacesFolderDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" />
485407
</UI>
486408
487409
<UIRef Id="WixUI_Common" />
488-
<!-- Provide license; it should exist in the SourceDir folder -->
489-
<WixVariable Id="WixUILicenseRtf" Value="SourceDir/openms_license.rtf" />
490-
</Product>
410+
</Package>
411+
491412
</Wix>
492413
EOF
493414

0 commit comments

Comments
 (0)