HOW TO: Install Monkey on Linux (a rough guide).

Monkey Archive Forums/Monkey Tutorials/HOW TO: Install Monkey on Linux (a rough guide).

dawlane(Posted 2013) [#1]
As a hell of a lot of this stuff is out of date. I decided to redo the lot and place it into a pdf file with a few icons and scripts.
Note that this is still a work in progress and still has a few things to cover such as rebuilding the tools with BlitzMax and the other distributions mentioned here.
MonkeyX Linux Installation
Note that this is the main download link. Other other links in other posts will not be updated.

I have created a little tool in bash script that will generate an tar.gz archive along with an install script for your applications deployment. You should read the README for instructions on how to use it. Be warned that this is still a work-in-progress and you should test the install script in a virtual machine.
You can get from here.

If you need file requesters. Then try out this modified module.


dawlane(Posted 2013) [#2]
.


dawlane(Posted 2013) [#3]
-


dawlane(Posted 2013) [#4]
How to add launchers, and command line tools
The easiest way to access the command line tools is to add the Monkey directory to the PATH variable. As I don't think that the MonkeyPro license covers multiple users, so I will only explain how to do this for a single user.

In the user's home directory there is a hidden file usually named .profile or .login. It may also be a variation of this name depending on the command shell used. Use a text editor to edit this file and add to the end of the file this.
MONKEY="$HOME/MonkeyPro73b"
PATH="$MONKEY:$MONKEY/bin:$PATH"
export PATH
Save this and log out. When you log back in. You should now be able to open a command terminal and execute transcc_linux and other tools from the command line.

The following deals with launchers for full desktop environments like GNOME and KDE. For window managers like openbox you should read their documentation on how to do this. In any case, many distributions use a GUI menu tool to do this and is the easiest method. But if you like punishment...

Each user installed launcher gets placed in to a hidden directory called applications inside .local/share and has the file extension of .desktop. This directory doesn't exist until a user created launcher is made by a menu tool.
A lot of desktop environments hide the real file name, so don't be alarmed if you don't see them or if it changes them.

To create a launcher by hand open a text editor and add the code below. Note: It would be a good idea to convert the icons in the ted sources directory into png or xpm and resize them into 48x48 pixels so you can use them here and later on with file association.
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/user/MonkeyPro73b/Monkey
Name=Monkey Pro IDE 
Comment=Monkey Pro Intergrated Development Environment
Icon=/home/user/MonkeyPro73b/src/ted/ted_old.ico
MimeType=application/x-MonkeyIDE; charset=binary
Categories=Development
You should change the path in Exec, the langauge from en_GB and the icon in Icon to suit your system. The specifications for these file can be found here.
Save the text as monkey-ide.desktop in .local/share/applications. If the directory .local/share/applications doesn't exist; create it. You will not see any change until after you have logged out and back in. You will find the entry in Programming.

Desktop Launcher
This is simply a link to the Monkey binary or you can copy the .desktop file to your desktop.
Link method example
ln -s ~/MonkeyPro73b/Monkey ~/Desktop/MonkeyIDE
File Associations
Are you sick of looking at naff icons in the file manager? Then read on
This method has been tested on Linux Mint Mate/Cinnamon, so it should work and Ubuntu/Debian and as long as the system has xdg-icon-resource installed. It should work on other distributions as well. If you have manually created the .desktop launcher from above. Then you can associate .monkey files with the application and assign an icon image to them. If you haven't created the desktop launcher then you can open it in a text editor and modify it. That's if you can fined the right one as these menu manages do their own naming thing.
I won't go into a lengthy explanation on Linux mime types so you should go here for more information. But you will need to create/modify two files.
First execute this command in a terminal
mkdir -p .local/share/mime/packages
Now open a text editor and enter the xml code below.
<?xml version="1.0"?>
    <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
        <mime-type type="application/x-MonkeyIDE">
        <icon name="x-MonkeyFile"/>
        <comment>Monkey File</comment>
        <comment xml:lang="en">Monkey File</comment>
        <glob pattern="*.monkey"/>
    </mime-type>
</mime-info>
Save this as user-extension-monkey.xml in .local/share/mime/packages.

Now in .local/share/application there maybe a file named mimeapps.list. If there is then we need to modify it and add the lines below. Note: The lines with square brackets are sections. So enter the line below the section into the relevant part. If mimeapps.list doesn't exist then you need to create it and add the lines below as is.
[Default Applications]
application/x-MonkeyIDE=monkey-ide.desktop

[Added Associations]
application/x-MonkeyIDE=monkey-ide.desktop;

Now if you converted the Monkey application icons to png or xpm and resized them to 48x48. You can copy one over to .local/share/pixmaps. Again if this hidden directory doesn't exist you should create it.

Now you can run the next two commands.
update-mime-database ~/.local/share/mime
xdg-icon-resource install --size 48 ~/.local/share/pixmaps/ted.png x-MonkeyFile
The next time you open the file browser the all .monkey files should have an icon.


Sammy(Posted 2013) [#5]
Not using Linux just now but when I do this will be the first thread I look up.

Well done and thank you!


dawlane(Posted 2013) [#6]
HOW TO: Fedora Still a work In progress as I need to confirm the JDK installation methods.
From Monkey version 67c+.
The base distribution for Fedora is GNOME release 19. And should work on those distribution that are based off it.

First thing.
Monkey Execute Permissions
MonkeyPro73b as an example. How to add launchers, and command line can be found here.
Tip: To save having to do this every time. Re-compress the Monkey directory as a tar.gz file as is stores file permission access.
chmod +x ~/MonkeyPro73b/Monkey
chmod +x ~/MonkeyPro73b/bin/makedocs_linux
chmod +x ~/MonkeyPro73b/bin/mserver_linux
chmod +x ~/MonkeyPro73b/bin/Ted
chmod +x ~/MonkeyPro73b/bin/transcc_linux

Before you begin the next section make sure your system is up to date.
32bit
If you are using KDE the qt libraries will more than likely be installed so you can remove qtwebkit from the line below.
sudo yum install gcc-c++ mesa-libGLU-devel openal-soft-devel qtwebkit ant -y
64bit
To have the ability to build both 32bit and 64bit. Just modify your project make file in glfw/gcc_linux by adding or removing -m32 in
CPPFLAGS=$(CCOPTS) -m32 \
LDFLAGS= -m32
You have to remove the object files (.o) if you wish to change it from 32bit/64bit before rebuilding. Easily done with a file explorer and find files.

The eagle eyed among you would have noticed that qtwebkit isn't in the command below. I have missed it off for a reason. If you are using GNOME and you have a 64bit version of the IDE you can add it. KDE should have it installed already.

The hardest part for a 64 bit system is getting Ted to work as you have two choices.

1) Install qtwebkit.i686 to get the one with Monkey running. But I have found that getting the GUI to look like the rest of the UI is more trouble than its worth. You will see what I mean if you install the stand alone flash player debugger. Which leaves....
2) Install QtCreator and rebuild Ted.
sudo yum install qt-creator qtwebkit-devel
Make sure that you are using the correct Qt Kit (Qt4) as Qt5 maybe the default. See here on how to add a kit.
Ted project file (Ted.pro) is located in src/ted.
If you want to play around with Qt5 intall qt5-qtwebkit-devel and comment out line 52
QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "UTF-8" ) );
in mainwindow.cpp.

Flash
Version 11.2 of the Flash player plug-in will be the last for Linux. All Adobe are doing now for the Linux version are maintaining security updates.
Download the Flex SDK from here.
Stand alone player can be found in flex_sdk_4.6/runtimes/player/lnx as a compressed archive. Updates can be found here. Note: This is a 32bit application.
32bit
sudo yum install gtk2 libcurl libXt -y
64bit
sudo yum install gtk2.i686 libXt.i686 libcurl.i686 -y
Don't forget to modify the paths (FLEX_PATH and FLASH_PLAYER) in config.linux.txt in Monkey's bin directory to point to where the flex sdk and the stand alone flashplayerdebugger are.
Note:You may have to set the execute permissions. Lazy way chmod -R +x ~/flex_sdk_4.6

Flash Player Web Plug-in
The latest version can be found here.
You will have to do a search on how to install it for you distribution.

The following is how to install the web browser plug-in for Fedora. It downloads directly from Adobe's site. It can be a hit and miss affair as on the occasion. I couldn't connect to the Adode server. Note: I don't know if the link will point to the latest revision. If in doubt, check.
32bit
sudo yum install http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm -y
64bit
sudo yum install http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm -y
Next import the package signature key and install the plug-in
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
sudo yum install flash-plugin -y
If you are using a browser other than the standard one. You may need to create some system links. You should research on how to do this for your browser.

JDK
From what I can gather it is not recommended that the openJDK be used for android development. You can get the latest Oracle JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html
So far it looks like there are only a few of ways that you can install the JDK. I haven't fully explored the possible options of installing jdk yet for Fedora. But here's a list of them.
1) Using the RPM package and update-alternatives. Note: Both 32bit and 64bit both point to /usr/java so it would get messy installing both on the same system using this method.
2) Using tar.gz and update-alternative as base on installing for Ubuntu found here.
3) Using JAVA_HOME, etc environment variables.

