Building IronAHK from source on Ubuntu 10.10 Maverick Meerkat

I recently built and installed IronAHK from source. IronAHK is an open-source re-implementation of AutoHotKey for Mono. (it also runs on Microsoft’s .NET) A tutorial is available at, but I found it a little sparse (the page is completely blank) so I was on my own. Building and installing from source was fairly straightforward, but there were a few hassles along the way.

First, I downloaded the latest source from the GitHub repository using git:

git clone https://github.com/polyethene/IronAHK
cd IronAHK

After running the Makefile, I received the following error:

/bin/sh: xbuild: not found

You need mono-xbuild to build IronAHK, which is not installed by default on Ubuntu 10.10. It can be easily installed with:

sudo apt-get install mono-xbuild

Attempting to run the Makefile again, I received the following warning and errors:

Warnings:
/media/cat-files/software/linux-packages/IronAHK/IronAHK.sln (default targets) ->
(Build target) ->
/media/cat-files/software/linux-packages/IronAHK/Rusty/Rusty.csproj (default targets) ->
/usr/lib/mono/3.5/Microsoft.Common.targets (ResolveAssemblyReferences target) ->
/usr/lib/mono/3.5/Microsoft.Common.targets: warning : Reference 'System.Windows.Forms' not resolved
Core/Gui/HotkeyBox.cs(3,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Core/Common/KeyboardHook.cs(6,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Core/Gui/Dialogs/Input.cs(4,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Core/Gui/Dialogs/Progress.cs(3,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Core/Gui/Dialogs/Splash.cs(2,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?

After some searching, I found a comment on another blog post about installing IronAHK that indicates that you also need libmono-winforms2.0-cil:

sudo apt-get install libmono-winforms2.0-cil

If you are on a partition that requires execute permissions, you will need to give the setup script execute permissions: (thanks to Liam Thompson for this)

sudo chmod +x Deploy/bin/Release/setup.sh

Finally, I was able to successfully build and install using:

make
sudo make install

You can then execute IronAHK scripts from the command line by executing:

ironahk [--gui]

You can bind keyboard shortcuts to execute your scripts using your window manager as usual.

TL;DR:
Ubuntu 10.10 Maverick Meerkat
(updated thanks to Liam Thompson)

sudo apt-get -y install git mono-xbuild libmono-winforms2.0-cil
git clone https://github.com/polyethene/IronAHK
cd IronAHK
sudo chmod +x Deploy/bin/Release/setup.sh
make
sudo make install

Ubuntu 11.04 Natty Narwhal
(updated thanks to Liam Thompson and Repkam09)

sudo apt-get -y install git mono-xbuild libmono-winforms2.0-cil libmono-microsoft-visualbasic8.0-cil mono-vbnc
git clone https://github.com/polyethene/IronAHK
cd IronAHK
sudo chmod +x Deploy/bin/Release/setup.sh
make
sudo make install

Ubuntu 11.10 Oneiric Ocelot
I haven’t tested this full script, but when I tried to rebuild IronAHK from the latest source, I needed a new dependency (mono-gmcs). I don’t know if that dependency was not included with 11.10 or if it’s a new dependency added to IronAHK.

sudo apt-get -y install git mono-xbuild libmono-winforms2.0-cil libmono-microsoft-visualbasic8.0-cil mono-vbnc mono-gmcs
git clone https://github.com/polyethene/IronAHK
cd IronAHK
sudo chmod +x Deploy/bin/Release/setup.sh
make
sudo make install

This entry was posted in Uncategorized. Bookmark the permalink.

12 Responses to Building IronAHK from source on Ubuntu 10.10 Maverick Meerkat

  1. Liam Thompson says:

    Champion! Your motto is true. Thanks heaps.

    Minor, but for some reason, at the end I got:
    /bin/sh: Deploy/bin/Release/setup.sh: Permission denied
    make: *** [install] Error 126

    so I had to:
    sudo chmod +x Deploy/bin/Release/setup.sh
    sudo Deploy/bin/Release/setup.sh install

    • Thanks Liam! In my case I didn’t need to do that, likely because I unpacked to an NTFS partition that considers all files to have execute permissions. Many people will need that additional step.

  2. Repkam09 says:

    I just tried this on Ubuntu 11.04 and everything worked as expected except I also had to install the Visual Basic 2005 packages for Mono (“libmono-microsoft-visualbasic8.0-cil” and “mono-vbnc”) to fix the error:

    Core/Disk.cs(329,47): error CS0234: The type or namespace name `FileIO’ does not exist in the namespace `Microsoft.VisualBasic’. Are you missing an assembly reference?

    Thanks!

  3. peterhli says:

    Hmm, but has anyone managed to get IronAHK to do anything useful? It doesn’t seem like core functionality like hotkeys are actually working in the freshest source?

    • At the time I built, hot keys seemed to be working, but I did have issues with sending some keystroke combinations. There seems to be a lot of functionality still missing from IronAHK.

  4. Linux Mint 16

    sudo apt-get -y install git mono-xbuild libmono-winforms2.0-cil libmono-microsoft-visualbasic8.0-cil mono-vbnc mono-gmcs
    git clone https://github.com/polyethene/IronAHK
    cd IronAHK
    make
    sudo make install
    sudo chmod +x Deploy/bin/Release/setup.sh
    sudo ./Deploy/bin/Release/setup.sh install

    works as far as that goes

    • kiro says:

      Not for me I got the error messages:
      E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
      E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

      • I have seen this error many times and there is always some other updater or package manager running at the same time. Is it possible that some other package manager was using those files?

    • pepoluan says:

      Awesome, thank you!

      I haven’t yet tried it, but will soon.

  5. software says:

    I was recommended this blog via my cousin. I am not certain whether this publish is written by him as
    no one else realize such specific approximately my problem.
    You’re amazing! Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s