Page 1 of 1

How to build VBA-M from the SVN code in OS X.

Posted: Tue Jan 05, 2016 2:24 pm
by Squall Leonhart

Instructions on how to build VBA-M with the wx gui on Mac OS X 10.10 (Yosemite):

  1. Download the latest VBA-M source code (r1389 at this time) to a location (for example, ~/vbam)
  2. Install the latest Xcode (6.3.1 at this time) from the Apple developer website or Mac App Store. Requires Apple id (free registration).
  3. Install the Xcode command line tools by either downloading from the Apple developer website or typing
    • Code: Select all

      xcode-select --install
      • After it is installed, accept the Xcode license agreement by typing:
      • Code: Select all

        xcodebuild -license
  4. Install MacPorts from the pkg
  5. Open a terminal and install the dependencies that VBA-M needs via MacPorts by typing:
    • Code: Select all

      sudo port install cmake
      sudo port install pkgconfig
      sudo port install libpng
      sudo port install libsdl
  6. Download the wxWidgets 3.0.2 source code and extract it to a location like ~/wxWidgets
  7. In the terminal, change directory to ~/wxWidgets
  8. Create a build-wx directory for wxWidgets
  9. Configure wxWidgets for legacy versions of OSX.
    • Code: Select all

      ../configure --with-macosx-version-min=10.10
  10. Build wxWidgets
  11. Check that wx-config has been built and installed correctly.
    • Code: Select all

      wx-config
      • If wx-config returns an error message of "bad interpreter", open wx-config in a text editor and save the file format as UNIX.
      • Code: Select all

        vi wx-config
         :s et fileformat=unix
        :wq!
  12. Download the SFML 2.2 source code and extract it to a location like ~/SFML
  13. In the terminal, change directory to ~/SFML
  14. Configure SFML using CMake
    • Code: Select all

      cmake -DCMAKE_BUILD_TYPE='Release' -DBUILD_SHARED_LIBS='true' -DSFML_BUILD_FRAMEWORKS='true'
  15. Build SFML
  16. Change to the directory where the VBA-M source files are:
  17. Use cmake to configure VBA-M.
    • Code: Select all

      cmake -DENABLE_WX='true' -DENABLE_SDL='false' -DENABLE_CAIRO='false' -DENABLE_GTK='false' -DENABLE_LINK='true' -DENABLE_FFMPEG='false' -DENABLE_ASM_SCALERS='false' -DSFML_ROOT=''
  18. Build VBA-M
  19. Install VBA-M
    • Code: Select all

      make install
      • If you know how to link SDLMain into the build, let us know so that we can build a command line SDL version of VBA-M.
      • If you know how to create a .dmg package, let us know.