Help - Search - Members - Calendar
Full Version: Help With How To Distribute
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > X/Qt
ScottYelich
Hi --

I have a basic app that I'd like to distribute. It's C++/Qt -- but I don't know much about the distribution side of things -- I'm use to the other side with installing, etc.

I have a program that I would like to have read a text file from certain dirs, and perhaps have a default read location -- but have that not be hard coded... next, I'd like to have images read the same.

For instance, say I have text file 1,2,3 and images i1, i2 and i3... when someone types "make install" -- where will they go -- and if this can be user-defined -- how will my code know where to look? finally, I'd like to make an Icon and things like that for pdaXrom...

Any help, pointers, suggestions, URLs... would be great.

Thank you.

Scott
melee
QUOTE(ScottYelich @ Jun 16 2005, 08:57 PM)
I have a program that I would like to have read a text file from certain dirs, and perhaps have a default read location -- but have that not be hard coded... next, I'd like to have images read the same.
*


I think you are talking about programming here not installing -

QFileDialog::getOpenFileName() seems to be what you want,

(assuming that works with pdaXrom, which I suppose it should as the whole point of it is that pdaXrom uses X11 and QT, not a framebuffer and QTE/QPE)

QUOTE(ScottYelich @ Jun 16 2005, 08:57 PM)
... when someone types "make install" -- ..........................., I'd like to make an Icon and things like that for pdaXrom...


Now you have me confused.............On what device and for which system are you trying to package?

pdaXrom uses .ipks as far as I can tell, so no-one installs tar.gz packages using configure - make - make install

There is plenty of info on the forum re creating .ipk packages. They are very simple to make and control where files are copied to.

Writing a Makefile.in which will give an install option after the user runs configure on a Linux box is relatively simple, but completely different.

regards

Melee
ScottYelich
right, installing.... I can make an ipk when I get something that has a makefile that does an install...

I now need to make a makefile that does an install for my own software.

I have, say, 4 auxiliary files... they could be in /opt/bwb/ or they could be in /usr/local/bwb or they could be in /usr/share/bwb or .... any place... so, my program will have to have this path compiled in, but I don't know how to specify this for use for things like "make install"

I think I'm just going to build an install perl script that asks where you want the code and then does a regexp replace on a const std::string in my code, and then qmake && make and then does a mkdir of thedest dir and copies the files... itself.

Other suggestions are welcome.

Scott
melee
QUOTE(ScottYelich @ Jun 21 2005, 02:32 PM)
I now need to make a makefile that does an install for my own software.
*

Hi Scott

If you can explain a few things I am sure I can help.

First what are you building your application on - linux workstation with g++ ? Are you using an IDE or generating makefile off the commandline with tmake or what

Second, what device and OS is it going to run on? IE is it a Zaurus with pdaXrom or a linux workstation?

The answer to the second question is still unclear and upon that depends the answer to your query.

Distributions don't normally give the user carte blanche to install wherever they like, without also passing the responsibility to create symlinks etc so the files can be found.
The user can already pass --prefix and --eprefix to configure to change the install path if you have that type of distribution.

Your other options include;
setting environment variables with the relevant paths,
install writing the relevant paths to your apps config file
or just something like your app looking for the files where you would install by default and if not there displaying a getOpenFileName dialog for the user to specify where they are and saving in config file thereafter.

regards

Melee
ScottYelich
thanks for the help.

I think what I'll do is just use a shell script... as I know shell and it seems fairly portable.

Since qt4 just came out and it pretty much gutted my app -- I'll come back here with
information to try my app if/when I get it ported over to qt4.

Scott
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.