Problems with Application Executable
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Problems with Application Executable
Hi,
I've built an installer for my application, that saves all files stored in an array using "put URL ("binfile:" ....)" command to save to an .app application forlder in /Applications/
All the files seem to save ok, the icon for the app package is correct, all the files seem to be there in the package, BUT
the main executable "UMP" in "Contents/MacOS/" is listed as "Kind: SimpleText Format" and is set to open with TextEdit.app"
the original file is otherwise treated as "Kind:UNIX Executable File" and is set to open with Terminal.app" and launches fine when copied using the file system. Just doesn't work when saved by the installer as a binary file from within memory.
Any help would be greatly appreciated.
PS> Windows version works flawlessly.
I've built an installer for my application, that saves all files stored in an array using "put URL ("binfile:" ....)" command to save to an .app application forlder in /Applications/
All the files seem to save ok, the icon for the app package is correct, all the files seem to be there in the package, BUT
the main executable "UMP" in "Contents/MacOS/" is listed as "Kind: SimpleText Format" and is set to open with TextEdit.app"
the original file is otherwise treated as "Kind:UNIX Executable File" and is set to open with Terminal.app" and launches fine when copied using the file system. Just doesn't work when saved by the installer as a binary file from within memory.
Any help would be greatly appreciated.
PS> Windows version works flawlessly.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Re: Problems with Application Executable
So I am half-way to a solution, and have found the FileType property. But I can't find the Code to use to make the file "Unix Executable"
Does anyone know the code to use?
I have tried empty, but it makes it "unknown", I need it to be Unix Executable.
Does anyone know the code to use?
I have tried empty, but it makes it "unknown", I need it to be Unix Executable.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Re: Problems with Application Executable
Hi Tom,
you obviously need to set the "executable" bit for this file (again)!
You can do so via SHELL:
...
put "path/to/your/unix_executable_wannabe_file" into tPath
get shell("chmod -x" && QUOTE & tPath & QUOTE)
## QUOTES in case the path contains spaces.
...
But this should have been preserved somehow, shouldn't it!?
How do you copy these files and where do you store them in your installer?
Best
Klaus
you obviously need to set the "executable" bit for this file (again)!
You can do so via SHELL:
...
put "path/to/your/unix_executable_wannabe_file" into tPath
get shell("chmod -x" && QUOTE & tPath & QUOTE)
## QUOTES in case the path contains spaces.
...
But this should have been preserved somehow, shouldn't it!?
How do you copy these files and where do you store them in your installer?
Best
Klaus
Re: Problems with Application Executable
Hi Klaus, thanks for yoour reply, I will try that.
I first
put url ("binfile:" & line f of UMPMemory["Total File List"]) into UMPMemory["File Data Array"][f]["file_binary"]
then I encode the array and save it in a custom property
.... then i build the standalone
then the standalone:
for each element I ....
put UMPMemory["Files To Install"][WhatFileNumber]["file_binary"] into URL ("binfile:" & compiled_file_name)
pretty simple stuff....
I suspect that your solution will work...I will come back and report.
Thank you.
I first
put url ("binfile:" & line f of UMPMemory["Total File List"]) into UMPMemory["File Data Array"][f]["file_binary"]
then I encode the array and save it in a custom property
.... then i build the standalone
then the standalone:
for each element I ....
put UMPMemory["Files To Install"][WhatFileNumber]["file_binary"] into URL ("binfile:" & compiled_file_name)
pretty simple stuff....
I suspect that your solution will work...I will come back and report.
Thank you.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Re: Problems with Application Executable
Hi Tom,
At least with version >= 6.x if I remember correctly.
Best
Klaus
you can save an array directly into a custom property without the need of any encoding!makeshyft wrote:...then I encode the array and save it in a custom property...
At least with version >= 6.x if I remember correctly.
OK, just wanted to be suremakeshyft wrote:...
put UMPMemory["Files To Install"][WhatFileNumber]["file_binary"] into URL ("binfile:" & compiled_file_name)
pretty simple stuff....
Best
Klaus
Re: Problems with Application Executable
ah cool..didn't know that...I also compress it, which is I think why I preferred to have it as one large binary variable. The whole installer is about 100 MB, so its not a big deal, takes almost no time.
Thanks Klaus
Thanks Klaus
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Re: Problems with Application Executable
the solution posted there does not appear to be working ..... there is nothing in "the result" so the command does not return an error. but the executable remains as "Document" ... i set thefiletype to empty..which is why its document..... if i don't ..the filetype becomes simpleText. the shell command does not seem to make a change.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Re: Problems with Application Executable (Solved)
Problem solved ..... ("chmod +x " & filepath) worked.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com