[Interest] Creating Installer for custom Build of Qt

Michael Jackson imikejackson at gmail.com
Fri Apr 12 17:40:20 CEST 2013


On Apr 11, 2013, at 11:25 AM, Jenssen Tim wrote:

>> This has changed since the Qt 4 days then. All of this is very helpful BUT is the same information available for Qt 4? We use Qt 4.8.4 and are not ready to move to Qt 5 yet.
> 
>> Since I am not building WebKit looks like my life might actually be easier making the installer.
> 
> The installer framework was used for Qt4 at Nokia times (Nokia QtSDK) so it should work.
> 
> Just download the installer framework and install it: http://releases.qt-project.org/qt-installer-framework/1.3.0/
> 
> Compile your Qt how you need it. (remove unneeded files '*.prl', '*.app', '*.exp', '*.ilk', '*.pdb', *.obj, debugging inside Qt is not working anyway)
> 
> Then
> 
> create a directory "my_qt" and inside that:
> directory "meta" and inside that 
> file package.xml:
> <?xml version="1.0"?>
> <Package>
>    <DisplayName>My Qt</DisplayName>
>    <Description>my special Qt for you</Description>
>    <Version>4.8.4-1</Version>
>    <ReleaseDate>2013-04-11</ReleaseDate>
>    <Script>installscript.js</Script>
> </Package>
> 
> file installscript.js:
> // constructor
> function Component()
> {
> }
> 
> Component.prototype.createOperations = function()
> {
>    component.createOperations();
>    var patchMode;
>    if (installer.value("os") == "win")
>        patchMode = "windows";
>    if (installer.value("os") == "x11")
>        patchMode = "linux";
>    if(installer.value("os") == "mac")
>        patchMode = "mac";
> 
>    // last empty argument is a workaround to enable Qt4 patching,
>    // it is fixed after the last release of the ifw (Mea culpa!)
>    component.addOperation("QtPatch", patchMode, "@TargetDir@/my_special_qt", "");
> }
> 
> Then create a "data" directory on the same level like the meta one and inside that you need to copy your Qt directory "my_special_qt".
> 
> Then you need a installer config.xml somewhere ... using the one from the ifw example is ok:
> 
> QtIFW-1.3.0/bin/binarycreator --offline-only -t QtIFW-1.3.0/bin/installerbase -c QtIFW-1.3.0/examples/tutorial/config/config.xml -p <path_where_my_qt_is> -i my_qt my_special_qt_installer
> 
> Ready is your own simple qt installer.<my_qt.7z>


This is great. I am trying to work through your instructions and I have what I think is the correct directory setup and the arguments are pointing to everything but early on in the process I get this error:

        Found configuration file:  "C:/Users/mjackson/Desktop/DREAM3D_SDK_x64_VS
2010_SP1/data/Qt-4.8.4/config.profiles/symbian/translations/qt_zh_TW.ts"
        Found configuration file:  "C:/Users/mjackson/Desktop/DREAM3D_SDK_x64_VS
2010_SP1/data/Qt-4.8.4/config.profiles/symbian/translations_symbian/Makefile"
create Error-Exception: "Could not copy C:/Users/mjackson/Desktop/DREAM3D_SDK_x6
4_VS2010_SP1/data/Qt-4.8.4/config.profiles/symbian/translations_symbian/Makefile
."
caught exception: Could not copy C:/Users/mjackson/Desktop/DREAM3D_SDK_x64_VS201
0_SP1/data/Qt-4.8.4/config.profiles/symbian/translations_symbian/Makefile.


I have plenty of room on the drive. I have permissions on the files?  Here is my command line invocation:

C:\Users\mjackson\Desktop>binarycreator --offline-only -t %QTIFW_INSTALL%\bin\installerbase -c DREAM3D_SDK_x64_VS2010_SP1/config.xml -v -i DREAM3D_SDK_x64_VS2010_SP1 -p DREAM3D_SDK_x64_VS2010_SP1\data\Qt-4.8.4 --ignore-translations DREAM3D_SDK_x64_VS2010_SP1.exe

I have QtIFW installed into C:/Applications/QtIFW-1.3.0 and I have the environment variable QTIFW_INSTALL set to that directory. In addition I have added %QTIFW_INSTALL%/bin to my path.

Any ideas? This is on Windows 7 x64 running inside a parallels VM.

Thanks
Mike Jackson




More information about the Interest mailing list