Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: How to make the quick application executable in windows?

  1. #1
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default How to make the quick application executable in windows?

    Hello guys,Would you please tell me How can I make a working .exe program with Qt Quick.
    I’m using Qt5 with Visual studio 2010,in windows 7(64bit) So which project should I choose (Qt quick 2 application or Qt quick2 UI or what?) and what are the steps should I follow.
    -I only want to run the hello world example from the exe.
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    Qt Quick 2 Application. The wizard will set up all necessary code for you.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Baso (3rd February 2013)

  4. #3
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    Yes I tried Qt quick 2 application, and I configured the project build setting to release, and I put the *.dll files that the *.exe file asked for in the same folder with the *.exe file, but when I run the *.exe file It doesn't show any thing not even error or any thing
    Help please

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    Did you put the qml files there as well? Can your program find them?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Baso (3rd February 2013)

  7. #5
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    If you mean putting the main.qml file of the project in the same folder with *.exe file, I did it and it didn't do any different

  8. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    I don't know where it should be put. It depends on your application. See if your app starts at all and see if it can find the files it needs. Did you remember to deploy the QtQtuick2 plugin as well? And possibly other plugins your code depends on?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Baso (3rd February 2013)

  10. #7
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    LOOk, I will tell you what exactly I do
    I choose Qt quick 2 application, then give it a name and directory to save,then I go to projects from the left->build setting-edit build configuration and I choose release, then I just run the application from The Qt creator, it runs very well it shows my the hello world window and then I click it and it is closed.
    I go to where I saved the project, I find two folders one for the project and the other for the build, I open the one for the build and inside it I open the folder release, hence I find the *.exe file, If I run it, it asks for some dlls, I go to Qt directory in C portion I make a search for the dlls or simply open the bin folder and get the required dlls, I copy the dlls and paste them in the same release folder where the *.exe file lies,then I run the *.exe file and it doesn't show anything no error no file required nothing at all.
    Then I got the *qml file form the build foldre -> qml folder and copy it in the same release folder with the *.exe, and run and also nothing happen.

    I'm sorry for all of that writhing, but I want to show you exactly what I do, cause I really stuck here, and can't do anything from 2 days
    Thank you

  11. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    Quote Originally Posted by Baso View Post
    Then I got the *qml file form the build foldre -> qml folder and copy it in the same release folder with the *.exe,
    That's probably wrong. Your application probably expects the file to be in the "qml" folder if it was initially there.

    and run and also nothing happen.
    There is a difference between "nothing happens" and "I can't see my QML UI". If "nothing happens" then the app doesn't start which is probably caused by missing dlls. If "I can't see my QML UI" then the process runs (the mandatory DLLs are present) but can't display your UI (missing QML file, missing plugins). You need to teach your app to report its state if you're unable or unwilling to use external tools to verify what is wrong.

    For QtQuick apps to work, you need at least the following:
    1. Qt dlls (QtCore, QtGui, QtQuick are the bare minimum)
    2. their dependencies and compiler runtime
    3. your application resources (qml files, images, etc.)
    4. plugins for QML that your app relies on (probably at least "qml/QtQuick.2/*", possibly others)
    5. Qt dlls those plugins rely on and Qt plugins your resources rely on (e.g. imageformats plugins)
    6. your application executable

    If unsure, perform dynamic (runtime) inspection of your program using the dependency walker. It will tell you which libraries are used by your app. Then you have to make sure all of them are inplace when you deploy your app.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. The following user says thank you to wysota for this useful post:

    Baso (3rd February 2013)

  13. #9
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    I downloaded dependence walker 2.2 and I opened the *.exe file of my project with it, it shows me that the file(IEShims.dll) was missing, but I found it in Internet explorer folder and pasted with my *.exe file, then I ran the dependence walker again and here is a photo for what I got.
    Untitled.jpg

    -The program still doesn't work!!

    Here is link for the photo (better quality )
    http://imageshack.us/photo/my-images/37/76012486.png/

  14. #10
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,552
    Thanks
    13
    Thanked 1,579 Times in 1,508 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to make the quick application executable in windows?

    Remove IEShims, it's always 'missing' and this is not the cause of your initial problem.

    Open a command prompt, change directory to the deployed program exe folder (or the shadow build folder not the source folder), run "dir /s" and post the resulting text here in [code][/code] tags

  15. The following user says thank you to ChrisW67 for this useful post:

    Baso (3rd February 2013)

  16. #11
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    Here is resulting text

    Qt Code:
    1. C:\Users\FBM\Desktop\center-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Release\re
    2. lease>dir /s
    3. Volume in drive C has no label.
    4. Volume Serial Number is C441-5CF3
    5.  
    6. Directory of C:\Users\FBM\Desktop\center-build-Desktop_Qt_5_0_0_MSVC2010_32bit_
    7. SDK-Release\release
    8.  
    9. 02/01/2013 05:27 PM <DIR> .
    10. 02/01/2013 05:27 PM <DIR> ..
    11. 02/01/2013 05:27 PM 15,360 center.exe
    12. 02/01/2013 05:27 PM 638 center.exe.embed.manifest
    13. 01/30/2013 12:42 PM 2,106,216 D3DCompiler_43.dll
    14. 01/30/2013 12:44 PM 17,956,864 icudt49.dll
    15. 01/30/2013 12:44 PM 1,330,688 icuin49.dll
    16. 01/30/2013 12:44 PM 1,053,184 icuuc49.dll
    17. 01/30/2013 12:43 PM 679,936 libGLESv2.dll
    18. 02/01/2013 05:27 PM 13,436 main.obj
    19. 02/01/2013 05:23 PM 270 main.qml
    20. 02/01/2013 05:24 PM 2,999 moc_qtquick2applicationviewer.cpp
    21. 02/01/2013 05:24 PM 13,701 moc_qtquick2applicationviewer.obj
    22. 01/30/2013 12:44 PM 3,674,624 Qt5Core.dll
    23. 01/30/2013 12:44 PM 2,832,384 Qt5Gui.dll
    24. 01/30/2013 12:44 PM 820,736 Qt5Network.dll
    25. 01/30/2013 12:44 PM 1,367,552 Qt5Qml.dll
    26. 01/30/2013 12:44 PM 1,970,688 Qt5Quick.dll
    27. 01/30/2013 12:44 PM 2,486,272 Qt5V8.dll
    28. 01/30/2013 12:44 PM 4,252,672 Qt5Widgets.dll
    29. 02/01/2013 05:24 PM 26,887 qtquick2applicationviewer.obj
    30. 19 File(s) 40,605,107 bytes
    31.  
    32. Total Files Listed:
    33. 19 File(s) 40,605,107 bytes
    34. 2 Dir(s) 29,908,721,664 bytes free
    35.  
    36. C:\Users\FBM\Desktop\center-build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Release\re
    37. lease>
    To copy to clipboard, switch view to plain text mode 

  17. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    What you have does not include points #2, #4 and #5 in my list. You do have a bunch of unneeded files though, like all the obj files and possibly Qt5Widgets library.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  18. The following user says thank you to wysota for this useful post:

    Baso (3rd February 2013)

  19. #13
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    So How can I include your #2, #4 and #5 points, Where to get these files mentions in these points?

    I'm sorry, but this is the Newbie section

  20. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    I really suggest you do a dynamic profile of your app using Dependency Walker, it will show you which files get loaded into your app. Also I suggest to provide some error reporting in your application code, e.g. when QML engine throws an exception, output it to the console.

    I cannot tell what exactly your app depends on because I can't see your app's code. I can only guess it depends on the QtQuick plugin (qml/QtQuick.2/*) and possibly on some imageformat plugins if your application uses resources requiring those. Furthermore I think your QML file is in a wrong place. If you used the defaults in the new project wizard, then qml files should have landed in qml/<yourprojectname>/* but you copied them to a totally different path. I understand this is a newbie section but it doesn't mean you shouldn't at least take a look at the code generated for you. The main() function clearly states where it loads the QML file from.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  21. The following user says thank you to wysota for this useful post:

    Baso (3rd February 2013)

  22. #15
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    Look, It's not a problem with my project, so you can't tell me exactly what my app depends on cause you can't see the code, It is simply I made A Qt quick 2 application, and didn't write any single line,there are those who already written by default for a simple hello world.
    So my question is how to run this simple hello world example directly from exe file rather than from Qt creator?

    Thanks

  23. #16
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    Quote Originally Posted by Baso View Post
    It is simply I made A Qt quick 2 application, and didn't write any single line,there are those who already written by default for a simple hello world.
    So my question is how to run this simple hello world example directly from exe file rather than from Qt creator?
    Ok. I'm not on Windows right now so I might be making some errors in commands but hopefully you can fix them yourself.

    md C:\Untitled
    md C:\Untitled\qml
    md C:\Untitled\qml\Untitled
    copy <MyProjectBuildDir>\Release\Untitled.exe C:\Untitled
    copy <MyProjectDir>\qml\Untitled\main.qml C:\Untitled\qml\Untitled
    copy <MyQtDir>\bin\Qt5Core.dll C:\Untitled\
    copy <MyQtDir>\bin\Qt5Quick.dll C:\Untitled\
    copy <MyQtDir>\bin\Qt5Gui.dll C:\Untitled\
    copy <MyQtDir>\bin\Qt5Qml.dll C:\Untitled\
    copy <MyQtDir>\bin\Qt5Network.dll C:\Untitled\
    copy<MyQtDir>\bin\Qt5Gui.dll C:\Untitled\
    copy <MyQtDir>\bin\Qt5V8.dll C:\Untitled\
    copy <MyQtDir>\bin\icu*.dll C:\Untitled\
    md C:\Untitled\qml\QtQuick.2
    copy <MyQtDir>\qml\QtQuick.2\* C:\Untitled\qml\QtQuick.2
    copy C:\Windows\system32\msvc*10*.dll C:\Untitled


    This should be enough for an empty project. However if you add even a single line anywhere, the set of dependencies might be completely different and without knowing how to find them yourself, you'll be as stuck as you are now.
    If it doesn't work, copy EVERYTHING from <MyQtDir>\bin and <MyQtDir>\plugins into C:\Untitled
    Last edited by wysota; 2nd February 2013 at 18:28.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  24. The following user says thank you to wysota for this useful post:

    Baso (3rd February 2013)

  25. #17
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    I did exactly what you told, and the exe asked me also for (libGLESv2.dll) and I got it, past it with the other dlls, Guess what!!! ,NOTHING , nothing happened at all, no errors no empty window,s complete silent like Desert
    I'm desperate

  26. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    Did you teach your app to report its errors like I asked you?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  27. The following user says thank you to wysota for this useful post:

    Baso (3rd February 2013)

  28. #19
    Join Date
    Feb 2013
    Posts
    28
    Thanks
    13
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: How to make the quick application executable in windows?

    How can I do that?, I didn't find anything in Google related to this.

  29. #20
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to make the quick application executable in windows?

    At least put some qDebug() or cout statements in your application's code (remember to add CONFIG+=console to the project file), check if the file you are trying to feed to the application viewer exists, etc. See if your program runs at all and if it outputs any messages to the console.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  30. The following user says thank you to wysota for this useful post:

    Baso (3rd February 2013)

Similar Threads

  1. Replies: 9
    Last Post: 4th November 2011, 16:56
  2. Problem deploying a two library + executable application to windows
    By joseprl89 in forum Installation and Deployment
    Replies: 8
    Last Post: 15th March 2011, 20:52
  3. How to make my Qt project executable
    By mebingj in forum Installation and Deployment
    Replies: 1
    Last Post: 14th March 2011, 13:23
  4. Replies: 1
    Last Post: 9th November 2009, 09:27
  5. How to make MAC version of Windows QT application
    By qtUser500 in forum Installation and Deployment
    Replies: 2
    Last Post: 8th October 2009, 14:27

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.