[QBS] [WiX]Are a way to got a list of all dependent runtime libraries?

Jake Petroules jake.petroules at petroules.com
Sun Apr 6 19:29:03 CEST 2014


On 2014-04-06, at 06:36 AM, Denis Shienkov <denis.shienkov at gmail.com> wrote:

> Hi all.
> 
> Seems, it is a common question that related not only to the WiX module.
> 
> For example, I want to create an MSI installer for the MyProject. So, for me is need to define a list of all used Runtime Libs..
> 
> 1) In principle, I would try to receive the list of full paths of used Qt of libraries, e.g. through:
> 
> ...
> Depends { name: "Qt"; submodules: [ "core", "network", "gui", "widgets" ] }
> ...
> 
> but I do not know, how it do? Besides need to filter Debug and Release of the version of Qt libraries, depends on used current build profile.
> 
> 2) How to be with additional Qt modules, like: /plugins/platforms/qminimal.dll,qwindows.dll? Or with the ICU, GLES, EGL, and others? Also with division on the Debug and Release versions...

Really no good way to do this at the moment. As I mentioned earlier, packaging is not really supported by Qbs yet, but when it is perhaps the best option might be to add a rule to run windeployqt prior to building your MSI (obviously this would require Qt 5.3). I've been focusing on the Mac version of my app so I'm not sure if this is still working, but you could perhaps start with something like this to get the Qt DLLs and plugins copied. Warning, it's not pretty.

http://paste.kde.org/pbzbyqeby
http://paste.kde.org/plqifyr7h

> 3) How to be with MSVC runtime libraries? I would try to receive the list of full paths , e.g. through toolchain module or something else? but I do not know, how it do?

Don't try to retrieve the path to the MSVC runtime libraries. Instead, include the runtime merge module in your MSI as suggested by the WiX documentation. For example, add to your <Directory Id="TARGETDIR" ...> the following:

<Merge Id="VCRedist" SourceFile="$(env.CommonProgramFiles(x86))\Merge Modules\Microsoft_VC110_CRT_$(var.Platform).msm" DiskId="1" Language="0" />

$(var.Platform) is automatically set by Qbs to the architecture (x86, x64, ia64) you're building for, so you needn't worry about that part. You'll just need to change the '110' to whatever version of MSVC you're using, i.e. 100 for MSVC 2010, 110 for MSVC 2012, etc. Now that I think of it, it would be a fantastic idea to set a variable in Qbs for the MSVC version. Patch coming... (and I should document these too)

> Can someone provide a simple code snippets for this?
> 
> Best regards,
> Denis
> 
>  
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs


-- 
Jake Petroules
Chief Technology Officer
Petroules Corporation ยท www.petroules.com
Email: jake.petroules at petroules.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20140406/b3ad41f5/attachment.html>


More information about the Qbs mailing list