我需要在WIX本地化文件WIXUI_en-us.wxl中使用变量.我试过这样用:
<String Id="Message_SomeVersionAlreadyInstalled" Overridable="yes">A another version of product $(var.InstallationVersionForGUI) is already installed</String>
Run Code Online (Sandbox Code Playgroud)
但它不起作用.当我宣布财产并以这种方式使用它时:
<String Id="Message_SomeVersionAlreadyInstalled" Overridable="yes">A another version of product [InstallationVersionForGUI] is already installed</String>
也不起作用.
我哪里错了?
感谢您的帮助和时间.
我们来讨论以下主题.目前正在部署的应用程序有很好的知道xcopy方法.这种方法很难管理依赖项,文件更新等.有一些软件包的帮助下启动应用程序部署的想法,你知道你在Linux的帮助下RPM,但适用于Windows.
所以我有疑问:在Windows经典Windows安装程序(msi)或nuget或其他东西上使用什么包系统更好?
我在VS2012中有一个Wix安装程序项目,上次使用它时编译得很好(大约一周前).我今天回去了大约15个代码页错误:
Error 6 A string was provided with characters that are not available in the specified database code page '1252'. Either change these characters to ones that exist in the database's code page, or update the database's code page by modifying one of the following attributes: Product/@Codepage, Module/@Codepage, Patch/@Codepage, PatchCreation/@Codepage, or WixLocalization/@Codepage.
Run Code Online (Sandbox Code Playgroud)
第一个发生在以下行:
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"
Manufacturer="(?)????" />
Run Code Online (Sandbox Code Playgroud)
而且我认为wix因为日文字符而不高兴.然而在产品声明中,我将Codepage设置为932,这对日语应该是正确的:
<Product Id="*" Codepage="932" Language="1041"
Name="????????????????????????" Version="1.1.0.0"
Manufacturer="(?)????" UpgradeCode="PUT-GUID-HERE">
Run Code Online (Sandbox Code Playgroud)
我真的不知道错误是什么或如何解决它,特别是因为这几天前工作正常...
如果需要,这里是完整的Wix代码:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:net="http://schemas.microsoft.com/wix/NetFxExtension">
<Product Id="*" Codepage="932" Language="1041" …Run Code Online (Sandbox Code Playgroud) 我可能有一个奇怪的要求.
我开发了一个msi来安装两个软件.在EULA之后,必须有一个带有两个复选框的屏幕,在选择其中一个或两个复选框时,必须安装相应的软件.
我以前从来没有安装过一个单独的软件.
任何线索我都有责任.
我们的产品有三种类型/口味,但只有一种用 WiX 编写的 MSI。当我们构建安装程序时,我们通过定义的常量传递风味:
Call MSBUILD.bat ..\MSIs\CoreProduct\OurProduct.sln /p:DefineConstants="FLAVOUR=%_Flavour%"
Run Code Online (Sandbox Code Playgroud)
常量在 Visual Studio 中设置,在 Build -> Define preprocessor variables as FLAVOUR=50 下。构建过程传递值 50、200 或 LITE 作为风味。
在 WiX 代码中,我们在组件上有很多条件,告诉它根据风格安装哪个文件;例如
<Component Id="cmp7F45920B1AA100729BAE37FC846B3FC5" Guid="*">
<File Id="fil238A776D9294E14671E012472F9F7196"
KeyPath="yes"
Source="$(var.MenusPath)\ClientListView 200.r5m"
<Condition>$(var.FLAVOUR)=200</Condition>
</Component>
<Component Id="cmp8BFF42B232724DC4BA5B8F87994DEF21" Guid="*">
<File Id="fil808D6428D67248DDB8CA65DBC5978283"
KeyPath="yes"
Source="$(var.MenusPath)\ClientListView Lite.r5m"
<Condition>$(var.FLAVOUR)=LITE</Condition>
</Component>
Run Code Online (Sandbox Code Playgroud)
因此,如果 FLAVOR 为 LITE,上面的示例将安装一个名为“ClientListView Lite.r5m”的文件,如果 FLAVOR 为 200,它将安装一个名为“ClientListView 200.r5m”的文件。
这一切都按预期工作,并且已经做了多年!!
但是现在,我们有我们产品的网络版本,我们需要一个 zip 文件来包含将为每种口味安装的文件夹结构和文件。我发现您可以使用 MSIEXEC 和 /a 参数在命令行上运行 msi,然后将所有已安装到文件夹中的内容重定向并认为这正是我想要的......但可惜它不像我那样工作早就料到了。
它似乎正在做的是运行 MSI 并将文件提取到目标文件夹中,但它忽略了风味,因此您最终将“ClientListView Lite.r5m”和“ClientListView 200.r5m”文件都提取到文件夹; 这显然不是我想要的。
在阅读 MSIEXEC 上的文档后,您似乎可以传递公共属性的值,例如 msiexec.exe /a "C:\Example.msi" MY_PROP="myValue" - 所以我认为这可能对我有帮助;所以在我的 …
wix ×5
.net ×1
admin ×1
installation ×1
installer ×1
localization ×1
nuget ×1
variables ×1
wix3.5 ×1