One part crazy, one part awesome.

Boxologic’s Cross Platformability

Last night we pushed code changes that makes Boxologic sanely buildable on OSX, Linux, and Windows. We also knocked out the way it used to require a specifically named input file (ending in .txt and following the ancient Windows 8.3 naming format), and added command line options for a help screen and version info.

Making it cross-platform was a unique experience for me. Making it compile on a modern unix machine was straightforward enough. Removing the windows-specific libraries and functions and migrating a few outdated functions were pretty much all it took.

Reworking command line options was a bit different though. In order to have mostly automatic option parsing, I was going to use the POSIX compliant getopt(). In fact I already had it working and commited at one point. But that required the use of a header unavailable on Windows systems unless you’re using something like MinGW as a compatibility layer. So then it became a question of examining what the long term goals of the project really are, if we’ll ever really have more than a handful of cli options that are easily managed manually without the use of getopt() and it’s GNU cousin getopt_long().

The answer turns out to be “Yes”. It’s more desirable to mange things manually and have simple cross-platform building than to strictly build for POSIX systems. So I reworked and committed code changes that compile out-of-the-box on OSX, Linux, and Windows. This project is turning out to be quite fun!

No Comments Yet

Leave a Reply

Your email address will not be published. Required fields are marked *