Scripting Language Runtimes
Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)
Use of Python 2.7 isn’t recommended as this version is included in macOS for compatibility with legacy software. Future versions of macOS won’t include Python 2.7. Instead, it’s recommended that you run
python3from within Terminal. (51097165)
How this can impact you? well … with Adobe AIR if you use things like
the NativeProcess class
when in the Device profiles
for either a native installer (
see Communicating with native processes in AIR
To communicate with native processes, package an AIR application to be installed via a native installer. The file type of native installer is specific to the operating system for which it is created:
- It is a DMG file on Mac OS.
- It is an EXE file on Windows.
- It is an RPM or DEB package on Linux.
These applications are known as extended desktop profile applications. You can create a native installer file by specifying the
-target nativeoption when calling the
-packagecommand using ADT.
or a captive runtime
see Packaging a captive runtime bundle for desktop computers
- No separate runtime redistribution required
- Can use the NativeProcess API
On a mac, when you will execute a shell script
something.sh it will now default to
zsh if you did not use a shebang line, see On the Shebang
see also File.openWithDefaultApplication() to see a table of of file extension that are prevented to open by default
but that’s with
NativeProcess you can run those defaults
For ex, you could have a simple
.bat for Windows and
.sh for macOS / Linux that detect if Python is available on the system, and if yes then use
NativeProcess to execute
But that is also changing for macOS, if you relied on Scripting Language Runtimes being already there by default on the system, like Perl, Python, Ruby … well not anymore.
Now, same as Windows, you will have to detect them and propose to install them if they are missing and you need them, or use an alternative method.
To cover all the grounds, you have basically 2 alternatives:
- use a native extension or ANE
will integrate even better with ActionScript 3
but only Windows and macOS, and you have to develop it / test it / compile it
eg. maybe not easy for anyone to just add an ANE like that
- use a binary executable that does not need to have a scripting engine pre-installed
for example, you can find some
py2exeand alike to convert some python scripts to a binary executable, but sadly does not work on all platforms
Little self promo, if you do use Redtamarin for such small scripts, you can easily convert it to a projector by merging the runtime and the script so in the end the native process run an binary executable (that does not need to depends on a scripting engine being installed on the system).
With the added advantage that you also program it in AS3, and you can produce from the same bytecode, different exe for different platforms: Windows, macOS and Linux.
Very simple example, let’s say you require to be able to read environment variables
with an ANE you will need to write some C/C++ to use the
with a small Redtamarin program you can quickly implement it and use NativeProcess to get the same functionality, and build an exe.
Or a bit of both, eg. case where you still want to publish on Linux and AIR 2.6 only support NativeProcess but does not support ANE.