Making my process successful again on creating an installer for an app



  • Hi guys,

    For some reason I was away from the world of computers and recently came back. This made many problems for me when I tried to go on my favorite work (programming using Qt) and also when I wanted to create an installer for my app as before. :(
    I'm on my way now and won't leave it anymore. :)

    I tried to make an installer for my prior app. I'd kept all needed files and data but unfortunately all are corrupted seemingly. Therefore, I searched for my previous threads on this forum and found them and started and ended the work up to now.

    I recovered most of the files and reading those threads was helpful.
    But now I think I'm a little away of the last point to be successful on creating that installer.

    Let me list the details:
    I have a Windows 7 x64 machine, and installed Qt 5.9 with these contents And also Qt Installer Framework Opensource 2.0.1.

    Using the Qt code, that I had in the past, I copied the Qt_Calculator.exe file from Release folder and pasted it into a folder named Result on the desktop.

    After these, I created a folder named package_directory on desktop with two folders inside it, config and packages.

    The config folder contains a file named config.xml with these contents.
    (As you see the shape of the config.xml file is the same as a .txt file and doesn't have an .xml display! I don't know why. :(( )

    The packages folder contains another folder named com.vendor.product and inside it two other folders named data and meta.
    The data folder's contents are these. And the meta folder's contents these.

    There are 3 files in that folder:
    The package.xml file with these data.
    The license file which a text file.
    And a installscript.qs file which is corrupted and shows only zeros! (000000)

    I think the first thing I need is a correct version of that installscript.qs and after that I'm going to do some commands as below using a CMD:

    C:\Qt\QtIFW2.0.1\bin\binarycreator.exe -c C:\Users\Abbasi\Desktop\package_directory\config\config.xml -p C:\Users\Abbasi\Desktop\package_directory\packages C:\Users\Abbasi\Desktop\Result\Qt_Calculator.exe

    Some questions:

    1- Will it be now sufficient for creating the installer?
    2- Where to use the windeployqt.exe file then?
    3- Don't I need more .dll files in my data folder please?

    Thanks beforehand.



  • Hi guys,

    I changed the package.xml to this:

    <?xml version="1.0" encoding="UTF-8"?>
    -<Package>
    <DisplayName>Qt Calculator</DisplayName>
    <Description>A Calculator Written in Qt by Purely C++ Code</Description>
    <Version>1.1</Version>
    <ReleaseDate>2017-03-23</ReleaseDate>
    <Name>com.vendor.root.component2</Name>
    -<Licenses>
    <License file="License.txt" name="Beer Public License Agreement"/>
    </Licenses>
    <Dependencies>com.vendor.root.component1</Dependencies>
    <Virtual>false</Virtual>
    <Default>script</Default>
    <Script>installscript.qs</Script>
    -<UserInterfaces>
    <UserInterface>page.ui</UserInterface>
    </UserInterfaces>
    </Package>
    

    I then by a CMD went into the path of binarycreator.exe file and wrote the command and hit Enter. I got these. :(

    I also searched the Web for finding a way for a .qs file but couldn't find a way to create that installscript.qs file. :( :(
    If I can create that .qs file I want to put into it the following data:

    function Component()
    {
        // Install to @RootDir@ instead of @HomeDir@ on Windows
        if (installer.value("os") === "win") {
            var homeDir = installer.value("HomeDir");
            var targetDir = installer.value("TargetDir").replace(homeDir, "@RootDir@");
            installer.setValue("TargetDir", targetDir);
        }
    
        // do not show component selection page
        installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
        // no startmenu entry so no need to ask where to create it
        installer.setDefaultPageVisible(QInstaller.StartMenuSelection, false);
    }
    

    Any idea, please?



  • Guys, hi again.

    I made many changes so if you have time please take a look at them.
    I created the installscript.qs file and put the code above (previous post) into it. Then a pageform.ui file as well (that has no special thing in it).

    Then I used a CMD command and got some paths issue, I think. They are here.

    Would you tell me which step I'm wrong in?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.