maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Packaging my software (https://talk.maemo.org/showthread.php?t=37419)

naabi 2009-12-16 14:45

Packaging my software
 
Yes, I have managed to code something with Qt, and soon I need to do something that I've been avoiding for a while. I need to make a deb package from my application, and I do know that my life would have been easier if I had done this right away. I hope people are not annoyed by this kind of newbie thread.

I have following stuff to be packaged.

- Executable
- XML config files
- Audio files
- Basic configuration that can be changed on the settings tab of my application

First of all, what kind of structure would be best for the installation? XML config, should those go under ~/.myapplication? I've read also about gconf, should I use that for simple configuration that can be changed (booleans, numbers etc.) and how do I initialize that configuration when installing? Also that should not be overwritten when updating to a newer version of application. How about the other resources like audio files and images, should those go under .../usr/share? And what's the best way to refer to those, I hate to hardcode paths in the executable.

I'm sure I could find out most of these issues, but I also do feel that these issues are open to lots of developers currently.

danielwilms 2009-12-17 07:42

Re: Packaging my software
 
Quote:

Originally Posted by naabi (Post 430454)
First of all, what kind of structure would be best for the installation?

There is a good guide on how to set up the right folder-structure in the wiki. Further there is a general packaging information in the developer guide.

Quote:

Originally Posted by naabi (Post 430454)
XML config, should those go under ~/.myapplication? I've read also about gconf, should I use that for simple configuration that can be changed (booleans, numbers etc.) and how do I initialize that configuration when installing? Also that should not be overwritten when updating to a newer version of application.

Qt offers directly a nice approach to store settings. Have a look here: QSettings

Quote:

Originally Posted by naabi (Post 430454)
How about the other resources like audio files and images, should those go under .../usr/share? And what's the best way to refer to those, I hate to hardcode paths in the executable.

Be aware that the space in the rootfs, where /usr is mounted as well, is quite limited. So that packages should be "optified", which means that the actual data is stored in /opt, which offers more space and /usr/share/ just contains the links to these files. What this means exactly you can read here.


Daniel


All times are GMT. The time now is 15:21.

vBulletin® Version 3.8.8