Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows installer #5572

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,7 @@ jlink {
'--vendor', 'JabRef',
'--app-version', "${project.version}",
'--win-upgrade-uuid', 'd636b4ee-6f10-451e-bf57-c89656780e36',
// temporarily disabled due to conflict with Jpackage update
//'--win-dir-chooser',
'--win-dir-chooser',
'--win-shortcut',
'--temp', "$buildDir/installer",
'--resource-dir', "${projectDir}/buildres/windows"
Expand Down
77 changes: 64 additions & 13 deletions buildres/windows/JabRef.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,74 @@
<?define JpInstallScope="perUser"?>
<?endif?>

<Product Id="$(var.JpProductCode)" Name="$(var.JpAppName)"
Language="1033" Version="$(var.JpAppVersion)"
Manufacturer="$(var.JpAppVendor)"
UpgradeCode="$(var.JpProductUpgradeCode)">
<Package Description="$(var.JpAppDescription)"
Manufacturer="$(var.JpAppVendor)"
InstallerVersion="200" Compressed="yes"
InstallScope="$(var.JpInstallScope)" Platform="x64"/>
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
<?define JpProductLanguage=1033 ?>
<?define JpInstallerVersion=200 ?>
<?define JpCompressedMsi=yes ?>

<?include $(var.JpConfigDir)/overrides.wxi ?>

<Product
Id="$(var.JpProductCode)"
Name="$(var.JpAppName)"
Language="$(var.JpProductLanguage)"
Version="$(var.JpAppVersion)"
Manufacturer="$(var.JpAppVendor)"
UpgradeCode="$(var.JpProductUpgradeCode)">

<Package
Description="$(var.JpAppDescription)"
Manufacturer="$(var.JpAppVendor)"
InstallerVersion="$(var.JpInstallerVersion)"
Compressed="$(var.JpCompressedMsi)"
InstallScope="$(var.JpInstallScope)" Platform="x64"
/>

<Media Id="1" Cabinet="Data.cab" EmbedCab="yes" />

<?ifdef JpAllowDowngrades ?>
<?ifdef JpAllowUpgrades ?>
<MajorUpgrade
AllowDowngrades="yes"
Disallow="no"
/>
<?endif?>
<?endif?>

<?ifdef JpAllowDowngrades ?>
<MajorUpgrade AllowDowngrades="yes"/>
<?ifndef JpAllowUpgrades ?>
<MajorUpgrade
AllowDowngrades="yes"
Disallow="yes"
DisallowUpgradeErrorMessage="!(loc.DisallowUpgradeErrorMessage)"
/>
<?endif?>
<?endif?>

<?ifndef JpAllowDowngrades ?>
<?ifdef JpAllowUpgrades ?>
<MajorUpgrade
AllowDowngrades="no"
Disallow="no"
DowngradeErrorMessage="!(loc.DowngradeErrorMessage)"
/>
<?endif?>
<?endif?>

<?ifndef JpAllowDowngrades ?>
<?ifndef JpAllowUpgrades ?>
<MajorUpgrade
AllowDowngrades="no"
Disallow="yes"
DowngradeErrorMessage="!(loc.DowngradeErrorMessage)"
DisallowUpgradeErrorMessage="!(loc.DisallowUpgradeErrorMessage)"
/>
<?endif?>
<?endif?>

<!-- Standard required root -->
<Directory Id="TARGETDIR" Name="SourceDir"/>

<Feature Id="DefaultFeature" Title="Main Feature" Level="1">
<Feature Id="DefaultFeature" Title="!(loc.MainFeatureTitle)" Level="1">
<ComponentGroupRef Id="Shortcuts"/>
<ComponentGroupRef Id="Files"/>
<ComponentGroupRef Id="FileAssociations"/>
Expand Down Expand Up @@ -53,7 +103,7 @@
<!--
Run WixUI_InstallDir dialog in the default install directory.
-->
<Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
<UIRef Id="WixUI_InstallDir" />

<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="JpCheckInstallDir" Order="3">1</Publish>
Expand Down Expand Up @@ -83,5 +133,6 @@
<WixVariable Id="WixUILicenseRtf" Value="$(var.JpLicenseRtf)"/>
<?endif?>

<DirectoryRef Id="TARGETDIR"><Component Id="RegistryJabFoxEntries" Guid="b6bc55ad-905c-4258-89b1-8b37abbe559c" Win64="yes"><RegistryKey Root="HKMU" Key="SOFTWARE\Mozilla\NativeMessagingHosts\org.jabref.jabref" Action="createAndRemoveOnUninstall" ForceCreateOnInstall="yes"><RegistryValue Type="string" Value="[APPLICATIONFOLDER]jabref.json"/></RegistryKey></Component></DirectoryRef><Feature Id="JabFox" Level="1"><ComponentRef Id="RegistryJabFoxEntries" /></Feature><Property Id="ARPPRODUCTICON" Value="DesktopIcon.exe" /><WixVariable Id="WixUIBannerBmp" Value="JabRefTopBanner.bmp" /><DirectoryRef Id="TARGETDIR"><Component Id="RegistryJabFoxEntries" Guid="b6bc55ad-905c-4258-89b1-8b37abbe559c" Win64="yes"><RegistryKey Root="HKMU" Key="SOFTWARE\Mozilla\NativeMessagingHosts\org.jabref.jabref" Action="createAndRemoveOnUninstall" ForceCreateOnInstall="yes"><RegistryValue Type="string" Value="[APPLICATIONFOLDER]jabref.json"/></RegistryKey></Component></DirectoryRef><Feature Id="JabFox" Level="1"><ComponentRef Id="RegistryJabFoxEntries" /></Feature><Property Id="ARPPRODUCTICON" Value="DesktopIcon.exe" /><WixVariable Id="WixUIBannerBmp" Value="JabRefTopBanner.bmp" /><DirectoryRef Id="TARGETDIR"><Component Id="RegistryJabFoxEntries" Guid="b6bc55ad-905c-4258-89b1-8b37abbe559c" Win64="yes"><RegistryKey Root="HKMU" Key="SOFTWARE\Mozilla\NativeMessagingHosts\org.jabref.jabref" Action="createAndRemoveOnUninstall" ForceCreateOnInstall="yes"><RegistryValue Type="string" Value="[APPLICATIONFOLDER]jabref.json"/></RegistryKey></Component></DirectoryRef><Feature Id="JabFox" Level="1"><ComponentRef Id="RegistryJabFoxEntries" /></Feature><Property Id="ARPPRODUCTICON" Value="DesktopIcon.exe" /><WixVariable Id="WixUIBannerBmp" Value="JabRefTopBanner.bmp" /></Product>
Copy link
Member

Choose a reason for hiding this comment

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

We need to add this JabFox stuff as well I think

Copy link
Member Author

Choose a reason for hiding this comment

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

This should be done by the post-inst script. Let's see if it works

</Product>
</Wix>