Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Finishing app
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Finishing app

Scheduled Pinned Locked Moved General and Desktop
12 Posts 4 Posters 4.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dimbreath
    wrote on last edited by
    #1

    Well, this is a question i've been having for a long amount of time. I don't even know if this is the right section but here i go.

    Let's say i finish my application, how do i exactly distribute it? I mean, it requires Qt libraries to run, i can re-distribute them with my application? (Using an installer, it installs the application and the Qt libraries required to run). What exact libraries should i re-distribute in the case i have to?

    What if for example i look at one of the Qt examples and i adapt the code (Modifying it.) to work with my current one? Does that change on something?

    Thanks and sorry for the questions.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      The end-user doesn't need a full Qt installation to run Qt-based applications. Assuming you are on Windows, just distribute the Qt DLL's that your application depends on along with the EXE file. Put the DLL's and the EXE file into the same folder. If you are using MSVC you may also need to put the compiler-specific MSVCRT DLL's into that folder. That's it. In the easiest case you just package everything your application needs into a ZIP file for distribution. There also are a lot of tools that can convert such ZIP file into a "self-extracting" EXE file. For a more sophisticated "Setup" program use "NSIS":http://nsis.sourceforge.net/Main_Page or, alternatively, "Inno Setup":http://www.jrsoftware.org/isinfo.php!

      If in doubt which DLL's your EXE file depends on (either directly or indirectly) use Dependency Walker:
      http://www.dependencywalker.com/

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dimbreath
        wrote on last edited by
        #3

        Where are those DLLs located? I remind some people telling not to use the DLLs on the Qt installation folder.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MuldeR
          wrote on last edited by
          #4

          The DLL's are located in your Qt installation folder inside the "bin" sub-folder.

          You should redistribute the DLL's from the very same Qt version that you used to build your application.

          For distribution, simply put the required DLL's into the same folder as the EXE file.

          (Do NOT "install" the DLL's into "C:\Windows" or "C:\Windows\System32", because it causes DLL Hell!)

          And again: Use Dependency Walker to figure out which DLL's your application really needs :-)

          My OpenSource software at: http://muldersoft.com/

          Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

          Go visit the coop: http://youtu.be/Jay...

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Dimbreath
            wrote on last edited by
            #5

            Hm, thank you. :)

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hsrt
              wrote on last edited by
              #6

              Hello,

              I have a question. My exe is fine, it runs on another computer. My app has a gui, the black terminal is occured when I run .exe ...But I don't want to create it.Is this situation normal state?

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kegon
                wrote on last edited by
                #7

                Have you tried windeployqt.exe or macdeployqt ?

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hsrt
                  wrote on last edited by
                  #8

                  I use windows.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    MuldeR
                    wrote on last edited by
                    #9

                    [quote author="hsrt" date="1396901206"]Hello,

                    I have a question. My exe is fine, it runs on another computer. My app has a gui, the black terminal is occured when I run .exe ...But I don't want to create it.Is this situation normal state?[/quote]

                    On Windows, program files can be compiled with subsystem "Windows" or "Console". Only the latter will have a console window attached. If you use Visual Studio compiler, you can control it with the /SUBSYSTEM option.

                    Also note that for "Console" application you must have a main() or wmain() function as the entry point of your program, but for "Windows" applications you need to have a wWinMain() function (or link in qtmain.lib) instead!

                    See also:
                    http://msdn.microsoft.com/en-us/library/fcc1zstk.aspx

                    My OpenSource software at: http://muldersoft.com/

                    Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

                    Go visit the coop: http://youtu.be/Jay...

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hsrt
                      wrote on last edited by
                      #10

                      I use QT Creator. There is "main" function in my project. sorry, I don't understand clearly what I should do.

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        MuldeR
                        wrote on last edited by
                        #11

                        [quote author="hsrt" date="1396904788"]I use QT Creator. There is "main" function in my project. sorry, I don't understand clearly what I should do.[/quote]

                        See here:
                        http://qt-project.org/forums/viewthread/20168/#97251

                        My OpenSource software at: http://muldersoft.com/

                        Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

                        Go visit the coop: http://youtu.be/Jay...

                        1 Reply Last reply
                        0
                        • H Offline
                          H Offline
                          hsrt
                          wrote on last edited by
                          #12

                          thanks, it works :)

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved