Hi there,
I recently moved my dev environment to OS X Mojave from Sierra, and I’m noticing that when I execute a .command script from a Xojo app built on Mojave, the terminal window does not appear and show script output. The same code built with the same version of Xojo on Sierra would display the terminal window during runtime.
The script still executes in the background, but with this particular application it’s important to be able to see progress in the terminal output.
I had been using f.Launch previously when this worked on Sierra. I tried f.Open with the same result. I have also tried sh.Execute, as seen here:
// Define Resources Folder
Var ResFolder as FolderItem
ResFolder = SpecialFolder.Resources
Var MainScript As FolderItem
//Location of MainScript in Resources Folder
MainScript = ResFolder.Child(“PT_Build_Loader_Script.command”)
dim sh as new shell
sh.mode = 1
sh.Execute("open -n " + MainScript.ShellPath)
I’m pretty sure I’m doing that one wrong as I could not get the script to fire off at all with that one. f.launch is what was working before in Sierra. Like this:
// Define Resources Folder
Var ResFolder as FolderItem
ResFolder = SpecialFolder.Resources
Var MainScript As FolderItem
//Location of MainScript in Resources Folder
MainScript = ResFolder.Child(“PT_Build_Loader_Script.command”)
// Execute Main Script
MainScript.Launch
But now, no terminal visibility.
Any idea how I can overcome this?
I no longer have a Sierra boot drive to build from so I am stuck. I did try High Sierra and see the same thing. Also went back a few versions with Xojo to be sure, but apparently this is some interaction between Xojo and the OS version.
If I simply double-click the .command file, the terminal window does open as before. This problem only occurs when executing the .command file from my Xojo app. Also, builds built on Sierra behave properly when run on Mojave or High Sierra.
Thanks for reading. Any help is much appreciated.
Kind regards,
Jim