There isn't an official Linux release for the Garmin Connect IQ SDK. However, I have been able to use Wine in order to run the Windows version of the simulator on Ubuntu 14.04.
Download the SDK
You will need a copy of the SDK. Hop on over to your friendly neighborhood
Connect IQ store and grab a copy of the Windows SDK. You will then need
to extract the zip file to location you want to install. For example, I put
mine in my home directory:
Next, for convenience, place the
connectiq/bin directory in your PATH.
~/.bashrc like so:
Make the bash scripts executable
Inside of the bin directory, you will need to make both the
monkeydo files executable. Do that by running the following:
user@machine:~/connectiq/bin$ chmod +x monkeyc monkeydo
Make sure you're up to date on everything:
user@machine:~$ sudo apt-get update user@machine:~$ sudo apt-get upgrade
Install the JDK
If it isn't already installed, you'll need the JDK. If you don't know if it's installed, you can check by running
user@machine:~$ javac -version
If that fails with the message "The program javac can be found in the following packages" then it's not installed. You will need to run the following to install it:
user@machine:~$ sudo apt-get install default-jdk
If you want a more specific version of the JDK or if you want the Oracle JDK check out the tutorial at Digital Oceans.
In order to run the Windows simulator executable Wine will need to be installed. Install it simply by running:
user@machine:~$ sudo apt-get install wine
After installation has completed, run the wine command and it will do some
initial setup such as creating the virtual C drive, program files, etc. These
new directories will be placed in
monkeydo bash script needs to be edited in a couple of spots.
The lines starting with:
"$MB_HOME"/shell --transport=tcp ...
needs to be changed to
wine "$MB_HOME"/shell.exe --transport=tcp ...
Create a simulator starter
Next, we'll borrow some code from
monkeyc to create a helper to start the
simulator. Create a new file called
monkeysim within the Connect IQ
directory. Make it executable:
user@machine:~/connectiq/bin$ chmod +x monkeysim
monkeysim, put the following:
MB_HOME="$( cd "$( dirname "$0" )" && pwd )" wine "$MB_HOME"/simulator.exe
Putting it all together
Try testing your setup out on one of the sample projects:
user@machine:~$ cd connectiq/samples/Analog user@machine:~connectiq/samples/Analog$ monkeyc -m manifest.xml -w -z resources/strings.xml -z resources/bitmaps.xml -z resources/resource/resources.xml -o bin/Analog.prog user@machine:~connectiq/samples/Analog$ monkeysim & user@machine:~connectiq/samples/Analog$ monkeydo bin/Analog.prg
Now you should have a wonderful analog watch face telling you what time it is.
I haven't fully tested the simulator. I have no idea if the android, communication, sensor stuff works, this should at least get you up and running.
If you're getting stuck somewhere, be sure to leave a comment below.