[Interest] Creating Installer for custom Build of Qt

Jenssen Tim Tim.Jenssen at digia.com
Thu Apr 11 17:25:47 CEST 2013


> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_qt.7z
Type: application/octet-stream
Size: 683 bytes
Desc: my_qt.7z
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130411/31b6fc8b/attachment.obj>


More information about the Interest mailing list