PDA

View Full Version : To create installer for Qt



mohanakannan
19th May 2013, 07:31
Dear Guys,
I want to create a installer for Qt...That is for eg:I can say Internet Explorer,Mozilla firefox.If we clicked these tools means,well accessing it..Like wise i have created a code in Qt and it works nicely....But now my task is to create a installer(Executable file) for that code...That is If i clicked that exe.file means,My required output should come...Like wise if i copied that Exe.file alone into another system,it should work perfectly......That means the code should not be dispalyed anywhere...Only Exe.file should be there...Please kindly help me....Thanks in advance...
With regards,
kanna.

saman_artorious
19th May 2013, 07:57
Dear Guys,
But now my task is to create a installer(Executable file) for that code...
When you compile your code, if it succeeds, the executable will be generated inside your project folder.


Like wise if i copied that Exe.file alone into another system,it should work perfectly
O'rite, run your executable in the new system, if it fails, check what caused the error. In Linux and Android OS you need to pay attention to file or device permission or set them manually at every boot up or you add the required bash.

kanna.[/QUOTE]

wysota
19th May 2013, 08:39
Dear Guys,
I want to create a installer for Qt...That is for eg:I can say Internet Explorer,Mozilla firefox.If we clicked these tools means,well accessing it..Like wise i have created a code in Qt and it works nicely....But now my task is to create a installer(Executable file) for that code...That is If i clicked that exe.file means,My required output should come...Like wise if i copied that Exe.file alone into another system,it should work perfectly......That means the code should not be dispalyed anywhere...Only Exe.file should be there...Please kindly help me....Thanks in advance...


You can use any of the standard installer generators (like NSIS) to create installers to your programs.

Zlatomir
19th May 2013, 09:06
NSIS is a good option, but i just want to mention that there is also the QtInstallerFramework (http://doc-snapshot.qt-project.org/qtifw-1.3/index.html), i didn't used it so i can't tell you if i like it or not, i just heard of it recently and i think that it might be an interesting project to know about and maybe use when it solves our problems (has anybody used it yet?)

You can read the documentation for deploying Qt applications: link (http://qt-project.org/doc/qt-4.8/deployment-windows.html) and i'm not sure that i understand correctly when you said "Only Exe.file should be there" but maybe you need a static build of Qt framework, if you use LGPL version of Qt make sure you are allowed to use static build (and also note that if you decide you need a static build you will need to build the static Qt framework yourself).

mohanakannan
19th May 2013, 11:41
Thank you,...But Exe.file alone should be run and coding folders should not be displayed..suppose for eg:take this scenario..in QtSDK i have created project named "Button".Afetr running it ,there ll be executanle file within that folder..If i copies that executable file alone into some other location means,it should run perfectly...This is my problem..And I don't know how to proceed..


You can use any of the standard installer generators (like NSIS) to create installers to your programs.
Thank you...
But i don't have any idea about that...please explain it in a precise and understandle way..

Added after 10 minutes:

Plaese any body help...I dont know how to proceed further...
with regards,
kanna

ChrisW67
19th May 2013, 21:24
As Zlatomir says, you should read the documentation about deploying Qt applications. Your requirement for a single, self-contained executable means:

You want a static build of your application. You need to stay within the confines of your license to use Qt.
To build that executable you will first need to build a statically linked Qt library.
You do not need an installer. In fact the usual reason for wanting a self-contained executable is precisely to avoid needing a separate installer.

Your program will still need some components on the machine that cannot be statically easily/legally linked (MSVC runtime libs for example).

Your program can be a self-contained, portable folder without going to all that trouble.

wysota
19th May 2013, 21:58
But i don't have any idea about that...please explain it in a precise and understandle way..


http://nsis.sourceforge.net/

mohanakannan
20th May 2013, 15:32
http://nsis.sourceforge.net/
Thanks I will try my best..


As Zlatomir says, you should read the documentation about deploying Qt applications. Your requirement for a single, self-contained executable means:

You want a static build of your application. You need to stay within the confines of your license to use Qt.
To build that executable you will first need to build a statically linked Qt library.
You do not need an installer. In fact the usual reason for wanting a self-contained executable is precisely to avoid needing a separate installer.

Your program will still need some components on the machine that cannot be statically easily/legally linked (MSVC runtime libs for example).

Your program can be a self-contained, portable folder without going to all that trouble.
Thank you Very much....I will read it and will try my best