OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Problem A Java App's Installer
Mongoosefred
post Apr 1 2005, 01:01 PM
Post #1





Group: Members
Posts: 31
Joined: 18-September 04
From: London
Member No.: 4,639



I've got a real dilema, I've got QuackNews installing, but I want to install a number of configuration files, such as templates, basic config file, etc and they have to be ableto be modified by the application. This is fine on OZ, which is what I'm using, because I run as root and have permissions to write in /opt/Qtopia/, however my friend uses the CRACKO ROM and he is having problems.
What I thought was I'd install the config files into the /opt/Qtopia folder then move them using post install into $HOME and the app can find that using the Runtime properties. However I just can't get that working. mad.gif
What I need is either some really good details of writing move advanced ipk files, or I move the files when I first run the application... Which is just a little to much like a hack for my liking sad.gif
I would appriciate any surgestions.

-MF
Go to the top of the page
 
+Quote Post
lardman
post Apr 2 2005, 01:37 AM
Post #2





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



I'm pretty sure that the installer runs as root on all ROMs (otherwise it'd have troubles installing some things).

Let's see the postinst script you're proposing.


Si
Go to the top of the page
 
+Quote Post
tovarish
post Apr 2 2005, 01:46 AM
Post #3





Group: Members
Posts: 299
Joined: 27-October 04
Member No.: 5,233



i had problems with QuackNews and cacko too. The configuration file at /opt/QtPalmtop/QuackNews was not writable by user zaurus so I had to make it as well as the directory writable for quacknews to work.
It works fine now.

tovarish
Go to the top of the page
 
+Quote Post
Mongoosefred
post Apr 2 2005, 04:46 AM
Post #4





Group: Members
Posts: 31
Joined: 18-September 04
From: London
Member No.: 4,639



Sorry about the lack of detail in the first post... it was a late last night. Heres what I've tried:

I've read the the IPKG Tutorial on uk-dave.com and I think I've done it right.
I created a folder called CONTROL in the ipk's root, in it was a file called control (which used to be tar'd and gz'd into control.tar.gz and works there) and a postinst file that include a single line
CODE
cp /opt/Qtopia/QuackNews $HOME

I'm a little new to Unix scripting so I'm not sure if I need
CODE
#!/bin/sh

as the first command in the file.
I tar'd and gz'd the CONTROL folder as control.tar.gz and then created the ipk as per usual. When I came to install it on my Zaurus (OpenZaurus 3.5.2 - Hentges) the package manager says that it fails to create sym-links and does not list it as installed. However QuackNews appears on the Jeode tab when the icons are reloaded and runs correctly, therefore the sym-links are correct.
The QuackNews folder is not copied.
I am assuming (I know, never make assumptions) the the sym-link failure is because the script is failing.
The tutorial says a script must return 0, how do you do this?
I think it might be because I have either got the case wrong for the folder name, the script is wrong or both... smile.gif

Is there a way of finding where the files are actually installed into rather than where I think they are, for instance on OZ - Hentges installing into /opt/Qtopia actually installs into /mnt/card/opt/Qtopia.

If anyone has some examples of post and pre install scripts I would be VERY greatful.
Thanks in advance.
-MF
Go to the top of the page
 
+Quote Post
lardman
post Apr 2 2005, 05:00 AM
Post #5





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



QUOTE
I am assuming (I know, never make assumptions) the the sym-link failure is because the script is failing.


Some symlink failures always occur as ipkg tries to symlink all the way down to / (some of which will obviously exist already). So this is normal, not a problem, ignore it.

QUOTE
a postinst file that include a single line
CODE
cp /opt/Qtopia/QuackNews $HOME

I'm a little new to Unix scripting so I'm not sure if I need
CODE
#!/bin/sh

as the first command in the file.


You do need this as otherwise the script won't be run.

QUOTE
Is there a way of finding where the files are actually installed into rather than where I think they are, for instance on OZ - Hentges installing into /opt/Qtopia actually installs into /mnt/card/opt/Qtopia.


ipkg files <package-name>

The reason it ends up on the card is that the hentages ROM has opt symlinked there.


Now I really don't understand what you're trying to do. Why are you trying to move this QuackNews file (what is it? a binary, a directory, etc.?) to $HOME? Does $HOME even exist (as in the variable rather than the location)?

The next thing is that you probably shouldn't use /opt/Qtopia/QuackNews, but rather /opt/QtPalmtop/QuackNews (it just offends my sensibilities to use the symlink rather than the actual directory). I also think it's probably bad form to place temporary files in /opt/Qt*, you might try placing them in /tmp as that's what it's there for (unless someone can give me a reason not to do this).


Si
Go to the top of the page
 
+Quote Post
Mongoosefred
post Apr 2 2005, 09:45 AM
Post #6





Group: Members
Posts: 31
Joined: 18-September 04
From: London
Member No.: 4,639



Thanks for the help lardman.
After thinking it through I really don't think I need to do this. I was just over complicating the solution.
-MF
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd August 2014 - 01:50 AM