Results 1 to 5 of 5

Thread: How package and publish my application?

  1. #1
    Join Date
    Aug 2007
    Posts
    244
    Thanks
    42
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How package and publish my application?

    I have completed my application but I don't know how package and redistribute it to my friends. Until now every application I made was only for me so I didn't worry of the installation process.

    I have used kate for writing source files and 'qmake -project' and 'qmake' for generating the project file and the Makefile.

    What the application do? Essentially it reads data from a sqlite3 database and shows them. For the application I have used only QT classes (and custom classes, obviously), nothing else.

    Maybe it is useful report the hierarchy of the project:

    (main folder)
    |
    +--mainwindow{.h,.cpp},app.pro,app.qrc,main.cpp
    |
    +--(centralwidget folder)
    | |
    | +--custom class designing the centralwidget of QMainWindow
    |
    +--(gameviewer folder)
    | |
    | +--a modeless dialog
    |
    +--(icons folder)
    |
    +--(images folder)
    |
    +--(database folder)
    |
    +--contains the sqlite3 file "gmcdb"

    Note #1:
    The application simply reads from the database and cannot be used for editing it so the database file can be installed system wide.

    Note #2:
    Some of the images are used in html code passed to QPainter objects so the executable 'must know' constantly where they are installed.

    How I accomplish this task? Is there, somewhere, a tutorial that responds to my questions? I have read the official KDevelop tutorial but it lacks in these matters.

    Hoping someone can help me,
    best regards

    P.S.
    I have posted in the wrong section, sorry. If some administrator can move it in Qt Programming, Thanks
    Last edited by jiveaxe; 18th October 2007 at 10:33. Reason: user request
    Giuseppe CalÃ

  2. #2
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How package and publish my application?

    NSIS is a fine install tool. you write script like installer files and compile them with an own coompiler. NSIS can be found at sourceforge.net.
    or, if you dont want to add the dynamic librarys (dll or so) you can use my little installer.
    Maybe, if you know how you cold add lzma packing. i didn't had time for that yet...
    Attached Files Attached Files

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

    xEsk (16th November 2007)

  4. #3
    Join Date
    Aug 2007
    Posts
    244
    Thanks
    42
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How package and publish my application?

    Thanks kernel_panic,
    probably I have not explained well the problem. What I need is create the source tarball to install with configure/make/make install on a linux system. Searching over the net I read that are necessary 2 starting files: configure.in and Makefile.am; I have trouble creating this two files.

    After further searching I found cmake and with little editing I have created my first source tarball of a very simple qt4 application (not that of the discussion).

    Now I am trying to manage new stuffs, like images not compiled in the executable (used on runtime): in which folder of the filesystem I have to put them? in /usr/share/myapplication? Which changes I have to make to my code so that the executable (in /usr/bin, for example) finds the images (in /usr/share/myapplication, for example)?

    If needed I'll post new questions.

    Bye
    Giuseppe CalÃ

  5. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How package and publish my application?

    Don't go the autoconf route. That way leads to madness! Qmake can handle installation, so use it. You just need to define some install targets in your .pro file.

    If you install to the standard locations under a hierarchy, then it will be easy to find stuff. The executable will be under /usr/local/bin, data files and icons under /usr/local/share/appname, and documentation under /usr/local/share/docs/appname. And so on. The tricky part is that the software might have been installed somewhere other than the default /usr/local, but when you know where your executable is, then you know where everything else is. Use QApplication::applicationDirPath() to find out.

  6. The following 2 users say thank you to Brandybuck for this useful post:

    jiveaxe (20th October 2007), xEsk (16th November 2007)

  7. #5
    Join Date
    Aug 2007
    Posts
    244
    Thanks
    42
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How package and publish my application?

    Thanks Brandybuck for your tips; autoconf way is really a maze.
    Can you give me same link regarding .pro file cusomization?

    Regards
    Giuseppe CalÃ

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.