Author Topic: Help With How To Distribute  (Read 5012 times)

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
Help With How To Distribute
« on: June 16, 2005, 03:57:05 pm »
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

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • http://
Help With How To Distribute
« Reply #1 on: June 19, 2005, 07:38:18 am »
Quote
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=84571\"][{POST_SNAPBACK}][/a][/div]

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
... 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
C860 - with Sharp ROM
1GB SD and 2 GB & 256MB CF
WiFi, Bluetooth and Sharp CF camera cards
Ubuntu 6.06
(WinXP if I really have to)

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
Help With How To Distribute
« Reply #2 on: June 21, 2005, 09:32:04 am »
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

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • http://
Help With How To Distribute
« Reply #3 on: June 26, 2005, 01:03:38 pm »
Quote
I now need to make a makefile that does an install for my own software.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=85150\"][{POST_SNAPBACK}][/a][/div]
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
C860 - with Sharp ROM
1GB SD and 2 GB & 256MB CF
WiFi, Bluetooth and Sharp CF camera cards
Ubuntu 6.06
(WinXP if I really have to)

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
Help With How To Distribute
« Reply #4 on: July 12, 2005, 10:49:09 pm »
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