|
2010-02-22
, 16:18
|
|
Posts: 286 |
Thanked: 219 times |
Joined on Feb 2010
@ France
|
#2
|
INSTALLS += backgroundprocess backgroundprocess.path = $$PREFIX/opt/yourprog/ backgroundprocess.files += data/scripts/yourprog
The Following 2 Users Say Thank You to calvin_42 For This Useful Post: | ||
|
2010-02-23
, 17:36
|
Posts: 34 |
Thanked: 2 times |
Joined on Feb 2010
|
#3
|
|
2010-02-24
, 11:12
|
|
Posts: 754 |
Thanked: 630 times |
Joined on Sep 2009
@ London
|
#4
|
....
I think my process does not have the rights to create a new file in /opt/my-app/ directory.
How can i change this from the installation package?
The Following User Says Thank You to krk969 For This Useful Post: | ||
|
2010-02-24
, 16:39
|
Posts: 34 |
Thanked: 2 times |
Joined on Feb 2010
|
#5
|
there are post installation scripts ( postinst ) in the debian folder. They will exist as postinst.ex, make sure you remove the extension .ex.
insert a command like this in it
chown -R user <package_path>
that should give the ownership of the package folder to the "user" user that will be exectuing the process.
#DEBHELPER# chown -R user /home/opt/myapp exit 0
|
2010-02-24
, 16:48
|
|
Posts: 754 |
Thanked: 630 times |
Joined on Sep 2009
@ London
|
#6
|
Can you explain a little more clear how to create the postinstall file.
I removed the .ex and i added just before the end of the file your command:
Thanks, flgor.
|
2010-02-24
, 17:33
|
|
Posts: 286 |
Thanked: 219 times |
Joined on Feb 2010
@ France
|
#7
|
|
2010-02-24
, 17:41
|
|
Posts: 754 |
Thanked: 630 times |
Joined on Sep 2009
@ London
|
#8
|
|
2010-02-24
, 17:42
|
|
Posts: 286 |
Thanked: 219 times |
Joined on Feb 2010
@ France
|
#9
|
|
2010-02-24
, 18:05
|
Posts: 34 |
Thanked: 2 times |
Joined on Feb 2010
|
#10
|
#!/bin/sh # postinst script for myapp # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * <postinst> `configure' <most-recently-configured-version> # * <old-postinst> `abort-upgrade' <new version> # * <conflictor's-postinst> `abort-remove' `in-favour' <package> # <new-version> # * <postinst> `abort-remove' # * <deconfigured's-postinst> `abort-deconfigure' `in-favour' # <failed-install-package> <version> `removing' # <conflicting-package> <version> # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# chown -R user /home/opt/myapp exit 0
One more question about packing
in the data folder i have a subdirectory with a lot of files inside?
They should all be copied on the phone.
Is it possible to make one install tag in the src.pro and copy everything from data/subdir/ in one go or i have to make a tag for every file i want to be copied on the phone?
Last edited by flgor; 2010-02-25 at 15:05.