Page 1 of 1

run included files in a standalone app Windows

Posted: Thu Sep 07, 2017 12:07 pm
by pajito
Hi everybody

I just finished a very simple project in which I run an executabe file. When running from the stack giving the whole directory path everything works.
example: put shell ("D:\test\rundl.exe" && field "link")

But when I export an app for windows, includind the files I need, I do not know how to set the path.


Thanks In advance
Pajito

Re: run included files in a standalone app Windows

Posted: Thu Sep 07, 2017 12:14 pm
by Klaus
Hola Pajito,

if you were using the "Copy files..." tab in the "standalone builder settings" to add your file(s)
then you will find all these files (and folders) in the standalone in -> specialfolderpath("resources")

Is that what you mean?


Best

Klaus

Re: run included files in a standalone app Windows

Posted: Thu Sep 07, 2017 12:21 pm
by pajito
HI Klaus
this is exaclty what I mean. I alredy copy the files the way you suggest, my problem was that I didn't know how to modify my line. So you are suggesting something like:
"specialfolderpath\rundl.exe"

I will give it a try and I will let you know of the outcome.

Thanks so much for the reply
Pajito

Re: run included files in a standalone app Windows

Posted: Thu Sep 07, 2017 12:35 pm
by Klaus
Hi Pajito,

before you are runing against a wall, do this:

Code: Select all

...
## Create path to your EXE in Livecode:
put specialfolderpath("resources") & "/rundl.exe" into tExePath

## Prepare to use with SHELL:
replace "/" with "\" in tExePath

## Now use shell:
put shell (tExePath && field "link") 
...
And read up "specialfolderpath()" in the dictionary! 8)


Best

Klaus

Re: run included files in a standalone app Windows

Posted: Thu Sep 07, 2017 12:45 pm
by pajito
Hi again

finally I did it like this
put specialfolderpath("resources") into tFolderpath
put tFolderPath & "/rundl.exe" into tFilePath

put shell (tFilePath && && field "link")

Actually I did exaclty what you suggest bellow. Your help was inormous.

Thanks Again for all your help
Pajito

Re: run included files in a standalone app Windows

Posted: Thu Sep 07, 2017 12:46 pm
by Klaus
Don't forget to replace SLASH with BACKSLASH, Windows Shell does not like SLASH! :D

Re: run included files in a standalone app Windows

Posted: Thu Sep 07, 2017 1:01 pm
by pajito
Slash rules

Re: run included files in a standalone app Windows

Posted: Thu Sep 07, 2017 1:04 pm
by Klaus
Only on guitar, not on Windows! :D