MarionetteAI Mac OS
- iOS
- macOS
- watchOS
- tvOS
- Swift
- Man Pages
- .NET Framework
- ActionScript
- Akka
- Android
- Angular
- Ansible
- Apache
- Appcelerator Titanium
- AppleScript
- Arduino
- Backbone
- Bash
- Boost
- Bootstrap
- Bourbon
- Bourbon Neat
- C
- C++
- CakePHP
- Cappuccino
- Chai
- Chef
- Clojure
- CMake
- Cocos2D
- Cocos2D-X
- CodeIgniter
- CoffeeScript
- ColdFusion
- Common Lisp
- Compass
- Cordova
- Corona
- CouchDB
- Craft
- CSS
- D3.js
- Dart
- Django
- Docker
- Doctrine ORM
- Dojo Toolkit
- Drupal
- Elasticsearch
- Elixir
- Emacs Lisp
- Ember.js
- Emmet.io
- Erlang
- Express.js
- ExpressionEngine
- ExtJS
- Flask
- Font Awesome
- Foundation
- GLib
- Go
- Gradle
- Grails
- Groovy
- Grunt
- Gulp
- Haml
- Handlebars
- Haskell
- HTML
- Ionic
- Jasmine
- Java SE
- Java EE
- JavaScript
- Jekyll
- Jinja
- Joomla
- jQuery
- jQuery Mobile
- jQuery UI
- Julia
- Knockout.js
- Kobold2D
- Laravel
- LaTeX
- Less
- lodash
- Lua
- Marionette.js
- Matplotlib
- Meteor
- Mocha
- MomentJS
- MongoDB
- Mongoose
- Mono
- MooTools
- MySQL
- Nginx
- Node.js
- NumPy
- OCaml
- OpenCV
- OpenGL
- Pandas
- Perl
- Phalcon
- PhoneGap
- PHP
- PHPUnit
- Play Framework
- Polymer.dart
- PostgreSQL
- Processing.org
- Prototype
- Pug
- Puppet
- Python
- Qt
- R
- Racket
- React
- Redis
- RequireJS
- Ruby
- Ruby on Rails
- Rust
- Sails.js
- Sass
- SaltStack
- Scala
- SciPy
- Semantic UI
- Sencha Touch
- Sinon
- Smarty
- Sparrow
- Spring Framework
- SproutCore
- SQLAlchemy
- SQLite
- Statamic
- Stylus
- Susy
- SVG
- Symfony
- Tcl
- Tornado
- Twig
- Twisted
- TypeScript
- TYPO3
- Underscore.js
- Unity 3D
- Vagrant
- Vim
- VMware vSphere
- Vue.js
- WordPress
- Xamarin
- Xojo
- XSLT
- Yii
- YUI
- Zend Framework
- Zepto.js
With each new macOS release, new APIs are added. Due to the wide range of platforms that Firefox runs on,and due to the wide range of SDKs that we support building with,using macOS APIs in Firefox requires some extra care.
Availability of APIs, and runtime checks¶
First of all, if you use an API that is supported by all versions of macOS that Firefox runs on,i.e. 10.9 and above, then you don’t need to worry about anything:The API declaration will be present in any of the supported SDKs, and you don’t need any runtime checks.
If you want to use a macOS API that was added after 10.9, then you have to have a runtime check.This requirement is completely independent of what SDK is being used for building.
The runtime check should have the following form(replace 10.14
with the appropriate version):
@available
guards can be used in Objective-C(++) code.(In C++ code, you can use these nsCocoaFeatures
methods instead.)
For each API, the API declarations in the SDK headers are annotated with API_AVAILABLE
macros.For example, the definition of the NSVisualEffectMaterial
enum looks like this:
A: Older versions of Vectorworks have not been tested on Mac OS X Mountain Lion (v.10.8). If you do attempt to run an older version of Vectorworks on Mountain Lion, you may encounter installation and stability issues for which there is no resolution. MarionetteAI is a tactical battle game where you build an AI for your characters. The AI you make will be shared with all players. Players can use their AI to battle against the AI of other players. Marionette Zoo aims to recreate the analogue adventures of the real-life marionette puppet theatre. Main features: - Explore the Hills, the Ocean, the Volcano and the Jungle. Meet Bird, Monkey, Octopus and T-rex and find their special actions. Get lost in the unique atmosphere of each scene. Play with one or two puppets at the same time. MarionetteAI is a tactical battle game where you build an AI for your characters. The AI you make will be shared with all players. Players can use their AI to battle against the AI of other players. ジャストシステムのジャストシステム製品の macOS / Mac OS X 対応状況のページです。.
The compiler understands these annotations and makes sure that you wrap all uses of the annotated APIsin appropriate @available
runtime checks.
Frameworks¶
In some rare cases, you need functionality from frameworks that are not available on all supported macOS versions.Examples of this are Metal.framework
(added in 10.11) and MediaPlayer.framework
(added in 10.12.2).
In that case, you can either dlopen
your framework at runtime (like we do for MediaPlayer),or you can use -weak_framework
like we do for Metal:
Using new APIs with old SDKs¶
If you want to use an API that was introduced after 10.12, you now have one extra thing to worry about.In addition to the runtime check described in the previous section, you alsohave to jump through extra hoops in order to allow the build to succeed with older SDKs, becausewe need to support building Firefox with SDK versions all the way down to the 10.12 SDK.
In order to make the compiler accept your code, you will need to copy some amount of the API declarationinto your own code. Copy it from the newest recent SDK you can get your hands on.The exact procedure varies based on the type of API (enum, objc class, method, etc.),but the general approach looks like this:
See the Supporting Multiple SDKs docs for more information on the MAC_OS_X_VERSION_MAX_ALLOWED
macro.
Keep these three things in mind:
Copy only what you need.
Wrap your declaration in
MAC_OS_X_VERSION_MAX_ALLOWED
checks so that, if an SDK is used thatalready contains these declarations, your declaration does not conflict with the declaration in the SDK.Include the
API_AVAILABLE
annotations so that the compiler can protect you from accidentallycalling the API on unsupported macOS versions.
Our current code does not always follow the API_AVAILABLE
advice, but it should.
Enum types and C structs¶
If you need a new enum type or C struct, copy the entire type declaration and wrap it in the appropriate ifdefs. Example:
New enum values for existing enum type¶
If the enum type itself already exists, but gained a new value, define the value in an unnamed enum:
Marionetteai Mac Os 11
(This is an example of an interesting case: NSVisualEffectMaterialSelection
is available starting withmacOS 10.10, but it’s only defined in SDKs starting with the 10.12 SDK.)
Objective-C classes¶
For a new Objective-C class, copy the entire @interface
declaration and wrap it in the appropriate ifdefs.
I haven’t personally tested this. If this does not compile (or maybe link?), you can use the following workaround:
Define your methods and properties as a category on
NSObject
.Look up the class at runtime using
NSClassFromString()
.If you need to create a subclass, do it at runtime using
objc_allocateClassPair
andclass_addMethod
.Here’s an example of that.
Objective-C properties and methods on an existing class¶
If an Objective-C class that already exists gains a new method or property, you can “add” it to theexisting class declaration with the help of a category:
Functions¶
With free-standing functions I’m not entirely sure what to do.In theory, copying the declarations from the new SDK headers should work. Example:
I’m not sure what the linker or the dynamic linker do when the symbol is not available.Does this require __attribute__((weak_import))
annotations?
And maybe this is where .tbd files in the SDK come in? So that the linker knows which symbols to allow?So then that part cannot be worked around by copying code from headers.
Anyway, what always works is the pure runtime approach:
Marionetteai Mac Os Catalina
Define types for the functions you need, but not the functions themselves.
At runtime, look up the functions using
dlsym
.
Marionetteai Mac Os Download
Notes on Rust¶
If you call macOS APIs from Rust code, you’re kind of on your own. Apple does not provide any Rust“headers”, so there isn’t really an SDK to speak of. So you have to supply your own API declarationsanyway, regardless of what SDK is being used for building.
In a way, you’re side-stepping some of the build time trouble. You don’t need to worry about any#ifdefs
because there are no system headers you could conflict with.
Marionetteai Mac Os X
On the other hand, you still need to worry about API availability at runtime.And in Rust, there are no availability attributeson your API declarations, and there are no@available
runtime check helpers,and the compiler cannot warn you if you call APIs outside of availability checks.