Skip to content

Instantly share code, notes, and snippets.

@cswingler
Last active August 29, 2015 14:04
Show Gist options
  • Save cswingler/02caefb9270c58661396 to your computer and use it in GitHub Desktop.
Save cswingler/02caefb9270c58661396 to your computer and use it in GitHub Desktop.
Running/Compiling VBA-M on OS X Mavericks

Building VBA-M on OS X Mavericks

Building the base of VBA-M is trivial, at least. This doesn't get you a UI, but it builds a binary that will load a ROM:

cd $BUILDIR
mkdir build_unix
cd build_unix
cmake ../
make

That's it. Run ./vbam filename.rom and it should launch the game in an SDL-powered native window with the default keybindings. Be aware that ../src/vba-over.ini has a bunch of useful defaults for when loading ROMs.

Now, to get this mess into XCode and write a not terrible UI...

Creating an XCode project with Cmake

This just doesn't seem to want to cooperate.

cd $BUILDDIR
mkdir build_xcode
cd build_xcode
cmake -G Xcode ..
<snip>
-- Found SDL: -lSDLmain;/usr/local/lib/libSDL.dylib;-framework Cocoa (found version "1.2.15")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/chris/src/sourceforge/vbam-code/build_xcode

That seems to work, but Xcode doesn't seem to want to open it:

Project /vbam-code/build_xcode/VBA-M.xcodeproj cannot be opened because the project file cannot be parsed.

Fix

xcodebuild barfs a little more useful output:

2014-07-26 16:26:30.100 xcodebuild[12069:1007] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 941. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
2014-07-26 16:26:30.105 xcodebuild[12069:1007] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 941. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
2014-07-26 16:26:30.106 xcodebuild[12069:1007] Unexpected character / at line 1
xcodebuild: error: Unable to read project 'VBA-M.xcodeproj'.
	Reason: Project /Users/chris/src/sourceforge/vbam-code/build_xcode/VBA-M.xcodeproj cannot be opened because the project file cannot be parsed.

cmake creates an invalid PLIST. Subst to correct:

%s/-DLOCALEDIR=\\\\"\/usr\/local\/share\/locale\\\\"";/-DLOCALEDIR='\\"\/usr\/local\/share\/locale\\"'";/g
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment