Pinmame
A mirror of the pinmame source code with modifications to add a ruby-based front-end.
Install / Use
/learn @mscottford/PinmameREADME
PinMAME Library or libpinmame
Building
Mac OS X (Intel only)
Getting the source
-
Install git for Mac OS X.
-
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
- Run
gem update --systemto make sure that you are using the latest version of RubyGems. - Run
gem install raketo make sure that you have rake installed. - 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.
- Grab the RubyGems source
- Unzip with
tar -zxvf rubygems-X.X.X.tgz - Switch to the RubyGems directory
- Run
/usr/bin/ruby setup.rb. Note this needs to be run from a Cygwin console window. - Run
/usr/bin/gem update --system. - 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.
