BlueM / cliclick

macOS CLI tool for emulating mouse and keyboard events
https://www.bluem.net
Other
1.63k stars 122 forks source link

generate-characterinfo.php: /usr/bin/php: bad interpreter: No such file or directory #132

Open ryandesign opened 2 years ago

ryandesign commented 2 years ago

A user reported to MacPorts that cliclick does not build on macOS 12 because:

generate-characterinfo.php: /usr/bin/php: bad interpreter: No such file or directory

It seems Apple has removed /usr/bin/php as of macOS 12, as they warned some time ago they would do:

  • Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. In future versions of macOS, scripting language runtimes won’t be available by default, and may require you to install an additional package. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)

Would you accept a pull request to convert this script to a different language? /usr/bin/perl is still present on macOS 12 but given the warning above, it may be removed in the future. But perhaps using a shell language like /bin/zsh would be more likely to continue to work in the future, since Apple is likely to continue to ship a shell with the OS, and zsh is currently the default shell.

BlueM commented 2 years ago

@ryandesign: sure, thanks. Perl und zsh would be equally fine to me. Note: perl is also used in generate-action-classes-macro.sh, so if you decide to use zsh, Perl should probably also be replaced with sed in that script.