PDA

View Full Version : Make an application for windows running standalone



hakermania
26th August 2011, 22:02
Is it possible to include some ddl files inside the dir that my application is and so to allow it to run in every system?
*I don't want to use static linking*
In only use these libraries:


#include <QDebug>
#include <QFile>
#include <QFileDialog>
#include <QMessageBox>
#include <QProcess>


Thanks in advance for any answers and sorry if answer is obvious but I know far too few about windows, the app is for a friend running them

Lykurg
26th August 2011, 22:09
It is all well documented in the documentation. Nothing more to say here. See http://doc.qt.nokia.com/latest/deployment-windows.html.

And the general answer is yes and simple try it in a clean environment.

hakermania
26th August 2011, 22:25
'configure' is not recognized as an internal or external command
etc....should I download the Qt tarball (or anything similar for windows) and do these mentioned on the docs?
I have downloaded the offline Qt Installation file and installed it.

marcvanriet
27th August 2011, 00:20
Your friend doesn't have to run configure

Just take your executable, for instance hakermania.exe. Take QtCore4.dll and QtGui4.dll from your Qt bin directory. There may also be a 'manifest file' in the directory where Qt builds your hakermania.exe.

Copy those 4 files to the system of your friend (just in any folder that you create) and it may run.
You may also get an error that a certain dll is missing, and then you can add it.
Depending on your compiler, you may also need some compiler specific files.

More details are in the link that Lykurg provided. More specifically : http://doc.qt.nokia.com/...additional-libraries (http://doc.qt.nokia.com/latest/deployment-windows.html#additional-libraries)

Your friend does NOT need to install Qt or MingW. Maybe some Microsoft runtime files if you are using Visual studio (but I don't think you do).

Regards,
Marc

pkpyree
1st November 2011, 07:22
i have tried copying these files. But it still says "This application has failed to start because QtCore4.dll was not found. Re-installing the application may fix this problem." please help

saeedIRHA
1st November 2011, 08:20
Hello,
This video tutorial would help you:
http://www.voidrealms.com/viewtutorial.aspx?id=211

good luck!

pkpyree
1st November 2011, 15:39
Many Thank saeedIRHA! But it has still not solved my problem completely, but i believe i have been given the proper direction because of ur msg.
will keep u posted though. regards, pyree

DmitryNik
3rd November 2011, 18:01
Hello.

Because this thread is about how to deploy app... I'll not create another one and I'll ask in this one once again about a very strange behavior(IMO).
In my app I have a QGraphicsView with a scene and some other widgets on a main form. I'm trying to draw the background image to the scene. Image is somewhere on an user desktop. I press the button "Browse" for searching that image and after selecting that image the picture appears in a QGraphicsView's scene as I need it. BUT it will happen ONLY on PC where is installed QT. Otherwise will be displayed an empty screen. Image format is JPG/PNG/BMP. Further - more interesting. If I'll use libraries from win 7 pc and the target pc is working under win XP and on win XP pc is installed QT image will not appear neither.


My question is: IS it a QT's bug? Or may be something missing in a libraries? Why app works(by this word I mean, that the picture is being drawing as a background) on win 7 pc where QT is installed and didn't work(picture doesn't appear) if QT isn't installed?

I hope, I describe the problem clearly.

Thank you for your answers beforehand.

ChrisW67
3rd November 2011, 22:17
You need to deploy the relevant image format plugins in addition to the core Qt DLLs. See an example deployment layout (http://www.qtcentre.org/threads/44761-executable-version?p=203930#post203930)

DmitryNik
4th November 2011, 16:56
You need to deploy the relevant image format plugins in addition to the core Qt DLLs. See an example deployment layout (http://www.qtcentre.org/threads/44761-executable-version?p=203930#post203930)

Thank you for the link.