【发布时间】:2018-03-25 18:36:51
【问题描述】:
在我的wxs 文件中,在Product 元素中,我添加了:
<WixVariable Id="WixUILicenseRtf" Value="C:\Users\pupeno\...\src\main\deploy\package\windows\License.rtf" />
我认为该文件正在被读取,因为如果我放置一个不存在的路径,msi 文件将不会生成。但是,在安装过程中没有显示任何内容。我还缺少什么?
我从 javafxpackager 模板开始,所以,它看起来像这样:
<?xml version="1.0" encoding="utf-8"?>
<!-- Customizing the wix template due to: https://github.com/FibreFoX/javafx-gradle-plugin/issues/100 -->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="PRODUCT_GUID" Name="APPLICATION_NAME"
Language="1033" Version="APPLICATION_VERSION"
Manufacturer="APPLICATION_VENDOR"
UpgradeCode="PUT-GUID-HERE">
<Package Description="APPLICATION_DESCRIPTION" Comments="None"
InstallerVersion="200" Compressed="yes"
InstallScope="INSTALL_SCOPE" Platform="PLATFORM"/>
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes"/>
<!-- We use RemoveFolderEx to ensure application folder is fully
removed on uninstall. Including files created outside of MSI
after application had been installed (e.g. on AU or user state).
Hovewer, RemoveFolderEx is only available in WiX 3.6,
we will comment it out if we running older WiX.
RemoveFolderEx requires that we "remember" the path for uninstall.
Read the path value and set the APPLICATIONFOLDER property with the value.
-->
<Property Id="APPLICATIONFOLDER">
<RegistrySearch Key="SOFTWARE\APPLICATION_VENDOR\APPLICATION_NAME"
Root="REGISTRY_ROOT" Type="raw"
Id="APPLICATIONFOLDER_REGSEARCH" Name="Path"/>
</Property>
<DirectoryRef Id="APPLICATIONFOLDER">
<Component Id="CleanupMainApplicationFolder" Guid="*" Win64="WIN64">
<RegistryValue Root="REGISTRY_ROOT"
Key="SOFTWARE\APPLICATION_VENDOR\APPLICATION_NAME"
Name="Path" Type="string" Value="[APPLICATIONFOLDER]"
KeyPath="yes"/>
<RegistryValue Root="HKLM"
Key="SOFTWARE\APPLICATION_VENDOR\APPLICATION_NAME"
Name="AutoConnectTo" Type="string" Value="[AUTO_CONNECT_TO]"/>
<!-- We need to use APPLICATIONFOLDER variable here or RemoveFolderEx
will not remove on "install". But only if WiX 3.6 is used. -->
WIX36_ONLY_START
<util:RemoveFolderEx On="uninstall" Property="APPLICATIONFOLDER"/>
WIX36_ONLY_END
</Component>
</DirectoryRef>
<?include bundle.wxi ?>
UI_BLOCK
APP_CDS_BLOCK
<Icon Id="DesktopIcon.exe" SourceFile="APPLICATION_ICON"/>
<Icon Id="StartMenuIcon.exe" SourceFile="APPLICATION_ICON"/>
SECONDARY_LAUNCHER_ICONS
<MajorUpgrade Schedule="afterInstallInitialize"
DowngradeErrorMessage="A later version of app is already installed. Setup will now exit."/>
<Icon Id="icon.ico" SourceFile="App.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico"/>
<Property Id="AUTO_CONNECT_TO">
<RegistrySearch Id="AutoConnectTo"
Root="HKLM"
Key="SOFTWARE\APPLICATION_VENDOR\APPLICATION_NAME"
Name="AutoConnectTo" Type="raw"/>
</Property>
<WixVariable Id="WixUILicenseRtf" Value="C:\Users\pupeno\...\src\main\deploy\package\windows\License.rtf" />
</Product>
</Wix>
我使用完整路径的原因是因为我不知道相对于 javafxpackager 的期望。我想先看看它工作。
【问题讨论】:
标签: wix windows-installer