Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A mirror of the pinmame source code with modifications to add a ruby-based front-end.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
info
lib
src
util
zlib
.gitignore
list_game_drivers.rb
makefile
readme.md
test.rb

readme.md

PinMAME Library or libpinmame

Building

Mac OS X (Intel only)

Getting the source

  1. Install git for Mac OS X.
  2. Grab the source

    • For the curious: To just get a plain copy of the source, you need to run git clone git://github.com/mscottford/pinmame.git.

    • For contributors: If you want to contribute, then you need to fork the project first with your github account. You will then need to run the git clone <your clone url>.

Install Developer Tools (XCode)

If you don't already have it, then you need to install the Developer Tools that are packaged on your Mac OS X disc. You can also download the latest version.

You should now be able to run make in the root of the pinmame directory.

Install Ruby FFI Gem

  1. Run gem update --system to make sure that you are using the latest version of RubyGems.
  2. Run gem install rake to make sure that you have rake installed.
  3. Run gem install ffi.

Testing the setup

After you have run make and with Ruby FFI installed, you can test your configuration by running ruby test.rb. If you see a 0 on the next line then you are all set.

Windows

Installing dependencies

Grab a copy of Cygwin. Make sure that you select the following packages for installation.

  • Under Devel
    • gcc
    • git (needed to get the source)
    • make
    • ruby
  • Under Lib
    • libffi
  • Under Mingw
    • mingw-libz

Getting the source

  • For the curious: To just get a plain copy of the source, you need to run git clone git://github.com/mscottford/pinmame.git.

  • For contributors: If you want to contribute, then you need to fork the project first with your github account. You will then need to run the git clone <your clone url>.

Building the project

With this much installed and the source downloaded, you should be able to run make in the root of the directory. This will build libpinmame.dll. But you won't be able to use Ruby FFI to make calls into the library. Since this is how most future work will be developed, you need to get your ruby environment up and running.

Configuring Ruby

You need to use ruby from Cygwin in order to use it to make calls into libpinmame. So the first thing that you need to do is install RubyGems.

  1. Grab the RubyGems source
  2. Unzip with tar -zxvf rubygems-X.X.X.tgz
  3. Switch to the RubyGems directory
  4. Run /usr/bin/ruby setup.rb. Note this needs to be run from a Cygwin console window.
  5. Run /usr/bin/gem update --system.
  6. Run /usr/bin/gem install rake.

Now you have a working copy of Ruby with RubyGems support. Congrats!

Installing Ruby FFI Gem

This part is really easy. Just run /usr/bin/gem install ffi. That's it. Wasn't that easy?

Testing the setup

Now you should be able to run /usr/bin/ruby test.rb. If you see 0 on the next line then it worked.

Something went wrong with that request. Please try again.