View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#151
Originally Posted by taixzo View Post
Except it doesn't. For some reason it won't find the resources correctly unless run from the same directory. So yes, the 'cd' is necessary.
I had the same issue with my Python programs - I've fixed it like this:
Code:
# set current directory to the directory
# of this file
# like this, modRana can be run from an absolute path
# eq.: ./opt/modrana/modrana.py -u QML -d n9
import os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
@packaging

I'm using a slightly modified khertans sdist_maemo and it works quite nicely. There is also a (slightly outdated) example how I do it.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)

Last edited by MartinK; 2012-06-13 at 17:54.
 

The Following 9 Users Say Thank You to MartinK For This Useful Post: