Io is an interesting prototype-based programming language, so I wanted to give it a try.
Unfortunately, the installation process is not the simplest thing in the world, but after a couple of days struggling with it, I had success and I want to share with you my recipe.
Brew – Your best friend
Forget Macports or Fink. They are junk. Install Brew instead!
Brew is much more conservative and less invasive, compared to the former ones. Once installed, you can easily install and remove packages with “brew search <something>” and “sudo brew install <something>” or “sudo brew remove <something>”.
Part I – Cloning is the way
The first thing I suggest to you is to clone the Io repo, with something like this:
git clone https://github.com/stevedekorte/io.git
Then you need to open the CMakeLists.txt, scroll until line 143 and change this:
string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV})
Into this:
string(REGEX REPLACE "(.......)." "\\1" IO_GIT_REV ${IO_GIT_REV} "" "")
Now the fun begins.
Cmake – Use the Graphic Frontend, Luke!
CMake makes the installation and compiling phases easier. I suggest you to download the graphic frontend (I don’t remember which version I’ve downloaded, but I have the CMake application into Applications folder). If you are new to CMake these are the brain-dead simple instructions to follow:
- Open CMake.app
- When CMake asks you “Where is the source code”, put the cloned repo directory (e.g /Users/alfredodinapoli/github/io)
- When CMake asks you “Where to build the binaries”, put the cloned repo dir (e.g /Users/alfredodinapoli/github/io)
- Click on Configure – Use the default option (Makefiles)
- Click on Generate
Now go into the cloned repo dir and type:
sudo make install
If the compiling phase complains about some libraries missing, consider to install through Brew these packages:
- ossp-uuid
- pcre
Obviously every time you install a new package, is a good option to refresh the Makefile through the usual cycle Configure/Generate.
Now everything must be allright and the installation MUST succed! If not, well, we have a problem 🙂
Happy hacking with Io Language!
Alfredo
Hi Alfredo,
Thanks for this correction 🙂
I submitted a pull request for the Io Formula of Homebrew with your correction. You could see it here https://github.com/mxcl/homebrew/pull/5970
Yann
You’re welcome! Happy to have been useful!