Re: [Interest] Porting Qt app to windows
2012/6/20 Diego Iastrubni diegoi...@gmail.com: ... And telling QApplication where to look for them, also was quite fun learning... If you place them in the standard location - as indicated in the mentioned Qt docs - there is no need to programatically tell the Qt framework where to look for them (the application directory will serve as 'plugin-base' directory): http://qt-project.org/doc/latest/deployment-plugins.html#the-plugin-directory Except on Mac, where it is advisable to generate a proper qt.conf file with the proper Plugins entry: http://doc.qt.nokia.com/latest/qt-conf.html (or use the programmatical approach as previously explained, using relative paths to point to the Qt plugin directory within the application bundle). Cheers, Oliver ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
If you don’t have to debug on windows MXE will work.. However I highly recommend using CMake rather than QMake, it just works better… (not baiting a flame war, my opinion only) Building Qt for your compiler (dev studio) is easy, but takes a couple hours depending on your machine.. But it’s a one time hit. Then you will have the choice of QtCreator on windows or Dev Studio Scott From: interest-bounces+scott=onshorecs@qt-project.org [mailto:interest-bounces+scott=onshorecs@qt-project.org] On Behalf Of Diego Iastrubni Sent: Tuesday, June 19, 2012 5:14 AM To: Chasc Cc: interest@qt-project.org; Nikos Chantziaras Subject: Re: [Interest] Porting Qt app to windows On Tue, Jun 19, 2012 at 6:08 AM, Chasc ch...@tpg.com.au wrote: OK, I have MXE working like a charm. Thanks! The problem though is that it builds everything statically. I am not sure how this sits with Nokia's LGPL licence agreement although my software is not for sale and is only being used in-house. How would I get on publishing a GPL app? (Pardon my ignorance here) ןֳאקרמשך ודשעק?On Sun, 2012-06-03 at 00:47 +0300, Nikos Chantziaras wrote: On 01/06/12 14:49, Chasc wrote: I have recently developed a C++ desktop application in Linux using Qt Creator and have successfully opened the project in the Windows version of Qt Creator. The app runs successfully in the windows Qt Creator IDE but fails to run independently on the Windows platform. I do not have the same problem in Linux. So how can I package this app to run on other Windows machines using dynamic linking? I have tried including QtGui4.dll, QtCore4.dll, libgcc_s_dw2-1.dll and mingwm10.dll libraries in the release directory but all I get is something about a procedure entry point not being located in QtCore4.dll. I am using Qt 4.7.4. If you're not using WebKit*, I recommend MXE (http://mxe.cc http://mxe.cc/ ) for building Windows executables directly from Linux. Hasn't let me down yet. * WebKit is broken for static linking. Internal usage? Not distributing? No problem. you are not obligated to share your application, and not the modifications you did to Qt4. LGPL applies only to distributing your application. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Date: Tue, 19 Jun 2012 13:08:07 +1000 From: Chasc ch...@tpg.com.au So how can I package this app to run on other Windows machines using dynamic linking? I have tried including QtGui4.dll, QtCore4.dll, libgcc_s_dw2-1.dll and mingwm10.dll libraries in the release directory but all I get is something about a procedure entry point not being located in QtCore4.dll. I am using Qt 4.7.4. It sounds like you're not including the correct QtCore4.dll, since the one being used doesn't have the missing entry point. Verify you put the correct DLL into your .exe directory. And verify that that is the QtCore4.dll being loaded into your running process, either by SxStrace.exe (Vista or later) or Depends (third party free app). Also I would try this on a PC (either real or virtual) that has a fresh Windows installed (and try all versions of Windows you need to support, e.g. XP/Vista/7) and make sure you are providing all the required DLL's (that are not present on a fresh Windows installation). Good luck, David ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
On Tue, Jun 19, 2012 at 5:36 PM, David Ching d...@dcsoft.com wrote: Also I would try this on a PC (either real or virtual) that has a fresh Windows installed (and try all versions of Windows you need to support, e.g. XP/Vista/7) and make sure you are providing all the required DLL's (that are not present on a fresh Windows installation). I just rename the name of the Qt directory temporarily to _Qt or something and then rename back when I need to code... Ugly, but simulates uninstallation of Qt. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
On 19/06/12 06:08, Chasc wrote: On Sun, 2012-06-03 at 00:47 +0300, Nikos Chantziaras wrote: On 01/06/12 14:49, Chasc wrote: I have recently developed a C++ desktop application in Linux using Qt Creator and have successfully opened the project in the Windows version of Qt Creator. The app runs successfully in the windows Qt Creator IDE but fails to run independently on the Windows platform. I do not have the same problem in Linux. So how can I package this app to run on other Windows machines using dynamic linking? I have tried including QtGui4.dll, QtCore4.dll, libgcc_s_dw2-1.dll and mingwm10.dll libraries in the release directory but all I get is something about a procedure entry point not being located in QtCore4.dll. I am using Qt 4.7.4. If you're not using WebKit*, I recommend MXE (http://mxe.cc) for building Windows executables directly from Linux. Hasn't let me down yet. * WebKit is broken for static linking. OK, I have MXE working like a charm. Thanks! The problem though is that it builds everything statically. I am not sure how this sits with Nokia's LGPL licence agreement although my software is not for sale and is only being used in-house. How would I get on publishing a GPL app? (Pardon my ignorance here) As Diego mentioned, you're not affected then by the license. The GPL is a General Public License. It applies to the general public. In-house does not qualify as the general public, therefore, you don't need to do anything :-) ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Indeed. The GPL is distribution-focused. If you are doing it for your company (a fictitious person) then the creator and the user are the same and there is no distribution From: Nikos Chantziaras rea...@gmail.com To: Chasc ch...@tpg.com.au Cc: interest@qt-project.org Sent: Tuesday, June 19, 2012 11:33 AM Subject: Re: [Interest] Porting Qt app to windows On 19/06/12 06:08, Chasc wrote: On Sun, 2012-06-03 at 00:47 +0300, Nikos Chantziaras wrote: On 01/06/12 14:49, Chasc wrote: I have recently developed a C++ desktop application in Linux using Qt Creator and have successfully opened the project in the Windows version of Qt Creator. The app runs successfully in the windows Qt Creator IDE but fails to run independently on the Windows platform. I do not have the same problem in Linux. So how can I package this app to run on other Windows machines using dynamic linking? I have tried including QtGui4.dll, QtCore4.dll, libgcc_s_dw2-1.dll and mingwm10.dll libraries in the release directory but all I get is something about a procedure entry point not being located in QtCore4.dll. I am using Qt 4.7.4. If you're not using WebKit*, I recommend MXE (http://mxe.cc) for building Windows executables directly from Linux. Hasn't let me down yet. * WebKit is broken for static linking. OK, I have MXE working like a charm. Thanks! The problem though is that it builds everything statically. I am not sure how this sits with Nokia's LGPL licence agreement although my software is not for sale and is only being used in-house. How would I get on publishing a GPL app? (Pardon my ignorance here) As Diego mentioned, you're not affected then by the license. The GPL is a General Public License. It applies to the general public. In-house does not qualify as the general public, therefore, you don't need to do anything :-) ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
From: Diego Iastrubni [mailto:diegoi...@gmail.com] Sent: Tuesday, June 19, 2012 8:22 AM I just rename the name of the Qt directory temporarily to _Qt or something and then rename back when I need to code... Ugly, but simulates uninstallation of Qt. But you also need to simulate the 'uninstallation' of the C runtime DLL's, etc. As well as making sure you set the compiler switches correctly and are not calling any native Windows API's that are not included in the lowest version of Windows that you are supporting. Really, there is no better way to test an app than on a fresh install of Windows. Thanks, David ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Virtual Machines to the rescue... From: David Ching d...@dcsoft.com To: interest@qt-project.org Sent: Tuesday, June 19, 2012 12:03 PM Subject: Re: [Interest] Porting Qt app to windows From: Diego Iastrubni [mailto:diegoi...@gmail.com] Sent: Tuesday, June 19, 2012 8:22 AM I just rename the name of the Qt directory temporarily to _Qt or something and then rename back when I need to code... Ugly, but simulates uninstallation of Qt. But you also need to simulate the 'uninstallation' of the C runtime DLL's, etc. As well as making sure you set the compiler switches correctly and are not calling any native Windows API's that are not included in the lowest version of Windows that you are supporting. Really, there is no better way to test an app than on a fresh install of Windows. Thanks, David ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Am 19.06.2012 um 18:03 schrieb David Ching d...@dcsoft.com: ... and are not calling any native Windows API's that are not included in the lowest version of Windows that you are supporting. Last time I checked - just for the fun of it - a Qt 4.7 (maybe even 4.8 - can't remember) application still ran on Windows 2000 (MinGW, QtCore, QtGui, the Qt XML module - but not e.g. Phonon or WebKit). So unless you explicitly call win32 APIs yourself there should be no worries. For everything else use depends.exe, which shows you exactly from where the DLLs are taken. However, David is off course right: to make sure your app REALLY works on the target system, take a virgin one (virtual images work best). For instance Windows Vista and above have stricter permission rules, some system folders might be localised (in case you are relying on hard-coded paths such as C:\Documents and Settings - which is bad bad bad anyway ;)), etc. Cheers, Oliver___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
One bug kicker is remembering to copy the Qt Plugins directory, else images won't work... From: Till Oliver Knoll till.oliver.kn...@gmail.com To: Qt Interest interest@qt-project.org Sent: Tuesday, June 19, 2012 1:21 PM Subject: Re: [Interest] Porting Qt app to windows Am 19.06.2012 um 18:03 schrieb David Ching d...@dcsoft.com: ...and are not calling any native Windows API's that are not included in the lowest version of Windows that you are supporting. Last time I checked - just for the fun of it - a Qt 4.7 (maybe even 4.8 - can't remember) application still ran on Windows 2000 (MinGW, QtCore, QtGui, the Qt XML module - but not e.g. Phonon or WebKit). So unless you explicitly call win32 APIs yourself there should be no worries. For everything else use depends.exe, which shows you exactly from where the DLLs are taken. However, David is off course right: to make sure your app REALLY works on the target system, take a virgin one (virtual images work best). For instance Windows Vista and above have stricter permission rules, some system folders might be localised (in case you are relying on hard-coded paths such as C:\Documents and Settings - which is bad bad bad anyway ;)), etc. Cheers, Oliver ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
On Sun, 2012-06-03 at 00:47 +0300, Nikos Chantziaras wrote: On 01/06/12 14:49, Chasc wrote: I have recently developed a C++ desktop application in Linux using Qt Creator and have successfully opened the project in the Windows version of Qt Creator. The app runs successfully in the windows Qt Creator IDE but fails to run independently on the Windows platform. I do not have the same problem in Linux. So how can I package this app to run on other Windows machines using dynamic linking? I have tried including QtGui4.dll, QtCore4.dll, libgcc_s_dw2-1.dll and mingwm10.dll libraries in the release directory but all I get is something about a procedure entry point not being located in QtCore4.dll. I am using Qt 4.7.4. If you're not using WebKit*, I recommend MXE (http://mxe.cc) for building Windows executables directly from Linux. Hasn't let me down yet. * WebKit is broken for static linking. OK, I have MXE working like a charm. Thanks! The problem though is that it builds everything statically. I am not sure how this sits with Nokia's LGPL licence agreement although my software is not for sale and is only being used in-house. How would I get on publishing a GPL app? (Pardon my ignorance here) Regards, Paul Cornford ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
On Sun, 2012-06-03 at 14:44 +0200, Till Oliver Knoll wrote: Am 03.06.2012 um 10:33 schrieb Samuel Gaist samuel.ga...@edeltech.ch: Another idea, from which path did you copy the QtCore4.dll ? The one in the folder from QtCreator ? Or the one from the provided Qt library tree ? Good point! Qt Creator comes with its *own* set of Qt libraries, wheras you build your app with the (usually more recent) Qt SDK (or from the Qt library tree) libraries. So you need to ship the later ones together with your application. Cheers, Oliver I've tried them all! It doesn't make any difference. Is this a common problem? Thanks anyway, Paul C ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Am 04.06.2012 um 10:01 schrieb Chasc ch...@tpg.com.au: On Sun, 2012-06-03 at 14:44 +0200, Till Oliver Knoll wrote: Am 03.06.2012 um 10:33 schrieb Samuel Gaist samuel.ga...@edeltech.ch: Another idea, from which path did you copy the QtCore4.dll ? The one in the folder from QtCreator ? Or the one from the provided Qt library tree ? Good point! Qt Creator comes with its *own* set of Qt libraries, ... I've tried them all! It doesn't make any difference. Is this a common problem? It is a common problem that people new to Windows development have difficulties how to deploy applications (nothing specific to Qt here), but there's no common (known) issue with the Qt libraries itself (the MinGW ones that come with the Qt SDK anyway) - if that is what you mean. Just to rule out the obvious: you do build in release mode and provide the release Qt libraries and Qt plugins, with the same build options (you don't provide any custom linker flags for your *.exe)? And when you deploy your debug *.exe you make sure to provide the corresponding debug Qt libs/plugins - right? Cheers, Oliver ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Another idea, from which path did you copy the QtCore4.dll ? The one in the folder from QtCreator ? Or the one from the provided Qt library tree ? On 2 juin 2012, at 23:25, Chasc wrote: On Sat, 2012-06-02 at 14:37 +0200, Samuel Gaist wrote: Hi, Is your application only an exe ? Or do you build a library for it ? I haven't built any libraries for it. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Am 03.06.2012 um 10:33 schrieb Samuel Gaist samuel.ga...@edeltech.ch: Another idea, from which path did you copy the QtCore4.dll ? The one in the folder from QtCreator ? Or the one from the provided Qt library tree ? Good point! Qt Creator comes with its *own* set of Qt libraries, wheras you build your app with the (usually more recent) Qt SDK (or from the Qt library tree) libraries. So you need to ship the later ones together with your application. Cheers, Oliver ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
On Fri, 2012-06-01 at 17:23 +0530, Muthulingam Ammaiappan wrote: Hi Paul, http://doc.qt.nokia.com/4.7-snapshot/deployment-windows.html the above link will answer your question about deploying the Qt Applications on windows Thanks for directing me to the above link. I managed to download Dependency Walker and used it to include all the missing dll's. Now DW is telling me: Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module. But I can't see anything else in the app identifying any other dll as missing or defective. So where do I go from here given that the app does run in Qt Creator? Regards, Paul Cornford ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Hi, Is your application only an exe ? Or do you build a library for it ? In case you have a library and build it dynamically (dll) have a look at this documentation page: http://qt-project.org/doc/qt-4.8/sharedlibrary.html Hope it helps Samuel On 2 juin 2012, at 12:02, Chasc wrote: On Fri, 2012-06-01 at 17:23 +0530, Muthulingam Ammaiappan wrote: Hi Paul, http://doc.qt.nokia.com/4.7-snapshot/deployment-windows.html the above link will answer your question about deploying the Qt Applications on windows Thanks for directing me to the above link. I managed to download Dependency Walker and used it to include all the missing dll's. Now DW is telling me: Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module. But I can't see anything else in the app identifying any other dll as missing or defective. So where do I go from here given that the app does run in Qt Creator? Regards, Paul Cornford ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
On 01/06/12 14:49, Chasc wrote: I have recently developed a C++ desktop application in Linux using Qt Creator and have successfully opened the project in the Windows version of Qt Creator. The app runs successfully in the windows Qt Creator IDE but fails to run independently on the Windows platform. I do not have the same problem in Linux. So how can I package this app to run on other Windows machines using dynamic linking? I have tried including QtGui4.dll, QtCore4.dll, libgcc_s_dw2-1.dll and mingwm10.dll libraries in the release directory but all I get is something about a procedure entry point not being located in QtCore4.dll. I am using Qt 4.7.4. If you're not using WebKit*, I recommend MXE (http://mxe.cc) for building Windows executables directly from Linux. Hasn't let me down yet. * WebKit is broken for static linking. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Porting Qt app to windows
Hi Paul, http://doc.qt.nokia.com/4.7-snapshot/deployment-windows.html the above link will answer your question about deploying the Qt Applications on windows Thanks Regards, Muthulingam On Fri, Jun 1, 2012 at 5:19 PM, Chasc ch...@tpg.com.au wrote: I have recently developed a C++ desktop application in Linux using Qt Creator and have successfully opened the project in the Windows version of Qt Creator. The app runs successfully in the windows Qt Creator IDE but fails to run independently on the Windows platform. I do not have the same problem in Linux. So how can I package this app to run on other Windows machines using dynamic linking? I have tried including QtGui4.dll, QtCore4.dll, libgcc_s_dw2-1.dll and mingwm10.dll libraries in the release directory but all I get is something about a procedure entry point not being located in QtCore4.dll. I am using Qt 4.7.4. Thank you in anticipation. Paul Cornford (Developer) ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest