Re: BotE Android (Linux)
-
- Flottenkapitän
- Beiträge: 855
- phpbb forum styles
- Registriert: Montag 26. Mai 2014, 15:05
Re: BotE Android (Linux)
Is there an installation guide for linux? I have Ubuntu 14.04 and would like to build from sources.
Re: BotE Android (Linux)
If you just want to build then clone the repository and then:Vaexling hat geschrieben:Is there an installation guide for linux? I have Ubuntu 14.04 and would like to build from sources.
./gradlew desktop:dist
in desktop/libs you'll have the library and you can run it directly with:
java -jar desktop-0.6.88.jar
Re: BotE Android (Linux)
I downloaded the file from the google drive and extracted it. So there's no "gradlew" file. Please give me the link to the repository and I'll give it a try. In the long term, I'd also like to contribute code, but I think I can just edit the source code for that, right?
Re: BotE Android (Linux)
The archive in the google drive doesn't needs to be built, it's already built, you can simply run the binary. You need to clone https://bitbucket.org/sarkanyi/bote-libgdx for the sources.Vaexling hat geschrieben:I downloaded the file from the google drive and extracted it. So there's no "gradlew" file. Please give me the link to the repository and I'll give it a try. In the long term, I'd also like to contribute code, but I think I can just edit the source code for that, right?
Then you can either use eclipse or intellij - if you need help with either, I will try to conjure up a guide.
To submit changes, create a fork, make the changes then make a pull request.
Re: BotE Android (Linux)
You're right, I extracted it on a non-linux partition and thus, could not execute the bote file (moved it to home and it works like a charm).The archive in the google drive doesn't needs to be built, it's already built, you can simply run the binary.
"git clone https://sarkanyi@bitbucket.org/sarkanyi/bote-libgdx.git" also worked for me; after building, I found the .jar file in desktop/build/libs and it worked, too.
I installed eclipse but I don't know how to use import>projects, i.e., I don't know which is the root directory containing project information. Anyway, so far I've only played the c++ version and I will now first get familiar with the new one. Thanks a lot for your effort in keeping this game alive!
Re: BotE Android (Linux)
DeerHunter wrote a german guide on how to import into eclipse, i'll translate it next week, because on the phone it's tedious .Vaexling hat geschrieben:You're right, I extracted it on a non-linux partition and thus, could not execute the bote file (moved it to home and it works like a charm).The archive in the google drive doesn't needs to be built, it's already built, you can simply run the binary.
"git clone https://sarkanyi@bitbucket.org/sarkanyi/bote-libgdx.git" also worked for me; after building, I found the .jar file in desktop/build/libs and it worked, too.
I installed eclipse but I don't know how to use import>projects, i.e., I don't know which is the root directory containing project information. Anyway, so far I've only played the c++ version and I will now first get familiar with the new one. Thanks a lot for your effort in keeping this game alive!
Re: BotE Android (Linux)
Ich spreche auch Deutsch, also für mich genügt das - danke für den Hinweis! I will translate the German version when I go through the steps myself..
Re: BotE Android (Linux)
edited on May, 30th: completed instructionsVaexling hat geschrieben:I will translate the German version when I go through the steps myself..
HowTo modify the source code with Eclipse under linux
(translation of DeepHunter's post extended with some details)
- tested with Xubuntu Core 15.10
- if you prefer to download a 10GB Virtual Machine with all steps performed already, ask me to upload it.
1. SOURCE CODE (& git)
Open a terminal and install git
Code: Alles auswählen
$ sudo apt-get install git
Code: Alles auswählen
$ cd && git clone https://sarkanyi@bitbucket.org/sarkanyi/bote-libgdx.git
Code: Alles auswählen
$ cd ~/bote-libgdx && git pull
Download and install the most recent Java SDK from here:
http://www.oracle.com/technetwork/java/ ... index.html
If you need help, try this guide:
http://www.tecmint.com/install-java-jdk-jre-in-linux/
3. ECLIPSE
Find and download the most recent release here:
https://www.eclipse.org/downloads/index ... tions=TRUE
Extract the installer via:
Code: Alles auswählen
$ tar -zxvf eclipse-inst-linux64.tar.gz
Code: Alles auswählen
$ cd eclipse-installer/ && ./eclipse-inst
Append this line to your ~/.bashrc
Code: Alles auswählen
export PATH=$PATH:/home/developer/eclipse/java-mars/eclipse
4. ANDROID STUDIO
Before attempting the installation, install a required 32bit library to avoid this error:
"Unable to run mksdcard SDK tool." THX to bluecollarcoder
Code: Alles auswählen
$ sudo apt-get install lib32stdc++6
http://developer.android.com/sdk/index.html#Other
there's a "SDK Tools Only" and a "All Android Studio Packages" version,
I chose the latter, maybe the former is enough.
Install via:
Code: Alles auswählen
$ unzip android-studio-ide-141.2456560-linux.zip
$ sudo mv android-studio /opt/
Code: Alles auswählen
$ cd /opt/android-studio/ && ./studio.sh
http://developer.android.com/tools/devi ... l#vm-linux
Step 3 means that you append this line to your ~/.bashrc
Code: Alles auswählen
export PATH=$PATH:/opt/android-studio/bin
Launch ecplise via:
Code: Alles auswählen
$ eclipse
Get rid of the welcome page (I clicked the small button 'restore' on the left panel)
Open this website
https://marketplace.eclipse.org/content ... on-eclipse
and drag the "Install" button to the large panel in your eclipse window.
A window appears in which "Gradle (STS) [...]" and "Grade IDE (required)" are checked.
Press "Confirm >", then "Accept" and "Finish". Then restart Eclipse.
6. ANDROID SDK REFERENCE
Create a small text file via:
Code: Alles auswählen
$ echo "sdk.dir=/home/developer/Android/Sdk" > ~/bote-libgdx/local.properties
Code: Alles auswählen
$ cd /opt/android-studio/bin/ && ./studio.sh
7. GENERATE BOTE DEPENDENCIES
Code: Alles auswählen
$ cd ~/bote-libgdx && ./gradlew generateEclipseDependencies --info
If you get an error about "failed to find Build Tools revision 23.0.2"
Just get these 'old' build tools via:
Code: Alles auswählen
$ cd /opt/android-studio/bin/ && ./studio.sh
8.1 DEPENDENCIES IN ECLIPSE
Launch ecplise via:
Code: Alles auswählen
$ eclipse
File > Import > General > Existing Projects into Workspace > Next
Set this root directory: /home/developer/bote-libgdx/android
and a project called "android" will be listed. Good, press Finish.
Ignore 2 errors (missing required source folder 'gen' & The project cannot be built until path errors are resolved)
8.2 SOURCE CODE IN ECLIPSE
File > Import > Gradle > Gradle Project > Next > Next
As root, set /home/developer/bote-libgdx
Next > Next (keep defaults and wait) > Finish (wait again)
Now the Package Explorer contains:
android
Birth of the Empires-core
Birth of the Empires-desktop
Birth of the Empires-ios
> bote-libgdx
8.3 BUILD, RUN & EXPORT WITH ECLIPSE
Check "Build Automatically" in the "Project" Menu
To start the game, run this file ('run as JAVA application' in ecplise):
/Birth of the Empires-desktop/src/com/blotunga/bote/desktop/DesktopLauncher.java
Export to a .jar file via:
File > Export > Java > JAR file
VERSION INFO
The current version can be found in the "build.gradle" file
UDPATING INFO
After each git pull (see Section 1), if there are new files, they have to be added to the project. For example, you run
Code: Alles auswählen
$ cd ~/bote-libgdx && git pull
Code: Alles auswählen
remote: Counting objects: 96, done.
[...]
Fast-forward
CHANGES | 4 +
android/AndroidManifest.xml | 4 +-
android/assets/data/de/strings/stringtable.xml | 7 +-
android/assets/data/it/strings/stringtable.xml | 3 +
[...]
core/src/com/blotunga/bote/utils/KryoV.java | 20 ++++
19 files changed, 274 insertions(+), 95 deletions(-)
create mode 100644 core/src/com/blotunga/bote/utils/KryoV.java
The file should then be listed and it will build again.
Have fun!
Zuletzt geändert von Vaexling am Montag 30. Mai 2016, 19:58, insgesamt 1-mal geändert.
-
- Offizier
- Beiträge: 115
- Registriert: Freitag 25. August 2006, 21:00
Re: BotE Android (Linux)
I am impressed a BotE version that can be modified and compiled on Linux.
Building from the source worked also on opensuse. The procedure is similar to Ubuntu with the exception that I installed suse's java SDK
$ sudo zypper in java-1_7_0-openjdk-devel
cloning as above:
$ git clone https://sarkanyi@bitbucket.org/sarkanyi/bote-libgdx.git
$ cd ./bote-libgdx
$ ./gradlew desktop:dist
and start the game via
$ java -jar desktop/build/libs/desktop-0.6.91.jar
You can of course start the game from any other directory as long as you have the right path to desktop-0.6.91.jar.
But it looks like the game creates a directory called ./save from where you started the game and will look for saved games in this. So if you played a few turns, saved, ended the game and then would start the game instead via:
$ cd desktop/build/libs
$ java -jar desktop-0.6.91.jar
The game wouldn't find your save game. So always start from the same directory or place a bash script in your ~/bin/ for starting the game.
Building from the source worked also on opensuse. The procedure is similar to Ubuntu with the exception that I installed suse's java SDK
$ sudo zypper in java-1_7_0-openjdk-devel
cloning as above:
$ git clone https://sarkanyi@bitbucket.org/sarkanyi/bote-libgdx.git
$ cd ./bote-libgdx
$ ./gradlew desktop:dist
and start the game via
$ java -jar desktop/build/libs/desktop-0.6.91.jar
You can of course start the game from any other directory as long as you have the right path to desktop-0.6.91.jar.
But it looks like the game creates a directory called ./save from where you started the game and will look for saved games in this. So if you played a few turns, saved, ended the game and then would start the game instead via:
$ cd desktop/build/libs
$ java -jar desktop-0.6.91.jar
The game wouldn't find your save game. So always start from the same directory or place a bash script in your ~/bin/ for starting the game.
Re: BotE Android (Linux)
Birth of the Empires new Beta is out. Now with achievements. Get it: Windows, Linux and Android. Also available for beta testers on Google Play.
On the desktop limited modding is supported. Launch the game with --editor to run the editor. Only the ship editor is functional. However all files placed next to the .jar have priority compared to internal files. Thus if you create a data/ships/startships.txt with modified info, the modified file will be prioritized for newly created games.
Bugs can happen, achievements might be altered in the future (or even deleted). Have fun though!
On the desktop limited modding is supported. Launch the game with --editor to run the editor. Only the ship editor is functional. However all files placed next to the .jar have priority compared to internal files. Thus if you create a data/ships/startships.txt with modified info, the modified file will be prioritized for newly created games.
Bugs can happen, achievements might be altered in the future (or even deleted). Have fun though!