Embed command line tool
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Embed command line tool
Hi
I've coded an app that use a command line tool to execute color measure.
I would want to deploy and share this app with my colleague.
Is it possible to embed the command line tool inside the standalone and use it without installing it on the /bin folder(for example) on each machine ?
Thanks
I've coded an app that use a command line tool to execute color measure.
I would want to deploy and share this app with my colleague.
Is it possible to embed the command line tool inside the standalone and use it without installing it on the /bin folder(for example) on each machine ?
Thanks
Last edited by matgarage on Fri Jan 08, 2016 6:02 pm, edited 1 time in total.
Re: Embed line command tool
Hi Mat,
embed yes, use without saving no!
You have to to save it somewhere on the users harddisk before being able to execute it!
Maybe only temporarily in the TEMP folder? Check:
-> specialfolderpath("temporary")
and
-> the tempname
in the dictionary, maybe that helps.
Embedding:
I always put binary stuff (apps or whatever) im a custom property of my stack(s)
and "spit them out" as necessary like this:
...
answer file "Where is the tool?"
set the cCommandLineTool of this stack to url("binfile:" & it)
## Save the stack and that was it!
...
Spit out and execute immediatley:
...
put specialfolderpath("temporary") & "/an_unsuspicious_filename" into tTargetFile
put the cCommandLineTool of this stack to url("binfile:" & tTargetFile)
launch tTargetFile
...
You get the picture
Best
Klaus
embed yes, use without saving no!
You have to to save it somewhere on the users harddisk before being able to execute it!
Maybe only temporarily in the TEMP folder? Check:
-> specialfolderpath("temporary")
and
-> the tempname
in the dictionary, maybe that helps.
Embedding:
I always put binary stuff (apps or whatever) im a custom property of my stack(s)
and "spit them out" as necessary like this:
...
answer file "Where is the tool?"
set the cCommandLineTool of this stack to url("binfile:" & it)
## Save the stack and that was it!
...
Spit out and execute immediatley:
...
put specialfolderpath("temporary") & "/an_unsuspicious_filename" into tTargetFile
put the cCommandLineTool of this stack to url("binfile:" & tTargetFile)
launch tTargetFile
...
You get the picture

Best
Klaus
Re: Embed line command tool
The wooow effect !
I would like to clone your brain to get your coding skills if it was not so funny to learn step by step.
)
Thank you Klaus.
I would like to clone your brain to get your coding skills if it was not so funny to learn step by step.

Thank you Klaus.
Re: Embed command line tool
Sorry, Mat, I'm un-clonable! 

Re: Embed command line tool
Hi Klaus !
I need to correct your code (I can't realize I'm saying that...)
I've to put (into) :
instead of (to):
Just to help those who will read and use this after.
Ok, I understand that your are un-clonable Klaus, but, can I do a little 'brain backup' ?
Security first
I need to correct your code (I can't realize I'm saying that...)
I've to put (into) :
Code: Select all
put the cCommandLineTool of this stack into url("binfile:" & tTargetFile)
Code: Select all
put the cCommandLineTool of this stack to url("binfile:" & tTargetFile)
Ok, I understand that your are un-clonable Klaus, but, can I do a little 'brain backup' ?
Security first

Re: Embed command line tool
Hi Mat,
Yes, sorry, of course it has to be:
... put ... INTO...
Best
Klaus
Haha, don't worry, see it just as a prove that I'm human!I need to correct your code (I can't realize I'm saying that...)

Yes, sorry, of course it has to be:
... put ... INTO...
Best
Klaus
Re: Embed command line tool
put "klausimausi/braindump.iso" into tBrainfile
set the uKlausbrain of this stack to URL("binfile:" & tBrainfile)
save this stack
Then you can write out the file and mount the iso to have your very own portable Klaus
set the uKlausbrain of this stack to URL("binfile:" & tBrainfile)
save this stack
Then you can write out the file and mount the iso to have your very own portable Klaus
Re: Embed command line tool
SparkOut wrote:put "klausimausi/braindump.iso" into tBrainfile
set the uKlausbrain of this stack to URL("binfile:" & tBrainfile)
save this stack
Then you can write out the file and mount the iso to have your very own portable Klaus



-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Embed command line tool
I tried that but got a permissions error noting that I wasn't the owner of that resource.SparkOut wrote:put "klausimausi/braindump.iso" into tBrainfile
set the uKlausbrain of this stack to URL("binfile:" & tBrainfile)
save this stack
Then you can write out the file and mount the iso to have your very own portable Klaus
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Embed command line tool
Well, MY mother taught me to ask first before dealing with someone elses property (resource)! 

Re: Embed command line tool
Did you chown the file first?
Re: Embed command line tool
Put
into myDay
