Simple guide for Linux dependecies. Monkey X1/X2.
Monkey Archive Forums/Monkey Tutorials/Simple guide for Linux dependecies. Monkey X1/X2.
| ||
Hi, This is a simple guide to install the dependencies for Monkey (also Monkey setup) on Linux Mint 17.2 (64bit) and should work on Ubuntu 14.04 (64Bit). Monkey X2 is in flux so I will update it's requirements as needed. First you need to download the latest version of Monkey X1, Then using your file manager you will need to change certain file permissions (usually right click on a file) to executable. Monkey comes in a 'zip' file so you will have to manually change the permissions to executable for these files. . 'In the 'root' Monkey folder Ted 'In the 'bin' folder. makedocs_linux , mserver_linux , Ted , transcc_linux . For Monkey X2 you will need to change the file permission to executable for the following. 'in the 'bin' folder. mx2cc_linux . . Dependencies for Linux Mint 17.2 / Ubuntu 14.04 (64bit) ============================================= To get Monkey X1 setup install the following in console. sudo apt-get install " " g++ xorg-dev qtcreator libopenal-dev libgl1-mesa-dev ' Next for Monkey X2 you will need to do the following. ------------------------------------------------------------------- . Install SDL2 --------------- sudo apt-get install libsdl2-dev . Install and compile Emscripten. ---------------------------------------- You will need to download the "Portable Emscripten SDK for Linux and OS X" located here. https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#linux-and-mac-os-x Once you have that downloaded put/expand it into your 'home' directory (or one of your choice). . You will need to install these dependencies next. sudo apt-get install " " build-essential cmake nodejs default-jre git-core . Next you will need to run the command line tool emsdk which is in the emsdk_portable directory. From your file manager open up the emsdk_portable folder and right-click and open up a console from that location. Then type the following into the console window. . ./emsdk update This will download a list of available resources. . ./emsdk install latest This will start the compile process for the Emscripten SDK. It will first get a few dependencies and then start what can be a very long compile (hours in some cases). ./emsdk install --build=MinSizeRel latest You can alternately use this to avoid debug info included into files. Makes smaller executable files. . ./emsdk activate latest This will finalize and activate the SDK. ./emsdk activate --build=MinSizeRel latest You can alternately use this to avoid debug info included into files. Makes smaller executable files. ' . The last step involves modifying two files. They are both located in your 'home' directory (in some cases this could also be home/your-user-name). ---- Using your file manager set to view 'hidden files' open the file called '.profile' in a text editor. You will need to add the following to it. This is an example and you will need to modify it with your paths and you will also need to modify the file names so that they match the version numbers of your version of Emscripten (so 'tag-1.34.4' might become say 'tag-1.34.6' ). EMSCRIPTEN_PATH="$HOME/Programming/emsdk_portable:$HOME/Programming/emsdk_portable/emscripten/tag-1.34.4/bin:$HOME/Programming/emsdk_portable/clang/tag-e1.34.4/build_tag-e1.34.4_64/bin:$HOME/Programming/emsdk_portable/emscripten/tag-1.34.4:$PATH" export EMSCRIPTEN="$HOME/Programming/emsdk_portable/emscripten/tag-1.34.4" PATH="$EMSCRIPTEN_PATH:$PATH" Lastly you will need to modify a file called '.emscripten' located in your home directory. You will need to change the following. NODE_JS = 'node' ' and change it to ' NODE_JS = 'nodejs' . Installing dependencies for Android target Mint 17.2 and Ubuntu 14.04. ======================================================== To get Android working with Monkey X1 (Monkey X2 not available yet) as a target do the following. Install ANT --------------- You will need to install ANT by typing the following in your console. sudo apt-get install ant . Install Java JDK. --------------------- Download the latest version of JDK 8 here. Then expand the file in your home directory. You will need to to edit the 'config.linux.txt' file in your Monkey 'bin' directory and alter the path/name for JDK to point to your JDK's install path and directory name. . Android SDK ---------------- Next download and extract the Linux Android SDK http://developer.android.com/sdk/index.html#download Once you have done that you will need to open the 'tools' folder (will probably be in a folder called 'android_sdk_linux') in your file manager and change the permissions for the following files to be executable. emulator , emulator-arm , emulator-mips , emulator-ranchu-arm64 , emulator-ranchu-mips64 , emulator-x86 , emulator64-arm , emulator64-mips , emulator64-ranchu-arm64 , emulator64-ranchu-mips64 , emulator64-x86 . Lastly you will need to run the script file 'android' in the 'tool' folder. You may need to also set it's permission to executable. Once run it will open the Android SDK Manager. You will also have to modify your Monkey 'config.linux' file (located in the 'bin' folder within your monkey folder) and modify the path for the Android SDK. . Conclusion. ========= This is just a rough guide of what I did to get things going and there are 'thinner' ways of doing this and you can read about them here or here. This method is simple and easy for beginners I would think. Big thanks to dawlane for getting me through this. :D |
| ||
@Richard Betson: Never, ever use the OpenJRE/JDK. Especially an old version. The reasons. 1) They are not kept up to date on the repositories and pose a security risk. 2) They are not 100% compatible with Oracle's implementation. The first reason above applies to using the PPA repositories. Unfortunately some packages will install the OpenJDK, but it should not interfere with a correctly installed OracleJDK and if it does, then luckily the Debian/Ubuntu family have a nice simple update-alternatives command to switch between correctly installed versions. change the permissions for the following files to be executable. If you have download the android-sdk_r24.3.4-linux.tgz file in then SDK Tools Only section, then you shouldn't need to set any permissions. I don't know why the Android Studio IDE for Linux is distributed as a zip file. Zip files do not store and permission data.Edit: There will soon be a new Install guide. It will not cover emscripten until MX2 is finally released. MX2 may even need to be a separate guide altogether. |
| ||
Hi, From what I have read I just don't see a problem with using openjdk-7-jdk. It is also maintained by Ubuntu and by extension Oracle. It is also current. http://packages.ubuntu.com/trusty/openjdk-7-jdk http://openjdk.java.net/ As far as an older version (JDK 7) I'm not sure that the Android SDK supports JDK 8. |
| ||
From what I have read I just don't see a problem with using openjdk-7-jdk. It is also maintained by Ubuntu and by extension Oracle. If you actually look on the requirements for Android on Linux. It states "Oracle® Java Development Kit (JDK) 7". I have seen a number of forum topics where people have had problems with using the OpenJDK with the Android SDK on Linux. But now public updates for Oracle JDK 7 have now ended and so far the Android SDK seems to work OK with Oracles JDK 8. Note: You should never mix one version of the JRE with another JDK on Linux as it can cause problems. I know this from experience when I started to get strange errors. It's why I always use the JRE that comes with the JDK. You don't have to do this, but the system path and update-alternatives needs to be set in such a way that a conflict cannot occur. Performance wise there isn't much difference between the OpenJDK and Oracles JDK. It was different in the early days with version 6. Oracle (or more precise Sun before they were bought out by Oracle) have done what many Linux operating system vendors have done and open sourced their core code, and Oracle are one of the main contributors to the OpenJDK Project (see the FAQ even though some of the links need updating). Oracle use the OpenJDK code (just Like Red Hat with Fedora) as a starting point and add a number of tools and closed source components. Other users of this open source version can do the same and must follow the SE implementation reference. But as always, any improvement or fixes have to go back into the cooking pot. It is also current. It's current for the repository and that Linux release. It does not necessarily mean that it's up to date. The repository for trusty shows OpenJDK 7u79. The last public release from Oracle is 7u80 and there are references to 7u85 but no download as you have to get this from Oracle Support (not free). You may get security fixes back ported from a package from newer Linux release. If you want to use OpenJDK 8, then you have to nag the JDK team to back port it from Ubuntu 15.04, which currently uses JDK 8u45. Oracles stands at 8u60. |
| ||
Hi, I have modified the guide (top/first post) to allow for installing JDK 8 (from Oracle) and ANT (instead of OpenJDK). I have tested it here and Android seems to build fine with JDK 8. If you have installed OpenJDK remove it through the 'Synaptic Package Manager' first before applying these changes. Changes: Removed OpenJDK7.. added the following Install ANT --------------- You will need to install ANT by typing the following in your console. sudo apt-get install ant . Install Java JDK. --------------------- Download the latest version of JDK 8 here. Then expand the file in your home directory. You will need to to edit the 'config.linux.txt' file in your Monkey 'bin' directory and alter the path/name for JDK to point to your JDK's install path and directory name. |
| ||
Hi, I have installed Linux Mint "Rosa" 17.3 (uses 3.19.x kernel as opposed to 17.2's use of 3.16.x) on a second hard drive and so far the above guide is working for Monkey-X1. I have 'not' installed the Android portion yet but I suspect it will probably workout OK. I will be installing the Android dependencies for Monkey-X1 and giving Mark's Monkey-X2 Xmas demo (or the version that ran Emscripten) a test as soon as I install the dependencies for it. Once I verify all is well I will add Linux Mint 17.3 to the above guide as a target. On my hardware Mint 17.3 seems a little speedier and is running great. :) |