浏览代码

separate cryptomator labels and asset paths from installer file

Armin Schrenk 2 年之前
父节点
当前提交
6702747652
共有 2 个文件被更改,包括 47 次插入8 次删除
  1. 8 8
      dist/win/resources/main.wxs
  2. 39 0
      dist/win/resources/overrides.wxi

+ 8 - 8
dist/win/resources/main.wxs

@@ -86,12 +86,12 @@
     <!-- Non-Opening ProgID -->
     <DirectoryRef Id="INSTALLDIR">
         <Component Win64="yes" Id="nonStartingProgID" >
-          <File Id="IconFileForEncryptedData" KeyPath="yes" Source="$(env.JP_WIXWIZARD_RESOURCES)\Cryptomator-Vault.ico" Name="Cryptomator-Vault.ico"></File>
-          <ProgId Id="Cryptomator.Encrypted.1" Description="Cryptomator Encrypted Data" Icon="IconFileForEncryptedData" IconIndex="0">
-            <Extension Id="c9r" Advertise="no" ContentType="application/vnd.cryptomator.encrypted">
-              <MIME ContentType="application/vnd.cryptomator.encrypted" Default="yes"></MIME>
+          <File Id="IconFileForEncryptedData" KeyPath="yes" Source="$(env.JP_WIXWIZARD_RESOURCES)\$(var.ProgIdIcon)" Name="$(var.ProgIdIcon)"></File>
+          <ProgId Id="$(var.JpAppName).Encrypted.1" Description="$(var.JpAppName) Encrypted Data" Icon="IconFileForEncryptedData" IconIndex="0">
+            <Extension Id="c9r" Advertise="no" ContentType="$(var.ProgIdContentType)">
+              <MIME ContentType="$(var.ProgIdContentType)" Default="yes"></MIME>
             </Extension>
-            <Extension Id="c9s" Advertise="no" ContentType="application/vnd.cryptomator.encrypted"/>
+            <Extension Id="c9s" Advertise="no" ContentType="$(var.ProgIdContentType)"/>
           </ProgId>
         </Component>
     </DirectoryRef>
@@ -130,12 +130,12 @@
     <!-- Running App detection and exit -->
     <Property Id="FOUNDRUNNINGAPP" Admin="yes"/>
     <util:CloseApplication
-      Id="CloseCryptomator"
-      Target="cryptomator.exe"
+      Target="$(var.CloseApplicationTarget)"
+      Id="Close$(var.JpAppName)"
       CloseMessage="no"
       RebootPrompt="no"
       PromptToContinue="yes"
-      Description="A running instance of Cryptomator is found. Please close it to continue."
+      Description="A running instance of $(var.JpAppName) is found. Please close it to continue."
       Property="FOUNDRUNNINGAPP"
       >
     </util:CloseApplication>

+ 39 - 0
dist/win/resources/overrides.wxi

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Stub by design -->
+
+<!--
+overrides.wxi is a placeholder to set/alter WiX variables referenced from default
+main.wxs file.
+
+Put custom overrides.wxi in resource directory to replace this default file.
+
+Override default overrides.wxi if configuring of msi installers through jpackage
+command line is not sufficient.
+
+WiX variables referenced from default main.wxs that can be altered in custom overrides.wxi:
+
+- JpProductLanguage
+Value of `Language` attribute of `Product` WiX element. Default value is 1033.
+
+- JpInstallerVersion
+Value of `InstallerVersion` attribute of `Package` WiX element. Default value is 200.
+
+- JpCompressedMsi
+Value of `Compressed` attribute of `Package` WiX element. Default value is `yes`.
+
+- JpAllowDowngrades
+Should be defined to enable downgrades and undefined to disable downgrades.
+Default value is `yes`.
+
+- JpAllowUpgrades
+Should be defined to enable upgrades and undefined to disable upgrades.
+Default value is `yes`.
+-->
+
+<!-- Non-opening ProgID settings-->
+<?define ProgIdIcon= "Cryptomator-Vault.ico" ?>
+<?define ProgIdContentType= "application/vnd.cryptomator.encrypted" ?>
+
+<!-- Close Application util -->
+<?define CloseApplicationTarget= "cryptomator.exe" ?>
+<Include/>