https://github.com/Rakashazi/emu-ex-plus-alpha
-
Java
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer
-
Others
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
Maybe
sudo apt-get install liblzma
-
Compilers
sudo apt-get install cmake gcc g++ sudo apt-get install build-essential sudo apt-get install ant pkg-config autoconf autogen sudo apt-get install build-essential libtool sudo apt-get install texinfo lldb
Maybe
sudo apt-get install clang sudo apt-get install xzdec
-
Download and unpack NDK from https://developer.android.com/ndk/downloads/index.html
Put it in the home folder and rename it as android-ndk -
Download and unpack the project from https://github.com/Rakashazi/emu-ex-plus-alpha/archive/master.zip
Put it in the home folder -
Download and install android studio from https://developer.android.com/studio/index.html
Put it in the /opt folder and launch/android-studio/bin/studio.sh
-
Download By SDK Manager:
- SDK Platforms:
- Android 7.1.1 SDK 25 (Optional)
- Android 7.0.0 SDK 24* (Important)
- Android 4.0.3 SDK 15 (Optional)
- Android 2.3.3 SDK 10* (Important)
- Android 2.3 SDK 9 (Optional)
- SDK Tools:
- CMake (Optional)
- LLDB (Optional)
- NDK (Optional)
- Android Support Repository (Important)
- SDK Platforms:
-
Get PKG_CONFIG_PATH by:
pkg-config --variable pc_path pkg-config
-
Get IMAGINE_PATH by:
cd ~/emu-ex-plus-alpha-master/ pwd
-
Get ANDROID_HOME where there is sdk,
~/Android/Sdk
-
Put them in the
~/.profile
like below -
Logout and login to make effective the changes because
source ~/.profile
affect current shell only~/.profile could be change, so check the current file if you are in different environment
Example my
~/.profile
# set PATH so it includes user's private bin directories PATH="$HOME/bin:$HOME/.local/bin:$PATH:$IMAGINE_PATH:$PKG_CONFIG_PATH:ANDROID_HOME" export IMAGINE_PATH="$HOME/emu-ex-plus-alpha-master/imagine" export PKG_CONFIG_PATH="/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig" export ANDROID_HOME="$HOME/Android/Sdk"
-
To avoid bugs be sure that there are FILE pointer:
cd ~/emu-ex-plus-alpha-master/imagine ls --file-type | grep "@"
The output should be like:
android.mk@
android-release.mk@
ios.mk@
ios-release.mk@
linux-armv7-pandora.mk@
linux-armv7-pandora-release.mk@
linux-x86_64.mk@
linux-x86_64-release.mk@
linux-x86.mk@
linux-x86-release.mk@
macosx-x86_64.mk@
ouya.mk@
ouya-release.mk@If it's empty try to continue or, if there are errors, download
and unzip again the copy get from github.
-
First, something you should know:
-
make options:
- V=1 it's verbose
- -j4 it's -j< n-core >
-
Ignore dirname's errors, it's a bug of
/emu-ex-plus-alpha-master/imagine/make/setAndroidNDKPath.mk
when it try to usewhich
to find NDK path, but it's ok.ANDROID_NDK_PATH ?= $(shell dirname `which ndk-build`)
-
My personal fix, edit
/emu-ex-plus-alpha-master/imagine/make/shortcut/meta-builds/android.mk
I've tried to edit this variableandroid_sdkToolsPath := $(shell dirname `which android`)
as
android_sdkToolsPath := $(HOME)/Android
-
To retray the compilation:
rm /tmp/imagine-bundle rm ~/imagine-sdk rm ~/emu-ex-plus-alpha-master
-
-
Open the Terminal (I've tried Android only)
cd ~/emu-ex-plus-alpha-master/imagine/bundle/all/ bash makeAll-android.sh V=1 -j4
Check if there are errors:
bash makeAll-android.sh V=1 -j4 1>/dev/null | grep -v "dirname"
-
It's necessary
cd ~/emu-ex-plus-alpha-master/imagine/ make -f android-java.mk install
If there are errors, check
/Android/Sdk/extras/android/m2repository/com/android/support/
and be sure there issupport-v4
folder
If there is not installAndroid Support Repository
in the SDK Manager
In this file there is a problem, I've tried my personal fix editing in/emu-ex-plus-alpha-master/imagine/android-java.mk
these commands, but it's doesn't work when I try to compile GBC.emuinstall : main install-links : main
as
install : all install-links : all
-
Now, it's time to build android version
-
Debug version:
-
Compile image
cd ~/emu-ex-plus-alpha-master/imagine/ make -f android.mk V=1 -j4 make -f android.mk install V=1 -j4
Check if there are errors:
make -f android.mk install V=1 -j4 1>/dev/null | grep -v "dirname"
-
Compile EmuFramework
cd ~/emu-ex-plus-alpha-master/EmuFramework make -f android.mk V=1 -j4 make -f android.mk install V=1 -j4
Check if there are errors:
make -f android.mk install V=1 -j4 1>/dev/null | grep -v "dirname"
-
-
Release version:
-
Compile image
cd ~/emu-ex-plus-alpha-master/imagine/ make -f android-release.mk V=1 -j4 make -f android-release.mk install V=1 -j4
Check if there are errors:
make -f android-release.mk install V=1 -j4 1>/dev/null | grep -v "dirname"
-
Compile EmuFramework
cd ~/emu-ex-plus-alpha-master/EmuFramework make -f android-release.mk V=1 -j4 make -f android-release.mk install V=1 -j4
Check if there are errors:
make -f android-release.mk install V=1 -j4 1>/dev/null | grep -v "dirname"
-
-
-
To build android release version (I've tried GBC.emu):
cd ~/emu-ex-plus-alpha-master/GBC.emu make -f android-9.mk V=1 -j4 make -f android-9.mk install V=1 -j4
Well this thread lit a bit of a fire under my ass. If I am not willing to put a bit of effort into obtaining these emulators the legal way (compiling from source, as per GPL) then I probably don't deserve to stomp on someone else's efforts and rights to profit either. Obviously Robert has put a lot of work into his front end and making it cross platform and he reserves some right to seek compensation from users for that work.
So... I did exactly that. Downloaded the source code to a linux box and painstakingly figured out how to compile it.
Seriously. This took me > 10 hours to get everything worked out so hope you have a comfy chair.
I am not going to do an exact step by step for people but basically:
You need a linux box
Get your GCC version up to 4.9 or higher
Get your GNU Make version up to 3.8.2 or higher
Install Android SDK
Install Android NDK
Install JDK
Install Ant
Install all the other compiling essentials
Download the source. Compiling the source follows this order of operation:
Read documentation in Imagine/docs folder
Compile + Install Imagine pre-requisites from /imagine/bundle/all/
Compile + Install Imagine
Compile + Install EmuFramework
Compile the emulator you want to use
Sign the APK
I'm hugely over simplifying things. Good luck to all who set out to accomplish this starting from little or no knowledge of compiling c++ based android apps.