Using the update-alternatives method by hand can be quiet a task. It's best to write a script to set it up.

Option 1) I came across this tutorial and another one here. The first shows you two ways to set up java with update-alternative. One is to link directly to the programs in the JDK directory while the other goes through to a system link that gets updated when you install a new rpm. So you only have to set update-alternative once. And every new JDK rpm that's installed after automatically uses those alternatives. The second one is for an older version of Fedora but is along the same lines.

Option 2) If you have seen the linked page you get the idea. There is no update-java-alternatives on fedora so the trick here would be to do something like what is show in the tutorials in option 1.

Option 3) This is one way where you don't have to have elevated privileges to install the JDK, but it will not be available to other users. You can if you add the variables to /etc/profiles but you will have to research this for yourself.

To set up the JDK for individual users you have to edit a hidden file in your user home directory. Hidden files and directories start with a period (.) and there is a setting in the file explorer menu so you can see these type of files. The file usually goes by the name profile/login or a variation of it depending on the command shell being used.

Open up your .profile and add the lines below to the end of it.
JAVA_HOME="$HOME/jdk1.7.0_45"
JDK_SET="$JAVA_HOME:$JAVA_HOME/bin"
PATH="$JDK_SET:$PATH"
export JAVA_HOME
export PATH
Save the file and log out and when you log in again you should find that java now points to this location in the users directory.

In any of the above, you should edit JDK_PATH in config.linux.txt in the Monkey bin directory to point to a JDK install.

Android
The execute permissions need to be set.
chmod -R +x ~/android-sdk-linux/tools
Then to install the android packages.
~/android-sdk-linux/tools/android
Select the Android 3.2 API and modify the ANDROID_PATH in config.linux.txt in the monkey bin directory with the path of the android sdk.


dawlane(Posted 2013) [#7]
JDK ALTERNATIVES METHOD SCRIPT
The script below can be used to install Oracle JDK's to those systems based on Debian/Ubuntu/Linux Mint and should be used with caution as you require administrative rights to use it.

If possible you should test it in Virtualbox or any other virtual emulator so you can see how it works. As I wouldn't want to be blamed for screwing up your system with a bad script or install method. The script isn't going to be perfect. It will install JDK's and remove them, but there are a few things you will need to be aware of.

1) Never use it to remove a JDK/JRE that was installed by apt. It can seriously ruin your day. Trust me on this.

2) The last JDK to be installed will have the highest priority. So it's best not to install an old JDK after a new one.

3) If you have more than one JDK installed and you remove one of them. The script will allow you to select which of the installed versions of java you want to use. If that version just has the JRE part installed, then update-alternatives will use the next highest priority installed JDK for those missing parts. This means that you can have the JRE from one version and the JDK from another. Not a good idea when you think of it. To solve that problem other than removing the offending JDK is to install the missing JDK and use update-java-alternatives with the -s option and the alias name for that JDK version you wish to use. The only other way is to do it manually.
There is a GUI tool that you can install for managing alternatives called galternatives which make it easier to select/add/remove all alternatives on a system. Remember to be careful as this tool has to be used with administrative rights.

4) Web browser plug-ins can also be a problem when using different versions of the JDK. You should check that the correct plug-in is being used. I have seen firefox use the right version but use the wrong name for it. Which can be a problem as it blocks old versions that have vulnerabilities.
The only web browsers currently supported are: Google Chrome, Firefox and any Mozilla based browser.

Now to the script
Open a text editor, copy the code below and save it with the name reg-jdk.sh


To use this script you need to change the execute permissions. Assuming that you saved the script to your home directory.
chmod +x ~/reg-jdk
and you will need to download the tar.gz versions of the oracle JDK.
And to use for example. NOTE: Changing to su sets the path to root's home directory so you need to use the full path name to the script as well as the path to the archive
sudo reg-jdk.sh -i ~/Download/jdk1.7u45-linux-i586.tar.gz
sudo reg-jdk.sh -r jdk1.7.0_45-oracle-i386
sudo red-jdk.sh -u jdk1.7.0_45-oracle-i386
The options are...
-i, --install : Install an Oracle JDK archive file in the tar.gz format. The script will use the compressed JDK directory of the archive to generate the name for the alias and append -oracle-i386 or -oracle-amd64 depending on the archive's file name. It then switchs java etc to this version.
-r, --remove : Removes the JDK by the alias name. After removing the script will ask you which JDK you wish to use.
-u, --update : This can be use to update the alias for a named JDK. For example you add another browser. It will also select that version automatically.

If you wish to quickly switch from one version of the JDK/JRE. Then use the update-java-alternatives e.g.
update-java-alternatives -s jdk1.7.0_45-amd64


You should do a search and read about update-alternatives and update-java-alternatives.


dawlane(Posted 2013) [#8]
HOW TO: Ubuntu 12.04+/Linxu Mint 13+/Debian 7/Linux Mint DE both 32bit and 64bit
From Monkey version 67c+.
Any distribution named in the title. And should work on those distribution that are based off it.

Monkey Execute Permissions
MonkeyPro73b as an example.
Tip: To save having to do this every time. Re-compress the Monkey directory as a tar.gz file as is stores file permission access. How to add launchers, and command line access can be found here.
chmod +x ~/MonkeyPro73b/Monkey
chmod +x ~/MonkeyPro73b/bin/makedocs_linux
chmod +x ~/MonkeyPro73b/bin/mserver_linux
chmod +x ~/MonkeyPro73b/bin/Ted
chmod +x ~/MonkeyPro73b/bin/transcc_linux


Before you begin the next section make sure your system is up to date.
Debian users: sudo doesn't work out of the box so type su in a terminal and skip typing sudo or use su -c.
For 32bit
The eagle eyed among you would have noticed that libqtwebkit isn't in the command below. I have missed them off for a reason. If you using GNOME and the IDE doesn't work then you need to install it. It will automatically install the Qt libraries. KDE should have it installed already.
sudo apt-get -y install g++ libglu1-mesa-dev libopenal-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev ant
For 64bit
To have the ability to build both 32bit and 64bit. Just modify your project make file in glfw/gcc_linux by adding or removing -m32 in
CPPFLAGS=$(CCOPTS) -m32 \
LDFLAGS= -m32
You have to remove the object files (.o) if you wish to change it from 32bit/64bit before rebuilding. Easily done with a file explorer and find files.

Debian 7/Linux Mint DE only
Add multi-arch support.
su -c 'dpkg --add-architecture i386 && apt-get update'
All 64bit
Installs the libraries for development and to run 32bit built tools. Debian users: sudo doesn't work out of the box so type su in a terminal and skip typing sudo or use su -c.
The eagle eyed among you would have noticed that libqtwebkit isn't in the command below. I have missed them off for a reason. If you are using GNOME and you have a 64bit version of the IDE you can add it. KDE should have it installed already.

And add a few links
Ubuntu/Linxu Mint
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib32/libGL.so
Debian/Linux Mint DE
su -c 'ln -s /usr/lib/i386-linux-gnu/libGL.so.1 /usr/lib32/libGL.so'
If you get the compiler complaining about not being able to find libGL.so.1 on Debian, then add
su -c 'ln -s /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1 /usr/lib/i386-linux-gnu/'
All
sudo ln -s /usr/lib/i386-linux-gnu/libopenal.so.1 /usr/lib32/libopenal.so
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib32/libX11.so
sudo ln -s /usr/lib/i386-linux-gnu/libXxf86vm.so.1 /usr/lib32/libXxf86vm.so
sudo ln -s /usr/lib/i386-linux-gnu/libXi.so.6 /usr/lib32/libXi.so
sudo ln -s /usr/lib/i386-linux-gnu/libXrandr.so.2 /usr/lib32/libXrandr.so
sudo ln -s /usr/lib/i386-linux-gnu/libXinerama.so.1 /usr/lib32/libXinerama.so
sudo ln -s /usr/lib/i386-linux-gnu/libXcursor.so.1 /usr/lib32/libXcursor.so
The hardest part for a 64 bit system is getting Ted to work as you have two choices.

1) Install libqtwebkit4:i386 to get the one with Monkey running. But I have found that getting the GUI to look like the rest of the UI is more trouble than its worth. Which leaves....
2) Install QtCreator and rebuild Ted.
sudo apt-get install qtcreator libqt4-dev libqtwebkit-dev
Make sure that you are using the correct Qt Kit (Qt4) as Qt5 maybe the default. See here on how to add a kit.
Ted project file (Ted.pro) is located in src/ted.
If you want to play around with Qt5 then look here

