Results 1 to 10 of 10

Thread: Making Standalone Application

  1. #1
    Join Date
    Sep 2013
    Posts
    44
    Thanks
    9
    Qt products
    Qt5
    Platforms
    MacOS X Windows Android

    Default Making Standalone Application

    For my first application, I decided to make a calculator is Qt.(I downloaded qt yesterday).
    I want to know the process of making that exe into a standalone executable file.
    It RUNS fine, but after building, it shows many dlls are missing.
    I read about static library etc. but I didn't understand how to use it.
    also , I have not downloaded anything apart from the windows 32bit qt(666mb).
    thanks in advance.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Making Standalone Application

    Do more reading on how to make a static build of qt. please be aware that binaries you build are practically* only useable for yourself - you are not allowed to distribute the apps you build like that to other people unless you pay for a commercial Qt license.

    *there are caveats, but I don't think there is much point in bringing them up here.

    Do you REALLY want to know how to make a single-file executable, or do you just want to know how to make an 'installable program'?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Sep 2013
    Posts
    44
    Thanks
    9
    Qt products
    Qt5
    Platforms
    MacOS X Windows Android

    Default Re: Making Standalone Application

    I read static qt.
    I didn't understand.

    and yes, I want to know how to make a single file exe.
    (tell me what other ways are there to distribute too).

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Making Standalone Application

    The other, more usual way, is to distribute a dynamically linked application (bundled in an installer as needed). This is described on the same deployment page in the Qt docs as a static build. A dynamic build and deployment is all that is possible with the out-of-the-box Qt binaries anyway. IMHO it is also the easiest way to deploy a Qt application.

    You can distribute a statically linked Qt application under the any of the Qt licences but you must meet the requirements of the licence you are using Qt under.

  5. #5
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Making Standalone Application

    Quote Originally Posted by harvey_slash View Post
    I read static qt.
    I didn't understand.

    and yes, I want to know how to make a single file exe.
    (tell me what other ways are there to distribute too).
    please answer this question: Do you intend in distributing the program(s) you build into a single exe?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  6. #6
    Join Date
    Jun 2007
    Posts
    23
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Making Standalone Application

    Quote Originally Posted by amleto View Post
    please be aware that binaries you build are practically* only useable for yourself - you are not allowed to distribute the apps you build like that to other people unless you pay for a commercial Qt license
    Are you kidding? Why it is not possible to distribute a statically linked program that is licensed under (L)GPL for example?

  7. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Making Standalone Application

    With static linking it is impossible with the GPL, and just impractical with the LGPL, if you want to keep your source code closed. If you are willing to distribute source for your program/library under the GPL or LGPL then there is no issue.

  8. #8
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Making Standalone Application

    It is best not to be distracted with the type of linking when considering licensing, none of the involved licenses make a distinction for that.

    When using a library, any library, you are obligated to fullfil its license conditions. Unless these conditions contain explicit wording regarding to types of linking, they apply to all forms of incorporation, whether it is copying code into the application, dynamically or statically linking with a modified or unmodified library.

    If we look at the licenses at hand, the primary focus of each license's condition is:
    - GPL: ensure unrestricted usage, ensure access to application sources
    - LGPL: ensure unrestricted usage, ensure modifyability of the LGPL part of the final software
    - commerical: ensure sustained income for development, limit code distribution requirements

    Cheers,
    _

  9. #9
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Making Standalone Application

    ensure modifyability of the LGPL part of the final software
    That is significantly more difficult with a single binary (static linking) if you don't want to disclose your own source, so I think it is worthwhile being 'distracted' by linking decisions and their impact.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  10. #10
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Making Standalone Application

    Quote Originally Posted by amleto View Post
    Do you REALLY want to know how to make a single-file executable, or do you just want to know how to make an 'installable program'?
    I know this properly don´t answer the raised question, but personally I prefer the 2nd option ( create a single .exe installer file ).
    This way, further maintenance, upgrade and error debugging due to different Windows version, becomes easiest.

    I already used the INNO SETUP, a freeware amazing tool.

    +++

Similar Threads

  1. QT standalone application for symbian
    By sanoof in forum Newbie
    Replies: 3
    Last Post: 10th July 2012, 09:24
  2. Replies: 9
    Last Post: 4th November 2011, 16:56
  3. Replies: 5
    Last Post: 27th July 2011, 19:02
  4. Problem making a standalone qml app.
    By GuglielmoD in forum Qt Quick
    Replies: 3
    Last Post: 27th November 2010, 00:25
  5. Qt standalone application with Cocoa Library Crash
    By rokkamraja in forum Qt Programming
    Replies: 0
    Last Post: 8th June 2010, 14:21

Tags for this Thread

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.