i am using wix from command line. the problem i am facing is that i don't know how i will load the WixUtilExtension.dll at link time.
currently i am using the following commands
candle install.wxs
and then
light -ext WixUtilExtension install.wixobj
but it gives me following error
Unresolved reference to symbol 'WixUI:WixUI_InstallDir in section product
the dll is located at C:\Program Files (x86)\WiX Toolset v3.7\bin and my files are in folder which is at Desktop
can some body help me in resolving this?
thanks
You are linking WixUtilExtension, but the WixUI_InstallDir is a part of WixUIExtension. Seems like a pure typo.
Related
Environment:Windows 10, Wix3.11.1, Visual Studio 2017 Community.
I want to find a way how to Light my wix object without several ja-JP localization messages in wixIISextension. I have found the right message in en-us.wxl in the 3.11.1 source code. But not in ja-JP.wxl.
Below is the light cmd which my VS 2017 creates.
C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe -out D:\{hoge}\{hoge}.msi -pdbout D:\{hoge}\hoge.wixpdb -cultures:ja-JP -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixIIsExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUtilExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUIExtension.dll" -contentsfile obj\Debug\{hoge}.wixproj.BindContentsFileListja-JP.txt -outputsfile obj\Debug\{hoge}.wixproj.BindOutputsFileListja-JP.txt -builtoutputsfile obj\Debug\{hoge}.wixproj.BindBuiltOutputsFileListja-JP.txt -wixprojectfile D:\{hoge\hoge}.wixproj obj\Debug\ConditionDlg.wixobj obj\Debug\Product.wixobj obj\Debug\ProductApplicationFiles.wixobj obj\Debug\ProductSettingFiles.wixobj
2>C:\agent\_work\8\s\src\ext\IIsExtension\wixlib\IIsExtension_Platform.wxi(12,0): error LGHT0102: The localization variable !(loc.ConfigureIIsExec) is unknown. Please ensure the variable is defined.
2>C:\agent\_work\8\s\src\ext\IIsExtension\wixlib\IIsExtension_Platform.wxi(18,0): error LGHT0102: The localization variable !(loc.ConfigureIIs7Exec) is unknown. Please ensure the variable is defined.
2>C:\agent\_work\8\s\src\ext\IIsExtension\wixlib\IIsExtension_Platform.wxi(19,0): error LGHT0102: The localization variable !(loc.StartIIS7ConfigTransaction) is unknown. Please ensure the variable is defined.
2>C:\agent\_work\8\s\src\ext\IIsExtension\wixlib\IIsExtension_Platform.wxi(20,0): error LGHT0102: The localization variable !(loc.RollbackIIS7ConfigTransaction) is unknown. Please ensure the variable is defined.
2>C:\agent\_work\8\s\src\ext\IIsExtension\wixlib\IIsExtension_Platform.wxi(21,0): error LGHT0102: The localization variable !(loc.CommitIIS7ConfigTransaction) is unknown. Please ensure the variable is defined.
2>C:\agent\_work\8\s\src\ext\IIsExtension\wixlib\IIsExtension_Platform.wxi(22,0): error LGHT0102: The localization variable !(loc.WriteIIS7ConfigChanges) is unknown. Please ensure the variable is defined.
2>C:\agent\_work\8\s\src\ext\IIsExtension\wixlib\IIsExtension.wxs(56,0): error LGHT0102: The localization variable !(loc.msierrIISFailedCommitInUse) is unknown. Please ensure the variable is defined.
When I downloaded the source code from the GitHub(https://github.com/wixtoolset/wix3/releases/tag/wix3111rtm), I think I found the reason why I cannot light the code with IIsExtension (which making ApplicationPool in local IIS) In \src\ext\IIsExtension\wixlib, I found a message "msierrIISFailedCommitInUse" in en-us.wxl, but not in ja-JP.wxl.
<Component Id="cmpAppPool" Guid="MY-GUID" KeyPath="yes">
<iis:WebAppPool Id="TestPool" Name="Test" ManagedRuntimeVersion="v2.0" Identity="networkService" />
</Component>
If my assumption is right, probably I should somehow try to replace the message list of Wix toolset installed in my local computer...But how? Any other ideas?
It might be wise to try to light my project in en-US language temporarily, but the project contains many japanese name files....
P.S.1
I have tried to set several cultures (reading http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/specifying_cultures_to_build.html), but the error continues.
Self answer.
I have tried 2) copying the file named src\ext\IIsExtension\wixlib\en-us.wxl into my project (as ja-JP.wxl), include it in project. But failed to change its header Culture.
After I changed the header Culture from en-US to ja-JP, Light command works fine.
I am not sure why 1) didn't work.
Thank you for your concern.
I have a Windows application which is built using MSVC and packaged as an .MSI file using WiX. The whole build is managed by cmake and WiX is invoked using the CPackWIX module.
I am now trying to extend the build environment to also build an .APPX package. I am following the official documentation by FireGiant.
After installing the WiX Expansion Pack, I have added the extension FgAppxExtension.wixext by appending it to the variable CPACK_WIX_EXTENSIONS like so:
SET(CPACK_WIX_EXTENSIONS WixUtilExtension FgAppxExtension.wixext)
I have then edited the .wxs source code as indicated here.
The build runs without any errors but creates no .APPX package. It only creates the usual .MSI package. In the wix.log file I see the line:
"C:/Program Files (x86)/WiX Toolset v3.11/bin/light.exe" -nologo -out "F:/dev/MyApp-build/_CPack_Packages/win32/WIX/MyApp-1.15.0+115-default-eb4abec2e9d2+.msi" -ext "FgAppxExtension.wixext" -ext "WixUIExtension" -ext "WixUtilExtension" -cultures:de-DE;en-US "-loc" "C:/dev/MyApp/resources/packaging/win/WIX.Texts.de-DE.wxl" "-loc" "C:/dev/MyApp/resources/packaging/win/WIX.Texts.en-US.wxl" "F:/dev/MyApp-build/_CPack_Packages/win32/WIX/directories.wixobj" "F:/dev/MyApp-build/_CPack_Packages/win32/WIX/files.wixobj" "F:/dev/AusweisApp2-build/_CPack_Packages/win32/WIX/features.wixobj" "F:/dev/MyApp-build/_CPack_Packages/win32/WIX/main.wixobj"
for the .MSI file, but no line for the .APPX package.
The documentation says that after adding a reference to FgAppxExtension.wixext
... the build process will attempt to create AppX packages.
but this does not happen.
Note that adding a wrong extension in the cmake file will result in a build error.
Changing the .wxs source code without adding the extension will also result in an error:
The Product element contains an unhandled extension element 'fga:Appx'.
So I think the FgAppxExtension.wixext extension is loaded correctly, yet no .APPX package is built.
Do you have any hints?
Loading the FgAppxExtension.wixext extension isn't enough to build the .appx package while building the .msi package. FgAppxExtension does that using MSBuild, which isn't in play when using CMake.
When you're not using MSBuild, you can invoke the FireGiant.Appx.exe tool after Light.exe has produced the .msi and .wixpdb files.
in our WiX 3.8 project (creating an MSI) , we'd like to have new languages like es-es, fr-fr, ru-ru, etc.
After adding the files and building I get the following error multiple times saying that the variable is not defined:
"1>C:\src\wix38\src\ext\UtilExtension\wixlib\UtilExtension.wxs(54,0): error LGHT0102: The localization variable !(loc.msierrXmlFileFailedRead) is unknown. Please ensure the variable is defined."
Same error for those variables also: !(loc.msierrXmlFileFailedOpen), !(loc.msierrXmlFileFailedSelect), !(loc.msierrXmlFileFailedSave), !(loc.msierrSecureObjectsFailedCreateSD), !(loc.msierrSecureObjectsFailedSet), !(loc.msierrSecureObjectsUnknownType)
So I created a modified version of WiX. I downloaded the sources and added the corresponding language files (fr-fr.wxl, es-es.wxl, etc) into that folder: \src\ext\UtilExtension\wixlib
I also changed \src\ext\UtilExtension\wixlib\UtilExtension.wixproj so that it includes those files.
Then I built everything successfully, copied the new files into wix installation directory, restarted visual studio and built again - with exactly the same error.
What did I do wrong?!
Btw: I found a workaround by referencing the new language files (fr-fr.wxl etc) in the wixproj file, but I don't see this as a final solution.
Any help is appreciated!
As a solution can be downloaded en-us.wxl language file and modify it any references to your language indicated cultures.
Repository with extension WXL files: https://github.com/wixtoolset/wix3/tree/develop/src/ext/UtilExtension/wixlib
In light pass control these parameters with the path of your file with translation strings: light -ext WixUIExtension -ext WixUtilExtension -ext WixFirewallExtension -cultures:pt-br -loc D:\pt-br.wxl ...
I had/have the same problem, some googling turned up that the extensions aren't all translated yet.
I faced the same problem, and maybe my solution will be userfull to somebody.
There is no localization to this variables (msierrXmlFileFailedSelect etc) in fr-fr and es-es cultures, that's the key. You need to find files UtilExtension_fr-fr.wxl and UtilExtension_es-es.wxl and include them to your project OR copy the localization of this variables from this .wxl files to localization files in your project.
I've inherited a Wix project. I don't know how it was compiled before, all I have are the source .wxs and .wxi files. I'm using candle and light from the command line to compile and link.
So far, I can candle my wxs files to wixobj files without error, however when I try and run light, I get a lot of errors similar to:
C:\wix\FeatureTree.wxs(39) : error LGHT0094 : Unresolved reference
to symbol 'Dialog:ErrorDlg' in
section 'Fragment:'.
I've done some reading, and it seems that the line that's causing this error:
<DialogRef Id="ErrorDlg" />
I've got the following line at the top of the Fragment:
<UIRef Id="WixUI_Common" />
Is just trying to import a built-in Wix error dialog. Why is it failing?
I was missing the library from the light command, which needs to be specified with -ext:
light -ext WixUIExtension *.wixobj -o installer.msi
Or from Visual Studio Wix project, add a reference to WixUIExtension.dll
If this is a repeat question, please direct me to the existing solution. I wasn't able to find a matching query.
We currently use InstallShield. I'm attempting to covert a project with 407 files to a WiX3 installation package. I tried using heat.exe to do some of the automation but I get the following warning for almost every file:
c:> heat dir "c:\projectDir\projectA" -gg -ke -template:Product -out "c:\install\projectA\heatOutput"
heat.exe: warning HEAT5150 : Could not harvest data from a file that was expected to be a SelfReg DLL: c:\projectDir\projectA\plugin1.dll. If this file does not support SelfReg you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: Unable to load file: c:\projectDir\projectA\plugin1.dll, error: 126.
Q: Is it normal for this warning to be reported for every file?
If there's a current "How To create/convert to your first WiX install project with many files" tutorial, please point me to it. The key requirement is "with many files".
PS. I know that WiX is designed for incremental install project creation but it would be nice to know if there's an automated way to convert existing install projects.
If there's a current "How To
create/convert to your first WiX
install project with many files"
tutorial, please point me to it. The
key requirement is "with many files"
You can take the msi file generated with installshield, and then decompile it with the dark.exe tool which comes with wix. As you can see in this diagram, dark.exe generates wxs files from a msi file.
You can use it like this:
dark installer.msi decompiled.wxs
See dark /? for more information.
edit: I don't use Votive, but AFAIK it should be able to handle the wxs files generated by dark. Did Votive show you an error?
edit2: wixproj files are just for visual studio and msbuild integration. The core tools don't know or use this format. Simply create a blank wixproj and add the wxs file to it from visual studio.
edit3: You should not compare the size of the wxs file to the msi file size. Like an installshield project file, a wxs does not contain the files to install. It only references them. Your installshield project file is not 70MB large either. If you want to extract the binary files from the MSI, then you should use dark.exe with the -x <path> switch.
Are you trying to extract data from x64 DLL's? That doesn't really work...