Flash
Version 11.2 of the Flash player plug-in will be the last for Linux. All Adobe are doing now for the Linux version are maintaining security updates.
Download the Flex SDK from here.
Stand alone player found in flex_sdk_4.6/runtimes/player/lnx as a compressed archive. Updates can be found here. Note: This is a 32bit application.
32bit
sudo apt-get -y install libgtk2.0-0 libcurl3 libnss3
64bit
sudo apt-get -y install libnss3:i386 libcurl3:i386 libstdc++6:i386 libxt6:i386 libgtk2.0-0:i386
Flash Player Web Plugin
The latest version can be found here.
You will have to do a search on how to install it for you distribution.

Flash Player Plugin (Debian Only)
Open a text editor with privileged elevation (root/su) and add the line below to the bottom of the file sources.list in /etc/apt/ and save.
deb ftp://ftp.debian.org/debian stable main contrib non-free
Execute the command below.
su -c 'apt-get -y update && apt-get -y install flashplugin-nonfree'
Don't forget to modify the paths (FLEX_PATH and FLASH_PLAYER) in config.linux.txt in Monkey's bin directory to point to where the flex sdk and the stand alone flashplayerdebugger are.
Note:You may have to set the execute permissions. Lazy way chmod -R +x ~/flex_sdk_4.6

JDK
From what I can gather it is not recommended that the openJDK be used for android development.
There are a number of ways to install the JDK. Using PPA's, update-alternatives or messing with the environment variables.

PPA
Warning Using PPA's is risky as you are relying a 3rd party to install software. The issues are one of security and whether the PPA will still be around in a years time.
Ubuntu/Linux Mint from here. You should read this in full.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Debian/Linux Mint DE from here. You should read this in full.


The next two methods require you to download the JDK from the Oracle web site. http://www.oracle.com/technetwork/java/javase/downloads/index.html

Update-alternatives
Can be a rather lengthy method to install manually, but more flexible as you can choose which JDK to use. I have written a script to make this task easier. You can find it here.

JDK Envirnoment Variables
This is one way where you don't have to have elevated privileges to install the JDK, but it will not be available to other users. You can if you add the variables to /etc/profiles but you will have to research this for yourself.

To set up the JDK for individual users you have to edit a hidden file in your user home directory. Hidden files and directories start with a peroid (.) and there is a setting in the file explorer menu so you can see these type of files. The file usually goes by the name profile/login or a variation of it depending on the command shell being used.

Open up your .profile and add the lines below to the end of it.
JAVA_HOME="$HOME/jdk1.7.0_45"
JDK_SET="$JAVA_HOME:$JAVA_HOME/bin"
PATH="$JDK_SET:$PATH"
export JAVA_HOME
export PATH
Save the file and log out and when you log in again you should find that java now points to this location in the users directory.

To install the browser plug-in for that user only you would make a few links again in hidden directories in the home directory.
In a command terminal. In this example for firefox/mozilla. But you should check where your browser stores it's user plugins and extensions. One place to look is in the .config directory.

Make the plugins directory
mkdir -p ~/.mozilla/plugins
32 bit:
ln -s ~/jdk1.7.0_45/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
64 bit:
ln -s ~/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

To check that the java plugin is installed correctly visit https://www.java.com/en/download/installed.jsp or in the browser address bar type about:plugins.

In any of the above, you should edit JDK_PATH in config.linux.txt in the Monkey bin directory to point to a JDK install.
System JDK's are installed in /usr/lib/jvm/ or extract a JDK archive to your home directory.

Android
The execute permissions need to be set.
chmod -R +x ~/android-sdk-linux/tools
Then to install the android packages.
~/android-sdk-linux/tools/android
Select the Android 3.2 API and modify the ANDROID_PATH in config.linux.txt in the monkey bin directory with the path of the android sdk.


dawlane(Posted 2013) [#9]
HOW TO: OpenSUSE both 32 and 64bit Still a work In progress as I need to confirm the JDK installation methods.
The base distribution for OpenSUSE is KDE release 12.3/13.1. And should work on those distribution that are based off it.

First thing.
Monkey Execute Permissions
MonkeyPro73b as an example. How to add launchers, and command line will be in another found here.
Tip: To save having to do this every time. Re-compress the Monkey directory as a tar.gz file as is stores file permission access.
chmod +x ~/MonkeyPro73b/Monkey
chmod +x ~/MonkeyPro73b/bin/makedocs_linux
chmod +x ~/MonkeyPro73b/bin/mserver_linux
chmod +x ~/MonkeyPro73b/bin/Ted
chmod +x ~/MonkeyPro73b/bin/transcc_linux

Before you begin the next section make sure your system is up to date.
32bit
If you are not using KDE; the qt libraries will more than likely need to be installed so you can add libqtwebkit4 to the line below.
sudo zypper make gcc-c++ mesa-libgl-devel glu-devel openal-soft-devel ant --no-confirm
64bit
To have the ability to build both 32bit and 64bit. Just modify your project make file in glfw/gcc_linux by adding or removing -m32 in
CPPFLAGS=$(CCOPTS) -m32 \
LDFLAGS= -m32
You have to remove the object files (.o) if you wish to change it from 32bit/64bit before rebuilding. Easily done with a file explorer and find files.

The eagle eyed among you would have noticed that libqtwebkit4 isn't in the command below. I have missed it off for a reason. If you are using GNOME and you have a 64bit version of the IDE you can add it. KDE should have it installed already.
You will also need to add a system link for OpenAL.
sudo ln -s /usr/lib/libopenal.so.1 /usr/lib/libopenal.so

The hardest part for a 64 bit system is getting Ted to work as you have two choices.

1) Install libqtwebkit4-32bit to get the one with Monkey running. But I have found that getting the GUI to look like the rest of the UI is more trouble than its worth. You will see what I mean if you install the stand alone flash player debugger. Which leaves....
2) Install QtCreator and rebuild Ted.
sudo zypper qt-creator libqtwebkit-devel --no-confirm
Make sure that you are using the correct Qt Kit (Qt4) as Qt5 maybe the default. See here on how to add a kit.
Ted project file (Ted.pro) is located in src/ted.
If you want to play around with Qt5; install libqt5qtwebkit5-devel,libqt5webkitwidgets-devel and comment out line 52
QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "UTF-8" ) );
in mainwindow.cpp.

Flash
Version 11.2 of the Flash player plug-in will be the last for Linux. All Adobe are doing now for the Linux version are maintaining security updates.
Download the Flex SDK from here.
Stand alone player can be found in flex_sdk_4.6/runtimes/player/lnx as a compressed archive. Updates can be found here. Note: This is a 32bit application. It should work out of the box. But if not.....
32bit
sudo zypper in libcurl4 mozilla-nss gtk2 --no-confirm
should bo it.

64bit
sudo zypper in libcurl4-32bit mozilla-nss-32bit libxt6-32bit gtk2-32bit --no-confirm
Don't forget to modify the paths (FLEX_PATH and FLASH_PLAYER) in config.linux.txt in Monkey's bin directory to point to where the flex sdk and the stand alone flashplayerdebugger are.
Note:You may have to set the execute permissions. Lazy way chmod -R +x ~/flex_sdk_4.6

