Results 1 to 7 of 7

Thread: On the way of making an app installable

  1. #1
    Join Date
    Jan 2016
    Posts
    76
    Thanks
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows Android

    Default On the way of making an app installable

    Hi all,

    I assume you, too, have done this process. If so please guide me.

    I finished my app and ran it in both Debug and Release modes. And then made a folder named Cal on my desktop and brought the .exe file from the Release folder and put that .exe plus some .dll files onto it so that made it executable.

    My machine is a win 7 x64 and use Qt Creator 5.7.
    My Cal folder is on this path: C:\Users\ME\Desktop\Cal
    And the Debug and Release folders are on this path: C:\Users\ME\Documents\Qt

    My purpose as the title says, is making the app installable to send it to others and be sure that it will be installed on their Windows machines as well.
    For this, I was advised to see and follow this Docs:
    http://doc.qt.io/qt-5/deployment.html

    I read the first page and until now I have a question. It says: "All you need to do is to build Qt and your application in release mode..."
    Building the application means running it (because when we run some app it first will be built then run), but what does "building Qt" mean? Is Qt build-able!?

    After reading that page I went for the next Qt For Windows page there:
    http://doc.qt.io/qt-5/windows-deployment.html

    I found the windeployqt.exe file in this path: C:\Qt\Qt5.7.0\5.7\mingw53_32\bin\windeployqt.exe

    Now I'm at the beginning of the dark cadre on how to use that executable file.
    It says: "The simplest way to use windeployqt is to add the bin directory of your Qt
    installation (e.g. <QT_DIR\bin>) to the PATH variable and then run:
    windeployqt <path-to-app-binary>
    "

    Does it mean I should run that .exe file from some folder's path (say, the Release or Cal folder)?

    Have I gone the way right?

    Thank you.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: On the way of making an app installable

    Step 1:

    It says: "The simplest way to use windeployqt is to add the bin directory of your Qt installation (e.g. <QT_DIR\bin>) to the PATH variable
    Go into Control Panel, System, Advanced Systems Settings, Environment Variable and add the path to your Qt bin directory, presumably "C:\Qt\Qt5.7.0\5.7\mingw53_32\bin" to the PATH variable if it is not already there. Do it correctly or your could break your Windows environment. Look at other entries in PATH and add your Qt path the same way. Put a semicolon (";") after your path information if it is not at the end of the list.

    Step 2:

    then run: windeployqt <path-to-app-binary>"
    which in your case means to open an MS-DOS command window and type

    windeployqt C:\Users\ME\Documents\Qt\Release\name-of-your-program.exe

    (or you could cd to C:\Users\ME\Documents\Qt\Release and just type "windeployqt name-of-your-program.exe", where of course you put the actual name of your program instead of "name-of-your-program")

    I have never used this tool, but I assume it will create a new EXE or MSI installer file that will contain everything needed to install your program on another PC. Do not do this with the Debug version of your program. It almost certainly will not work because a Debug mode program is not compatible with the Release mode Qt DLLs the deployment tool will copy into the installer.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. The following user says thank you to d_stranz for this useful post:

    franky (4th February 2017)

  4. #3
    Join Date
    Jan 2016
    Posts
    76
    Thanks
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: On the way of making an app installable

    Thank you for your answer.
    I used windeployqt that way and my Release folder changed like this:
    http://uploads.im/ViqNX.jpg

    After these I downloaded:

    qt-installer-framework-opensource-2.0.1-x86.run
    qt-installer-framework-opensource-2.0.1-x64.run
    qt-installer-framework-opensource-2.0.1-src


    And also have the Release folder that I used it for windeployqt by a Command Prompt in previous step.

    Now my questions is, what is the rest of the process?
    What other steps do I need to do for making the app installable please?

    If you have any idea in mind, I would be very appreciative to hear it.
    Thanks.

  5. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: On the way of making an app installable

    Well, apparently what the windeployqt tool does is to copy the Qt DLLs your app needs into your Release folder. It doesn't create an installer like I thought.

    It looks like the Qt Installer Framework that you downloaded will actually create the installation program. Why don't you read the manual and learn how to use it?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  6. The following user says thank you to d_stranz for this useful post:

    franky (4th February 2017)

  7. #5
    Join Date
    Jan 2016
    Posts
    76
    Thanks
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: On the way of making an app installable

    Thank you.

    Honestly I have been really confused and exhausted because it has been for long while trying just to make a installable app but it is very complicated and there is no clear way. but I don't know why. :

    Thanks for your reply. I went for that page. And want to Offline Installer . I continue reading until next pages the section: Configuring Qt for Windows. There it says I should run a command line as follows:

    configure -prefix %CD%\qtbase -release -static -static-runtime ... (A very long command. Please take a look at it there.)

    But I don't have a configure.exe file to use that command.
    Did you see? They are just confusing others. Why they should be that unclear? What is the reason? Shouldn't we be able to make a installable app?

    I'm just confusing and confusing. Sorry.

  8. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: On the way of making an app installable

    Configuring Qt for Windows
    No, no, no. You already have everything configured for Qt. Start reading the tutorial here.

    Creating installers using any tool is not easy. There is nothing that I know of that is simple like "Click a button" and it creates an installer for your program. So if you want to create a setup program that will install your app correctly, you are going to have to teach yourself how.
    Last edited by d_stranz; 5th February 2017 at 01:27.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  9. The following user says thank you to d_stranz for this useful post:

    franky (5th February 2017)

  10. #7
    Join Date
    Jan 2016
    Posts
    76
    Thanks
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: On the way of making an app installable

    Thank you for your guide. I appreciate it.

    I followed the link you offered. I did these:

    1- Went to [this page]http://doc.qt.io/qtinstallerframewor...scription.html for creating a package directory first. So I created a folder named package directory on my Desktop and created two subdirectories named data and meta in it.

    2- Using a Notepad I created a package.xml file using the example that page offered for it. The xml file contains these:

    <?xml version="1.0"?>

    -<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>
    <Dependencies>com.vendor.root.component1</Dependencies>
    <Virtual>false</Virtual>
    <Default>false</Default>
    <ForcedInstallation>false</ForcedInstallation>
    <Essential>false</Essential>
    <Replaces>com.vendor.root.component2old</Replaces>
    </Package>


    I filled only the required fields and since this is the first time for me, I tried to make it concise as above.

    Now I have two questions please:
    1- Have I done the work correctly up to this point?

    2- For the data subdirectory, the link says "The data directory contains the content that the installer extracts during the installation." What content does it mean? I have the Release folder plus qt-installer-framework-opensource-2.0.1-x86.run only.

    What after it please: [Controller Scripting](http://doc.qt.io/qtinstallerframewor...teractive.html) or [the main section](http://doc.qt.io/qtinstallerframework/ifw-tutorial.html) to follow the work?
    Last edited by franky; 5th February 2017 at 10:20.

Similar Threads

  1. creation of installable file
    By jjbabu in forum General Discussion
    Replies: 6
    Last Post: 11th March 2008, 09:32
  2. Need help making plugin
    By vieraci in forum Qt Programming
    Replies: 10
    Last Post: 24th September 2007, 13:20
  3. making a backup of qt3
    By nass in forum Qt Programming
    Replies: 12
    Last Post: 4th April 2007, 20:23
  4. making help file
    By deekayt in forum Qt Programming
    Replies: 1
    Last Post: 30th October 2006, 17:38
  5. Help pls with making examples (QT 4.2)
    By igor_x in forum Installation and Deployment
    Replies: 3
    Last Post: 23rd October 2006, 12:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.