Compile X-plane Plugin For Mac

Posted on
Compile X-plane Plugin For Mac Rating: 7,7/10 1653 votes
  1. Compile X-plane Plugin For Mac Mac

The plugin works with X-Plane as low as 8.64, but dual-cockpit support will. I've uploaded a new version to test for X-Plane 9 or 10 for Mac and Win. Last year we sold our house, planned to build a new one, ended up buying a better one.

So the first stop is to download the plugin. This comes in three flavours: an XCode one for Mac OSX, a Visual Studio 2010 version for windows, and a GCC Linux version. I grabbed the Linux version, as that's what I run on my development PC (I also have an X-Plane install here for testing stuff like this). The Linux version is the easiest to build as you just have to run make (the SDK is embedded in the example).

It compiled the example C program and linked it against the SDK, and built a shared library under Hello-World-SDK-3 called lin.xpl. I symlinked the Hello-World-SDK-3 folder into X-Plane's Resources/plugins folder, and started up X-Plane, and got this. int XPluginStart (char. outName, char. outSig, char.

Compile X-plane Plugin For Mac Mac

X-plane

outDesc). This is called when the plugin is started. For a global plugin (one which runs regardless of what aircraft or scenery is being used, and is found in the Resources/plugins folder), this is usually called while X-Plane itself is starting up.

The minimal the plugin must do is copy the plugin name, a unique plugin identifier, and plugin description into the char buffer pointers provider (up to 256 characters). The plugin can then do any other stuff it wants to do during startup. In the case of Hello-World-SDK-3, it uses the API's from XPMLDisplay.h and XPMLGRaphics.h to create a window withing X-PLane. void XPluginStop (void). This is called when the plugin is stopped. In the Hello-World-SDK-3 example, the window created is destroyed. int XPluginEnable (void).

This doesn't do anything in Hello-World-SDK3. void XPluginDisable (void). This doesn't do anything in Hello-World-SDK3. It just returns 1.

void XPluginReceiveMessage (XPLMPluginID inFrom, int inMsg, void. Hp laserjet pro 100 color mfp m175 series cd software for mac mac. inParam). This doesn't do anything in Hello-World-SDK3.

Checklist of stuff to learn to be able to write my own 'dataref accessor' plugin:. How to compile the plugin source on three platforms. Linux I have access to and familiarity with, and I can probably get a compiler going on Windows. But I don't have access to a Mac (a VM Hackintosh maybe?).

Compile X-plane Plugin For Mac

It's a very interesting challenge though, especially to get a decent 'workflow' going to build software this way. Running a separate thread to offload the bulk of the work out of X-Plane's callbacks. Fortunately things are much simpler than they were 10-15 years ago, as C11 now has threads.

Free

I'm assuming it would be easy to create cross-platform threaded code? I love BSD sockets on UNIX, but probably Boost::ASIO is a better cross-platform solution? I'm also curious about using the new Boost::Beast WebSockets library. It supports framing messages within the comms. It would be more efficient to index the dataref names, like the X-PLane UDP API. And a lot more efficient to send binary data over the wire.

But it's also tempting to have a JSON encoded gateway to X-Plane's internals (javascript dashboards?). Or I could support both binary and JSON.