Reply
Thread Tools
Posts: 2,022 | Thanked: 3,367 times | Joined on Apr 2010 @ St. Helens, England
#11
Originally Posted by flotron View Post
i added the script folder with script.sh inside but (with right click to project, add existing file) when i install i explore the opt folder on phone and i only see "bin" and "qml" folders.
This is what my project .pro looks like.

Code:
# Add files and directories to ship with the application 
# by adapting the examples below.
# file1.source = myfile
# dir1.source = mydir
DEPLOYMENTFOLDERS = # file1 dir1

script.source = script
script.target = .
DEPLOYMENTFOLDERS = script
I didn't have the script in the other files section.



The script folder needs to be in the sub-folder of the project, so along side qtc_packaging etc.
__________________
The stable-beast currently runs...
21.2011.38-1Smaemo6.1 (CSSU Stable)
2.6.28.10power52 (125-600Mhz SR VDD1&2)

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
flotron's Avatar
Posts: 417 | Thanked: 481 times | Joined on Jan 2012 @ Argentina
#12
Originally Posted by sixwheeledbeast View Post
This is what my project .pro looks like.

Code:
# Add files and directories to ship with the application 
# by adapting the examples below.
# file1.source = myfile
# dir1.source = mydir
DEPLOYMENTFOLDERS = # file1 dir1

script.source = script
script.target = .
DEPLOYMENTFOLDERS = script
Thank you marxian and sixwheeledbeast
I didn't have the script in the other files section.



The script folder needs to be in the sub-folder of the project, so along side qtc_packaging etc.
Excellent, that works! finally

So, to finish this post, my pro code is this:

Code:
folder_01.source = qml/scripter
folder_01.target = qml
file1.source = script.sh
dir1.source = script
DEPLOYMENTFOLDERS = file1 dir1 folder_01
Thank you marxian and sixwheeledbeast
 

The Following User Says Thank You to flotron For This Useful Post:
solbrit's Avatar
Posts: 107 | Thanked: 51 times | Joined on Jan 2011
#13
Very helpful posts indeed. Now, for the last peace of the puzzle:

Originally Posted by marxian View Post
...or you could change the launchScript() method to take a QString argument, and you would then be able to launch different scripts from QML ...
How would you do this?
 
knobtviker's Avatar
Posts: 665 | Thanked: 2,379 times | Joined on Feb 2012 @ Zagreb, Croatia
#14
You need a QProcess class exposed and registered to QML with some start/stop functions.
 

The Following User Says Thank You to knobtviker For This Useful Post:
solbrit's Avatar
Posts: 107 | Thanked: 51 times | Joined on Jan 2011
#15
Thankyou for replying! Now an example of some sort would be greately appreciated... Sorry, I'm new to this.
 
marxian's Avatar
Posts: 2,357 | Thanked: 8,733 times | Joined on Aug 2010 @ Wigan, UK
#16
Originally Posted by solbrit View Post
Thankyou for replying! Now an example of some sort would be greately appreciated... Sorry, I'm new to this.
https://github.com/marx1an/qt-compon...ativeprocess.h

https://github.com/marx1an/qt-compon...iveprocess.cpp

Example of how it's used in QML (using Qt Components Hildon, but the API is very similar to Harmattan Qt Components):

https://github.com/marx1an/qt-compon...rocessPage.qml
__________________
Its already dog-eat-dog, friend. Im not sure what worse a bunch of zombies could do.

My website

GitHub
 

The Following 2 Users Say Thank You to marxian For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:50.