Hello, I'm using osacompile to compile and AppleScript to an .App file and use it in my application.
So, when I compile the scpt in macOS Catalina, it works well and good.
The problem is after compiling the same app in macOS Big Sur, now the compiled app works well in macOS 11 but not on macOS Catalina. The same app does not run stating that minimum macOS requirement is not satisfied. Something which goes like this,
The executable from Catalina has LC_VERSION_MIN_MACOSX set to 10.6 and works fine because of that.
And surprisingly, when I try in one another macOS 11 machine the LC_VERSION_MIN_MACOSX load command gets emitted and set to 10.6
So what is the ideal behaviour of osacompile, is it reliable to use. From where are these load commands getting emitted?
Looks like osacomplile does to honour MACOS_DEPLOYMENT_TARGET environmental variable nor it has any compile time flags that can be set like in gcc (-mmacosx-min-version)
Someone please guide me through this. Thanks in advance.
Code Block osacompile -x -o "Application.app" "AppleScript.scpt"
So, when I compile the scpt in macOS Catalina, it works well and good.
The problem is after compiling the same app in macOS Big Sur, now the compiled app works well in macOS 11 but not on macOS Catalina. The same app does not run stating that minimum macOS requirement is not satisfied. Something which goes like this,
The underlying problem was the load command LC_VERSION_MIN_MACOSX is not present in the objdump of the excitable built form macOS 11, it instead has LC_BUILD_VERSION set to 11.0You can’t use this version of the application “Application.app” with this version of macOS.
You have macOS 10.15.7. The application requires macOS 11.0 or later.
Code Block otool -l <path to executable>
The executable from Catalina has LC_VERSION_MIN_MACOSX set to 10.6 and works fine because of that.
And surprisingly, when I try in one another macOS 11 machine the LC_VERSION_MIN_MACOSX load command gets emitted and set to 10.6
So what is the ideal behaviour of osacompile, is it reliable to use. From where are these load commands getting emitted?
Looks like osacomplile does to honour MACOS_DEPLOYMENT_TARGET environmental variable nor it has any compile time flags that can be set like in gcc (-mmacosx-min-version)
Someone please guide me through this. Thanks in advance.