Reply
Thread Tools
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#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.
__________________

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: 418 | Thanked: 506 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: 126 | Thanked: 59 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,388 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: 126 | Thanked: 59 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,448 | Thanked: 9,523 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
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

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


 
Forum Jump


All times are GMT. The time now is 03:08.