Flash Player Web Plug-in
The latest version can be found here.
You will have to do a search on how to install it for you distribution if you down load it from there.
The flash player web browser plug-in for OpenSUSE isn't installed by default. But it should be available in the repositories for down load or you can use the 'one-click' direct install jobs from http://software.opensuse.org/find

JDK
From what I can gather it is not recommended that the openJDK be used for android development. You can get the latest Oracle JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html
So far it looks like there are only a few of ways that you can install the JDK. I haven't fully explored the possible options of installing jdk yet for OpenSUSE. But here's a list of them.
1) Using the RPM package and update-alternatives. Note: Both 32bit and 64bit both point to /usr/java so it would get messy installing both on the same system using this method.
2) Using tar.gz and update-alternative as base on installing for Ubuntu found here.
3) Using JAVA_HOME, etc environment variables.

Using the update-alternatives method by hand can be quiet a task. It's best to write a script to set it up.

Option 1) I came across a tutorial at the OpenSUSE Support Database (http://en.opensuse.org/SDB:Installing_Java) . It shows numerous ways to install the JDK.

Option 2) If you have seen the linked page you get the idea. Unlike Debian and Ubuntu there is no update-java-alternatives on OpenSUSE so the trick here would be to something like what is show it the tutorial in option 1.

Option 3) This is one way where you don't have to have elevated privileges to install the JDK, but it will not be available to other users. You can if you add the variables to /etc/profiles but you will have to research this for yourself.

To set up the JDK for individual users you have to edit a hidden file in your user home directory. Hidden files and directories start with a period (.) and there is a setting in the file explorer menu so you can see these type of files. The file usually goes by the name profile/login or a variation of it depending on the command shell being used.

Open up your .profile and add the lines below to the end of it.
JAVA_HOME="$HOME/jdk1.7.0_45"
JDK_SET="$JAVA_HOME:$JAVA_HOME/bin"
PATH="$JDK_SET:$PATH"
export JAVA_HOME
export PATH
Save the file and log out and when you log in again you should find that java now points to this location in the users directory.

In any of the above, you should edit JDK_PATH in config.linux.txt in the Monkey bin directory to point to a JDK install.

Android
The execute permissions need to be set.
chmod -R +x ~/android-sdk-linux/tools
Then to install the android packages.
~/android-sdk-linux/tools/android
Select the Android 3.2 API and modify the ANDROID_PATH in config.linux.txt in the monkey bin directory with the path of the android sdk.


