-
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>
.
-
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.
- Run
gem update --system
to make sure that you are using the latest version of RubyGems. - Run
gem install rake
to make sure that you have rake installed. - Run
gem install ffi
.
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.
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
-
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>
.
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.
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!
This part is really easy. Just run /usr/bin/gem install ffi
. That's it. Wasn't that easy?
Now you should be able to run /usr/bin/ruby test.rb
. If you see 0
on the next line then it worked.