Soap(Posted 2014) [#10]
These notes have been super helpful. I want to thank you, dawlane!


dawlane(Posted 2014) [#11]
@Soap: I will have to update them for Apache Flex at some point. The Apache Flex installer doesn't play well as it needs Abobe AIR installed. And it a bugger having to update any posts because post links.

Edit: I will soon have a tutorial on how to install the Apache Flex Installer or ubuntu/mint. What a head ache.


Soap(Posted 2014) [#12]
Here is a template for having the arch automatically detected. Was useful for a Steam Linux build.

game_launcher.sh
==
#!/usr/bin/env bash

if [ `uname -m` = x86_64 ]
then
./Game_64 $@
else
./Game_32 $@
fi
==


dawlane(Posted 2014) [#13]
To test whether a system is 32bit or 64bit
ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
if [ $ARCH -eq 64 ]; then
This is the best way to test if you have to do a lot of testing, as it save calling uname all the time.
When writing scripts #!/usr/bin/env does not guarantee portability.
The #! magic, details about the shebang/hash-bang mechanism on various Unix flavours


dawlane(Posted 2014) [#14]
GETTING THE APACHE FLEX SDK INSTALLER UP AND RUNNING: Ubuntu/Mint/Debian
Tested on: 64bit Ubuntu, 32/64bit Linux Mint 16, 64bit Debian 7

The Apache FLEX SDK installer requires that Adobe AIR 2.6 runtime is installed. And as Adobe have stopped development at version 2.6; it requires a bit of work to install. It can also pose a security risk if you leave it installed. YOU HAVE BEEN WARNED.
For a 32bit system, it should be virtually straight forward, but a 64bit system is a more complicated. I've got the information from a number of sources on how to do this with some success.

PLEASE ENSURE THE YOUR SYSTEM IS UP TO DATE BEFORE PROCEEDING

First download the Apache FLEX SDK installer from http://flex.apache.org/installer.html and the Adobe AIR 2.6 runtime from http://helpx.adobe.com/air/kb/archived-air-sdk-version.html

Open a command line terminal and change directory to where the Adobe AIR runtime installer is located.
cd ~/Downloads

Now the execute permissions needs to be set so that the AIR installer can be run.
chmod +x AdobeAIRInstaller.bin

Debian users: As there is no default sudoer on a clean install, you should research how to add a user to sudoer list or where you see sudo, replace with.
su -c 'the_line'
You will have to enter the root password each time; and you may be required to include the full path to the location of the installer etc.

To run the Adobe AIR installer on 32bit systems
sudo ./AdobeAIRInstaller.bin
The installer should run within a minute. If your still waiting after five minutes then something is wrong. This could be down to there being a missing package. If you think it is, then look at the package list for the 64bit installation method.

If the installer runs, but fails with a problem about missing KDE Wallet or gnome-keyring, then a couple of system links need to be made. Before executing the commands check that libgnome-keyring.so.0 etc exist in /usr/lib/i386-linux-gnu/
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0

You can now run the Adobe AIR installer
sudo ./AdobeAIRInstaller.bin

Once the Adobe AIR runtime is installed, you can start the Apache FLEX SDK Installer with (replace x.x.x with the installer version number)
sudo dpkg -i apache-flex-sdk-installer-x.x.x-bin.deb


To run the Adobe AIR installer on 64bit systems
First Adobe AIR is a 32bit only program and require a number of 32bit library dependencies to function.
Debian user need to add the i386 to dpkg so it will fetch i386 packages from the repository.
su -c 'dpkg --add-architecture i386'
su -c 'apt-get update'

These are the i386 libraries required
sudo apt-get install libxt6:i386 libnspr4-0d:i386 libgtk2.0-0:i386 libstdc++6:i386 libnss3-1d:i386 lib32nss-mdns libxml2:i386 libxslt1.1:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386


Depending on the distribution the next command may or may not work and the packge name may differ.
sudo apt-get install libgnome-keyring0:i386
If it doesn't work because of dependency issues; try the following.
Download the deb-package using apt-get to /tmp:
cd /tmp
sudo apt-get download libgnome-keyring0:i386
extract deb-package into gnome-keyring sub-folder (note version in the file name, it may be different):
sudo dpkg-deb -R libgnome-keyring0_3.8.0-2_i386.deb gnome-keyring
install library in the system by copying:
sudo cp gnome-keyring/usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/i386-linux-gnu/
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/i386-linux-gnu/libgnome-keyring.so.0

You can now run the Adobe AIR installer
sudo ./AdobeAIRInstaller.bin
The installer should run within a minute. If your still waiting after five minutes then something is wrong. This could be down to there being a missing package.
If the installer runs, but fails with a problem about missing KDE Wallet or gnome-keyring then a couple of system links need to be made.
Before executing the command check that libgnome-keyring.so.0 etc exist in /usr/lib/i386-linux-gnu/
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0

Once the Adobe AIR runtime is installed, you have to force dpkg to install the Apache FLEX SDK Installer this will cause problems later when it comes to installing any other packages or updating the system. You then have two choices when this happens.
1) Remove the Apache FLEX SDK Installer
sudo apt-get remove org.apache.flex.installapacheflex:i386
2) Use option -f to fix the problem (remove broken packages)
sudo apt-get -f install
To install the Apache FLEX installer use (replace x.x.x with the installer version number)
sudo dpkg -i --force-depends apache-flex-sdk-installer-x.x.x-bin.deb

Both 32/64bit
Before you run the Apache FLEX SDK Installer. You need to create an empty directory so the installer can unpack the actual SDK.
After every thing is set up you can start the installer from the programs launcher/menus or the command line
cd "/opt/Apache Flex/Apache Flex SDK Installer/bin"
./Apache\ Flex\ SDK\ Installer

During installation the Apache SDK Installer will ask you where to install the SDK. Choose the directory that you previously created for it. If at any time you wish to re-install the SDK. Then you have to delete the old directory or it's contents; or create and select a new directory.

After you have installed the Apache FLEX SDK. All you need to do is edit FLEX_SDK in conf.linux.txt to you new Apache FLEX SDK directory.

As mentioned previously. Adobe are no longer developing AIR for Linux and as a result may prove to be a security risk. Unless you do need AIR, you should remove it with
sudo ./AdobeAIRInstaller.bin -uninstall

If you had to make the two links in /usr/lib to get rid of the keyring error. Then you can remove them with
sudo rm -f /usr/lib/libgnome-keyring.so.0
sudo rm -f /usr/lib/libgnome-keyring.so.0.2.0



dawlane(Posted 2014) [#15]
HOW TO INSTALL APACHE FLEX: IF YOU CAN'T BREATHE AIR

The Apache FLEX SDK installer requires that Adobe AIR 2.6 runtime is installed, and as Adobe have stopped development at version 2.6. this in turn makes it very difficult, if not totally impossible to install.
Luckily Apache FLEX can be installed by a different method and set up with a minimum of work. In fact a lot less work that it would be to get Adobe AIR installed.

PLEASE ENSURE THE YOUR SYSTEM IS UP TO DATE BEFORE PROCEEDING

The methods
First go to the Apache FLEX SDK binaries download page. You will find the binary download for Linux here. This should be something like apache-flex-sdk-x.x.x-bin.tar.gz. the x.x.x would be the Apache FLEX SDK version number. After it's downloaded and verified; the archive needs to be extracted and the renamed. You can use the file manager to or use the command line tools.

To extract the files use
tar -xf ~/Downloads/apache-flex-sdk-x.x.x-bin.tar.gz
the x.x.x would be the Apache FLEX SDK version number.

To rename use the mv (move) command.
mv apache-flex-sdk-x.x.x-bin flex_sdk_x.x.x
the x.x.x would be the Apache FLEX SDK version number.

If you haven't already installed ant, then install it with
sudo apt-get install ant
Note: On some distributions it maybe called apache-ant.

The Apache Flex SDK does not come with the FlashPlayer content Projector. You can download this from here
You will need to have installed on your system gtk2 curl and nss (Network Security Services)

There are two methods to install Apache Flex

Method One The easiest.
Change directory into the extracted Apache Flex SDK and run the installer script
cd apache-flex-sdk-x.x.x-bin/
ant -f installer.xml -Dair.sdk.version=2.6 -Dflash.sdk.version=xx.x
the x.x.x would be the Apache FLEX SDK version number and the xx.x in -Dflash.sdk.version=xx.x, is the version of the Flash Player you wish to target. You only have the choice of two versions for flash on Linux 11.1 or 11.2.. During installation you will be asked to agree to a number of licenses.

Method Two
Alternatively, just install the additional dependencies you will need to run thirdparty-downloads in the flex sdk frameworks directory with ant.
cd flex_sdk_x.x.x/frameworks
ant thirdparty-downloads
the x.x.x would be the Apache FLEX SDK version number.

As thirdparty-downloads is executed. You will be prompted if you wish to except the licenses to some of the dependencies before their installation. The only dependency that isn't installed and Monkey requires is playerglobal.swc.

You will still need to download and install the correct playerglobal.swc and as the last version of FLASH that was actively developed for Linux was 11.2, you will need one of the two playergloabl.swc known to work with Linux, which are versions 11.1 and 11.2. You can download later versions from the Flash Player download site, but expect problems.

OK playerglobal.swc needs to go into flex_sdk_x.x.x/frameworks/libs/player/xx.x. Again x.x.x is the SDK version and xx.x is the player version, but the player directory does not exist unless you did the first install method.

In the following; replace [major version] with the major version number of the player e.g 11 and the [minor version] e.g 2
To create them use
mkdir -p ~/flex_sdk_x.x.x/frameworks/libs/player/[major version].[minor version]

The program wget should now be a standard command line tool on Linux and this is what I will use to directly download playerglobal.swc from Adobe server. Execute the following line from the flex_sdk_x.x.x root directory.
wget http://download.macromedia.com/get/flashplayer/updaters/[major vesion]/playerglobal[major version]_[minor version].swc  -O frameworks/libs/player/[major version].[minor version]/playerglobal.swc


The final step that is needed before you make alterations to your Monkey conf.linux.txt, is to edit the flex-config.xml in flex_sdk_x.x.x/frameworks. So open up this file in you favourite text editor and alter these lines.
At line 25
<target-player>11.1</target-player>
change the 11.1 to what ever playerglobal.swc you want to use as the default.

Finally
If you did read the README file that comes with the Apache FLEX SDK binary. You will know that it tells you to set up some environment variables. One is called PLAYERGLOBAL_HOME. This variable in flex-config.xml is resolved with {playerglobalHome} in the flex-config.xml file. All instances of this must be removed and replaced with libs/player; unless you do use the environment variables. You will find that there should only be two of these at lines 64 and 84. After the alterations save it and make the necessary changes to your Monkey config.linux.txt file.

If you wish to use the Apache FLEX SDK for anything other than Monkey, then do use the environment variables. you can add these by editing the hidden file named .profile/.bash_profile in your home directory.


Soap(Posted 2014) [#16]
I'll change the sh file and report on it soon.

Could you write a short tutorial on doing a build against glibc 2.15 or 2.14 for example? I'd rather setup my latest Ubuntu install I already have setup to be able to build against older versions. Some info from a tester:

"I assume the game is written in C++ and that dependency is just coming from the libstdc++ version you used in your linux build environment. I did a quick objdump and the only new c/c++ symbols from your binary are "clock_gettime" from glibc 2.17 (and that function just moved glibc internally from librt to libc hence they bumped it, older versions will behave the same) and "memcpy" from glibc 2.14 (that function didn't really change either). Both of those are from libstdc++ and should therefore go away if you build against a suitable older version. As mentioned above, building on Debian wheezy or Ubuntu lucid 10.04 or another old enough distro should do that without special configuration."


dawlane(Posted 2014) [#17]
USING A CHROOT ENVIRONMENT IN UBUNTU 13.10/LINUX MINT FOR BUILDING AGAINST EARLIER VERSIONS OR OTHER ARCHITECTURES

Read http://en.wikipedia.org/wiki/Chroot first before commencing.
Terms used:
guest = chroot environment
host = operating system running chroot environment
distribution name = The name of the distribution e.g. Ubuntu 12.04 LTS
codename = distributions code name e.g. Ubuntu 12.04 LTS is precise
arch = CPU architecture i386 (32bit) or amd64 (64bit)
http-repo = base of web address of a distribution reposistory
security-repo = base of web address of a distribution security reposistory
user = a normal user name
group = a system group that can access a guest e.g. sambashare


This guide will show you how to set up a minimal guest installation that will allow you to build against older versions of a distribution or different amd64/i386 architectures. As debian, Ubuntu and Linux Mint are closely related. Then installing any as a guest is simple.

NOW A WARNING:
USING THIS GUIDE, OR/AND A CHROOT AT YOUR OWN RISK. I WILL NOT BE HELD RESPONSIBLE FOR ANY DAMAGES IN ANY FORM WHAT SO EVER.

NEVER ATTEMPT to install any drivers, grub tools while in a chroot environment as IT WILL AFFECT the host and may make the SYSTEM UNRECOVERABLE.

BEFORE DELETING any chroot directory, make sure that it has EXITED CLEANLY and all file systems that have been mounted to the chroot are unmounted or you could WIPE YOUR HOME DIRECTORY OR HARD DRIVES. A sign that the chroot hasn't exited cleanly is that you will get errors when exiting a guest. You can check to see by opening a file browser and navigating to /var/lib/schroot/session and /var/lib/schroot/mount. If there is anything in these, then it's still mounted and a reboot is required.

USING Proprietary drivers on your host will cause problems with applications that use the native OpenGL glx libraries that need to be installed. If you are using the open-source drivers in your host, then you can run glx applications. Tools such as xnset may not work correctly.

CREATING USERS within a guest can make them persistant in your host.

IF YOU DON'T WANT THE RISK, THEN USE A VIRTUAL MACHINE LIKE VIRTUALBOX


THE GUIDE
NOTE: As this is to cover Dedian and Ubuntu, where you see a term in chevrons listed above, you should replace it with what it represents.
Known replacemnts are listed.


STEP ONE: INSTALL PACKAGES
The packages below to allow you to install a guest as well as control which guest you can use.
sudo apt-get install debootstrap && sudo apt-get install schroot
You should read the man pages for debootstrap and schroot.
Ubuntu 13.10
http://manpages.ubuntu.com/manpages/saucy/en/man8/debootstrap.8.html
http://manpages.ubuntu.com/manpages/saucy/man5/schroot.conf.5.html

As a super user (aka root). Open the file /etc/defaults/schroot and change the last line from
START_ACTION="recover"
to
START_ACTION="end"
It tells you the reason why in the file.

STEP TWO: CREATE AND POPULATE
The next task is to create a directory for the guest and to populate it with the distribution you are interested in.
<http-repo>
http://http.debian.net/debian/ for Debian
http://archive.ubuntu.com/ubuntu/ for Ubuntu
<codename>
wheezy for Debian 7
precise for Ubuntu 12.04 LTS
<arch>
Either i386 or amd64
sudo mkdir -p /srv/chroot/<codename>_<arch>
sudo debootstrap --variant=buildd --arch=<arch> <codename> /srv/chroot/<codename>_<arch> <http-repo>
The --variant=buildd will install build-essentials.

STEP THREE: CONFIGURE GUEST
You need to open a text editor as a super user (aka root) copy the code below and edit it. After editing it; it needs to be saved into the directory /etc/schroot/chroot.d/. The file should be given the real name that you see in the square bracets after editing the code below.
NOTE: If you are using a 64bit host and wish to use a 64bit guest. Then you can change the property personality to linux. The same should be true for a 32bit host and a 32bit guest.
[<codename>_<arch>]
description=<distribution name> <codename> for <arch>
directory=/srv/chroot/<codename>_<arch>
personality=linux32
root-users=root
type=directory
profile=desktop
users=<user>,<user>,<user>
groups=sbuild,<group>,<group>
aliases=<distribution name>-<arch>
preserve-environment=true

Notice in the code above the property profile. This is how you link a guest to various configuration directories within the schroot folder, like desktop below.
Make a backup of the desktop directory in /etc/schroot
sudo cp -r /etc/schroot/desktop /etc/schroot/desktop-bak
Within the directory desktop there is a file called fstab. This is where you control what bits of the host file system get mounted to the guest. If you open this you will see that it will automatically mount the /home directory.
Open the copyfiles and make sure that /etc/resolv.conf is in the list. This is where you control what bits of the host file system get copied to the guest.

Now in the directory where the guest resides /srv/chroot/<codename>_<arch> you will need to add the repositories that the guest will use. So open as super user (aka root), the file sources.list in /srv/chroot/<codename>_<arch>/etc/apt/sources.list.

For debian you need to add
deb http://security.debian.org/ <codename>/updates main
For Ubuntu
deb http://security.ubuntu.com/ubuntu <codename>-security main
There are additional components that can be added to these lines such as Restricted, Universe and Multiverse.

STEP FOUR: TEST AND START
To list available guests use
schroot -l
Note it will also list the alias names as well.

The first step is to start the guest as a super use (aka root). Note: you can replace <codename>_<arch> with it's alias.
schroot -c <codename>_<arch> -u root

You will be asked for the super user (aka root) password.
Once in the guest. Your command prompt should look something like this
(precise_i386)root@Mint-16-64:~#
You should run apt now to update the database.
apt-get update && apt-get upgrade

Debian and Ubuntu differ on the basic installation.
Ubuntu
apt-get install language-pack-<your language>
Replace <your language> with your language e.g language-pack-en. The language should be automatiaclly selected.
Debian
apt-get install locales
dpkg-reconfigure locales
Running dpkg-reconfigure locales will give you a text-based output, use enter to go through each page and when you see your language make a note of the number. When the last page is done, it will ask for the language number and then ask if you wish to make it the default.

STEP FIVE: INSTALL MONKEY-X DEPENDENCIES
32bit guest
apt-get install libglu1-mesa-dev libopenal-dev
To use the IDE from the guest add
libqtwebkit4

Debian 64bit guest Only
dpkg --add-architecture i386 && apt-get update

64bit guest
apt-get install libglu1-mesa-dev libopenal-dev lib32stdc++6
If you want to use the IDE from the guest add
libglu1-mesa:i386 libxpm4:i386 libxtst6:i386 libxrender1:i386 libxi6:i386 libqtwebkit4:i386


STEP SIX: EXITING A GUEST
To exit a guest type
exit

If you should get an error such as
E: 10mount: umount: /var/lib/schroot/mount/precise_i386-0f43f98d-4b95-4358-b653-eb5de5c4e5ad/dev: device is busy.
E: 10mount:         (In some cases useful info about processes that use
E: 10mount:          the device is found by lsof(8) or fuser(1))
E: precise_i386-0f43f98d-4b95-4358-b653-eb5de5c4e5ad: Chroot setup failed: stage=setup-stop
You will need to reboot the host to clean the locked directory. On restart, manually check in /var/lib/schroot/mount (and the sub directories) and /var/lib/schroot/sessions to see if it has cleared. If you see any thing that looks like a Linux structured file system, or a file in /var/lib/schroot/sessions then it didn't work. Removal of the files in /var/lib/schroot/sessions and a reboot should clean locked mounts. If you edited /etc/default/schroot at the beginning, then the guest session will have not restarted after the reboot.

STEP SEVEN: USING A GUEST
Once you have set up the guest to your liking. Then you can start the Monkey-X-IDE via the command line while in the guest, thats if you included the extra packages.
First start the guest by opening up a terminal and typing
schroot -c <codename>_<arch> -u <user>
Note: You will only be asked for a password if you are not logged in as that user.
Start the Monkey-X-IDE
Using your hosts file manager, navigate to where the projects desktop build directory is and rename it or delete it if you have finished with it.
Rebuild your project with the Monkey-X-IDE as the guest or use trancc_linux. After you have finished, close the Monkey-X-IDE. And then close the guest session by typing
exit
You can then safely close the terminal.
Closing a terminal while a guest session is still active may leave the session orphaned and the file systems still mounted. If so try
schroot -e --all-sessions
If it fails then it means a restart in many cases.


Soap(Posted 2014) [#18]
Going to try this soon. You are a hero, dawlane!


Soap(Posted 2014) [#19]
An "apt-get update" step needs to be added after "dpkg --add-architecture i386" for the Debian step

Testing Debian for making builds now


dawlane(Posted 2014) [#20]
Not like me to miss something off
changed it to su -c 'dpkg --add-architecture i386 && apt-get update'

If all goes well, in about a month there will be a GUI installer that will be flexible enough to handle quite a few distributions. Once I have it completed. I will be looking at Windows (though any thing Windows 8 and OSX. Only down side that the only way to do it is to use Qt.
I will not be releasing any thing until I am happy that it will not screw up any ones system.


dawlane(Posted 2014) [#21]
HOW TO: Manjaro (ArchLinux) both 32bit and 64bit
From Monkey version 67c+.
Manjaro is a fork of ArchLinux. The one chosen for this 'HOW TO' is the KDE desktop version.

First thing.
Monkey Execute Permissions
MonkeyPro73b as an example. How to add launchers, and command line can be found here.
Tip: To save having to do this every time. Re-compress the Monkey directory as a tar.gz file as is stores file permission access.
chmod +x ~/MonkeyPro73b/Monkey
chmod +x ~/MonkeyPro73b/bin/makedocs_linux
chmod +x ~/MonkeyPro73b/bin/mserver_linux
chmod +x ~/MonkeyPro73b/bin/Ted
chmod +x ~/MonkeyPro73b/bin/transcc_linux

Before you begin the next section make sure your system is up to date.
32bit
If you are using KDE then most of the qt libraries will more than likely be installed so you can remove qtwebkit from the line below. You may also require to include the gtk2 package.
sudo pacman -S make gcc qtwebkit openal mesa apache-ant
64bit
To have the ability to build both 32bit and 64bit. Just modify your project make file in glfw/gcc_linux by adding or removing -m32 in
CPPFLAGS=$(CCOPTS) -m32 \
LDFLAGS= -m32
You have to remove the object files (.o) if you wish to change it from 32bit/64bit before rebuilding. Easily done with a file explorer and find files.

The eagle eyed among you would have noticed that qtwebkit isn't in the command below. I have missed it off for a reason. See the bit about Ted and 64bit ditributions below.
sudo pacman -S gcc-multilib lib32-libxxf86vm lib32-mesa mesa openal lib32-openal apache-ant
There is one library that is required that you will find is not in the repositories. That library is lib32-libxpm4. You will instead find it in the ArchLinux User Repository (aka AUR). You can down load the tarball archive from https://aur.archlinux.org/packages/lib32-libxpm/ . Follow the instructions at https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages on how to install it.
You may also need to create a link to libGL.so.1 if you get any errors saying that it cannont find this library. Use the commands below to fix this
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/libGL.so.1
sudo ln -s /usr/lib32/mesa/libEGL.so.1 /usr/lib32/libEGL.so.1
The last command line above is required if you choose to install the standalone Flash Player Projector. It's needed to install lib32-gtk2.

The hardest part for a 64 bit system is getting Ted to work as you have two choices.

1) Install qtwebkit to get the one with Monkey running. But I have found that getting the GUI to look like the rest of the UI is more trouble than its worth. You will see what I mean if you install the stand alone flash player content debugger. Which leaves....
2) Install QtCreator and rebuild Ted.
sudo pacman -S qtcreator qtwebkit
Make sure that you are using the correct Qt Kit (Qt4) as Qt5 maybe the default. See here on how to add a kit.
Ted project file (Ted.pro) is located in src/ted.
If you want to play around with Qt5 install qt5-qtwebkit and comment out line 52
QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "UTF-8" ) );
in mainwindow.cpp.

Flash
Version 11.2 of the Flash player plug-in will be the last for Linux. All Adobe are doing now for the Linux version are maintaining security updates.
I recommend that you now use the Apache Flex SDK for building Flash Player applications. You should read the tutorial 'HOW TO INSTALL APACHE FLEX: IF YOU CANT BREATH AIR' for installing. You will require a Java Development Kit (JDK) and apache-ant to build Flash applications, as well as for installing the Apache Flex SDK.

For testing and running you can use either the standalone FlashPlayer Projector from https://www.adobe.com/support/flashplayer/downloads.html. Or install the Flash plug-in from the repository with
sudo pacman -S flashplugin
NOTE: For this plug-in to work you may need to enable it within the web browser.

Flash Player Projector
32bit
The FlashPlayer Projector should work out of the box. But if not then
sudo pacman -S gtk2 curl nss
should be what needs to be installed.
64bit
As the FlashPlayer Projector is a 32bit application then you will need.
sudo pacman -S lib32-gtk2 lib32-nss lib32-curl
Don't forget to modify the paths (FLEX_PATH and FLASH_PLAYER) in config.linux.txt in Monkey's bin directory to point to where the flex sdk and the stand alone FlashPlayer Projector are.

JDK
PLEASE NOTE: Installing a 32bit version of the JDK on a 64bit distribution may cause problems with some with java applications not working correctly.
From what I can gather it is not recommended that the openJDK be used for android development. You can get the latest Oracle JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html
There are a number of packages for Oracles JDK's that can be found in the ArchLinux User Repository (AUR). You will find the latest at https://aur.archlinux.org/packages/jdk/. But you should explore some of the other JDK packages, as some will remove the openjdk/jre implementation which may break other packages or just install the version for your distributions architecture.
To install these packages you should follow the instructions at https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages
You usually find the path for these installations in /opt or /usr/lib/jvm

The next method requires no elevated privileges, but sets up the JDK for a single user.
To set up the JDK for individual users you have to edit a hidden file in your user home directory. Hidden files and directories start with a period (.) and there is a setting in the file explorer menu so you can see these type of files. The file usually goes by the name profile/login or a variation of it depending on the command shell being used.

Open up your .bash_profile and add the lines below to the end of it.
JAVA_HOME="$HOME/jdk1.7.0_45"
JDK_SET="$JAVA_HOME:$JAVA_HOME/bin"
PATH="$JDK_SET:$PATH"
export JAVA_HOME
export PATH
Save the file and log out and when you log in again you should find that java now points to this location in the users directory.

In any of the above, you should edit JDK_PATH in config.linux.txt in the Monkey bin directory to point to a JDK install.
You will need to log out or reboot for any change in this file to take effect.

Android
Download the SDK Tools Only package for Linux from https://developer.android.com/sdk/index.html
After extracting the archive run the commands below. Note that you will need Oracles JDK and Apache ANT to build applications for Android devices.
The execute permissions need to be set.
chmod -R +x ~/android-sdk-linux/tools
Then to install the android packages.
~/android-sdk-linux/tools/android
Select the Android 3.2 API and modify the ANDROID_PATH in config.linux.txt in the monkey bin directory with the path of the android sdk.


Luis(Posted 2014) [#22]
64bits

Manjaro + xfce


Luis(Posted 2014) [#23]
RUN!!!!!!!!!!!!!!!!!!!!!!!! IN MANJAROxfce 64 bits YEAH :D


dawlane(Posted 2014) [#24]
What does not appear? The editor or a game. Open a command line terminal, change to the Monkey directory and Monkey from the command line or run Ted out of the Monket bin directory. If it shows error post them here. If the editor will not run. Then it has to be rebuilt with QtCreator. You will have to add Qt4 to the system and tell QtCreator to use that instead of Qt5 that is the default. If the editor starts, then post the errors from the editor.


Luis(Posted 2014) [#25]
Thanks, it works: D


Sensei(Posted 2014) [#26]
Excellent thanks! Looking forward to trying this out soon!


Soap(Posted 2015) [#27]
Making new Linux builds, and on Linux only I am getting a lot of

Identifier "..." not found

Errors when trying to compile.... any ideas? Same project compiles fine on Windows. Both 82b

Edit: I forgot last time I got this working it was on Debian not Ubuntu going to try Debian again...


dawlane(Posted 2015) [#28]
Did you try deleting the build directory first? I think I remember coming across this issue and I cannot remember if it was because of Windows object files or all the if libraries where not installed correctly.

I don't know if 82b has the the updated make files for GFLW2 for the problem of multiple builds with gcc, as I haven't checked. You will find the ones I knock up here


Soap(Posted 2015) [#29]
There was no build folder when I tried. It appears to be related to linux filesystem differences in loading files? Moving classes around seems to make it work...

Can you recommend the "best" Linux version for making Monkey game builds? Latest Ubuntu has a problem with glibc being too new last I remember, and Debian was working for me before but just installing it again has been a headache. Last time I did it I installed it to virtualbox inside of a Ubuntu host for testing, but decided to install it more directly and because of driver problems galore it would not work right away. Now I have it working more and it seems to have a different version of glibc or something installed...

Debian 7.8

glibc Version: 2.13-38+deb7u6

When I try to run old builds for testing I get

: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by
: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by

Still trying things...

I tried http://axiacore.com/blog/atom-editor-debian/

And after rebooting old builds work!

Only problem I assume now is that I assume if I build now (with glibc Version: 2.19-13) it will not be able to work on computers with older versions installed? If so super lame. I think Version 2.14 is the most common and safest version to target right now for people who don't want to or simply cannot update their version?


dawlane(Posted 2015) [#30]
There is no such thing as the "best Linux version". It's more of personal tastes and the hardware you have that will determine what you will install. Everyone says use Ubuntu, but in my opinion that distribution has been going down hill ever since they started hiding a lot of the fun toys for system set up and maintenance, as well as the stupid Unity interface. But if you want the best Linux distribution for maximum Linux compatibility, then that would be Debian. The problem with Debian is that all the non-free goodies have been removed and it uses the crappy GNOME 3 UI. So it requires more work to get it how you would like it.

The distributions that you should stay away from are the rolling releases; this also includes Debian testing and it's derivatives, meaning the non LTS versions. These should be considered cutting edge and are the least compatible with other Linux distributions. The other distributions you should stay away from are those that are not based of the Debian source branch for the same reason.

My distribution of choice is Linux Mint 17 with the cinnamon UI. When I need to do a final build, I use a chroot environment for the targeted system e.g. Debian. This method does have it's problems if you try to run GUI applications from within the chroot, but it's only purpose is just to build an applications and not to run them. If you need to test on a particular target then use real hardware running that OS.

One thing to note. The desktop versions of Linux that I have tested for some reason, now have the firewall turned off. Install something like firewalld and the GUI support applet as it gives you more advanced features than the the default fire wall.

Upgrading libc to the one in the debian testing branch is the only way that any Debian user can get Steam to work on their distribution. Not something that I would recommend if your target audience is every Linux distribution.

Current releases and the end of support for Ubuntu and Linux Mint.
https://wiki.ubuntu.com/Releases
http://www.linuxmint.com/oldreleases.php


Soap(Posted 2015) [#31]
I'll stick with Debian as right now I am only using it for builds. It does seem the most ideally suited to the situation of making builds. Also it seems that I should try to build with GLIBC_2.13 to increase compatibility, but it is a pain. My audience is Steam audience but also general audience and more than one Linux user has asked about previous GLIBC_2.17 requirement making their system unable to run it, and them being unable to update without breaking their system.

Any idea on how to easily undo "apt-get install -t testing libc6" ?

I wish it was easier to have multiple versions installed...

Also wondering about any license stuff with doing standard Linux builds through Ted. Should I be including any of the various license text files with distributions?

https://forum.greenheartgames.com/t/to-our-linux-players-game-dev-tycoon-for-linux-and-glibc/7562/14


dawlane(Posted 2015) [#32]
Reversing libc back can be tricky as a hell of a lot of things get upgraded, but check out http://crunchbang.org/forums/viewtopic.php?id=37215
The FIRST thing you should do is back up everything that you wish to keep, because if things go wrong then it's a reinstall.
It should be a case of removing any deb entry in the sources.list that points to the testing branch, running apt-get update and running sudo apt-get -d --reinstall install libc:i386
Note: :i386 is if you have installed the 32bit libraries on a 64bit distribution.
And then run sudo apt-get install -f to fix any broken packages.


dawlane(Posted 2015) [#33]
I couldn't give you answer in the previous post yesterday about licensing as I had to sort out a few important personal matters. But as Ted is an IDE and uses Trans to convert MonkeyX source to a form that a native compiler can use for compilation. And as the native compiler links to a number of libraries that are under one of the versions of GNU LGPL license, which requires you to include a copy of that library's license, then you must still include that license for a commercial application. I think that the same rings true if you released your application under a GNU license, but I don't think I have seen any that have done this or to be more honest, I didn't pay any attention.
If your application or any library you used was using code in part or whole of one of the GNU GPL license versions, then that's just asking for trouble if you try to keep it closed source or sell it.

If you are in doubt about licenses, then I would highly recommend that you seek the advice of a legal professional that deals with licensing issues instead of asking around on programming forums. Any information that you read should be treated as suspect. If you follow the advice on license issues given on a forum and you get sued, then you have no one to blame but yourself. Where as if a legal professional gets things wrong, then at least you should have some form of fallback.


Soap(Posted 2015) [#34]
Problem is that with Monkey I'm not even sure of the list of possible things! I'll try to investigate.


dawlane(Posted 2015) [#35]
Well I would think that the GLFW license would cover you for anything mojo uses, but check that it doesn't require you to include any other license. Mark should have put copies of any licenses with it and the GLFW authors should state that fact if addition licenses are used. You would need to include the OpenAl-Soft license ( should be installed on your system in the system docs directory. If not it will be in the source bz2 archive from the download site ), the license for glibc and maybe the license for libstdc++ (https://gcc.gnu.org/onlinedocs/libstdc++/faq.html). I should point out that the latter is under the GPL with exceptions for non GPL applications and libraries, but the documentation doesn't state which clause it falls under. See section 2.1 and the version of the license that the version of libstdc++ uses.


QuietBloke(Posted 2015) [#36]
I've scanned this thread up and down and tried more things than I care ro recall but I just cant get Ted to run anymore.
I am running on a Chromebook with crouton.
I did have MonkeyXPro77f working just fine ( after spending days faffing about ) and I stupidly decided I would upgrade to the latest 82b.
I'm now broken. running Ted says
Ted: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory

It is installed.. i even tried removing it and re-installing.

grrrrrrr

I've spent a day retracing this thread again and reinstalling everything and checking/rechecking everything. I cant find the issue and pretty much giving up.

Any idea's ?


Derron(Posted 2015) [#37]
$ locate libQtWebKit
/usr/lib/i386-linux-gnu/libQtWebKit.so.4
/usr/lib/i386-linux-gnu/libQtWebKit.so.4.10
/usr/lib/i386-linux-gnu/libQtWebKit.so.4.10.2
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4.10
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4.10.2


and this .so.4 is a link to another existing file:
$ ls -l /usr/lib/i386-linux-gnu/libQtWebKit.so.4
lrwxrwxrwx 1 root root 21 Apr  9  2014 /usr/lib/i386-linux-gnu/libQtWebKit.so.4 -> libQtWebKit.so.4.10.2


What does your system say?

I assume you do not have the needed libraries installed.

bye
Ron


QuietBloke(Posted 2015) [#38]
that was quick... thanks !
ermmm.. that locate returns nothing
the link returns the same as you have got.

btw... I reverted my my .profile to point to the older MonkeyXPro77f and it seems to be working.

Additional :
if I run sudo apt-get install libqtwebkit4
or sudo apt-get install libqtwebkit4:i386

it says libqtwebkit4 is already the newest version


dawlane(Posted 2015) [#39]
I'm not at my computer at the moment, but check what the ELF of Ted that comes in v82b is. I'm sure that Mark changed the binary from 32bit to 64bit around v81a. Use the command readelf with option -h on Ted to check.
Edit: I would also be looking to see it it is an issue with the chroot that crouton uses.


QuietBloke(Posted 2015) [#40]
Hi again,

lol... never used locate before and now readelf ! lol Im such a noob

so I ran it for both old and new Ted's and from what I can determine it sounds like your right... ( guessing )
they both need libQtWebKit as well as others but the tags are 16 digits numbers instead of 8 digits.

I don't suppose there is an easy way to get the new one working ?
or am I safer just carrying on using the older one. ( bearing in mind I'm no linux expert )


dawlane(Posted 2015) [#41]
Is there an easy way. Yes there is if you have the hard drive space. Just install the Qt4 development kits and rebuild Ted for your system.

Edit: Mark did mention that he was considering removing the Linux binaries from Monkey and just using a script to build it from source.


QuietBloke(Posted 2015) [#42]
you make it sound so simple.

I think I'll leave it be for the moment.
Its a chromebook and space is a premium... not sure I have the space to install everything needed to compile it myself.
Maybe if I find the money to upgrade my SSD drive I'll have a go.

Thanks for all your help. much appreciated


dawlane(Posted 2015) [#43]
OK. I haven't been paying much attention as of late to Monkey on Linux and my posts on this topic are a little out of date with the inclusion of the GLFW3 and the compiler now being hard coded to execute ANT_PATH/bin/ant (think this was a fix for OS X Yosemite) in 81 and 82, which means that the ANT package from the repositories is pretty much useless and you now have to manually install Apache ANT (not too hard if you know what you are doing, but will cause a few issues at some point) or edit the transcc android.monkey source file to fix it. If you don't fix it, you have to edit the configure.linux.txt file to append ANT_PATH to let transcc. It should also affect the tool chain for creating flash application, but I haven't got that far yet with testing.
Instead of me going through every post to update the information. I shall be cleaning and merging every thing into one or more PDF documents a long with filling a few things that were hard to include to the posts.

Edit: Just had a look in the monkey GitHub repository and it looks like the ANT hard coding may have been resolved. From what I can tell it now check to see if ANT_PATH is set before using a hard coded path. So all should work as it should when the 83 experimental version is OKed.


dawlane(Posted 2015) [#44]
OK first draft of the MonkeyX-Linux installation guide in pdf format. Opinions please and any help on how the NDK with Monkey is suppose to work.
Things to do cover the compilation of tools with BlitzMax add other Linux distributions.

Note: If this link is broken then try the link on the first page. That will always be updated.


Soap(Posted 2015) [#45]
Thank you again for your guides. I reference them often.


dawlane(Posted 2015) [#46]
OK updated the pdf file to cover MonkeyX 83c/84e and included installation for Magiea 5 and Fedora 22.


wiebow(Posted 2016) [#47]
Hi Dawlane... I cannot download this PDF anymore. Is it somewhere else available?


dawlane(Posted 2016) [#48]
@wiebow: Have you tried the link in the very first page ;-)
That will always point to the current version.


wiebow(Posted 2016) [#49]
AAHHH!! :) Thanks


dawlane(Posted 2016) [#50]
Now include notes on setting for setting up Monkey2 with emscripten. See first page for link.