Re: BotE Android (Linux)

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Montag 14. März 2016, 14:06

New update, 0.7.32, changes are here.
Updates up on itch.io, Google Play and Amazon.

Benutzeravatar
Vaexling
Kadett
Kadett
Beiträge: 14
Registriert: Samstag 19. April 2008, 04:36

Re: BotE Android (Linux)

Beitrag von Vaexling » Freitag 25. März 2016, 14:54

Is there an installation guide for linux? I have Ubuntu 14.04 and would like to build from sources.

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Freitag 25. März 2016, 15:05

Vaexling hat geschrieben:Is there an installation guide for linux? I have Ubuntu 14.04 and would like to build from sources.
If you just want to build then clone the repository and then:
./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

Benutzeravatar
Vaexling
Kadett
Kadett
Beiträge: 14
Registriert: Samstag 19. April 2008, 04:36

Re: BotE Android (Linux)

Beitrag von Vaexling » Freitag 25. März 2016, 15:09

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?

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Freitag 25. März 2016, 15:19

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?
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.
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.

Benutzeravatar
Vaexling
Kadett
Kadett
Beiträge: 14
Registriert: Samstag 19. April 2008, 04:36

Re: BotE Android (Linux)

Beitrag von Vaexling » Samstag 26. März 2016, 21:56

The archive in the google drive doesn't needs to be built, it's already built, you can simply run the binary.
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).
"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!

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Samstag 26. März 2016, 22:50

Vaexling hat geschrieben:
The archive in the google drive doesn't needs to be built, it's already built, you can simply run the binary.
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).
"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!
DeerHunter wrote a german guide on how to import into eclipse, i'll translate it next week, because on the phone it's tedious ;).

Benutzeravatar
Vaexling
Kadett
Kadett
Beiträge: 14
Registriert: Samstag 19. April 2008, 04:36

Re: BotE Android (Linux)

Beitrag von Vaexling » Sonntag 27. März 2016, 18:55

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..

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Dienstag 29. März 2016, 14:20

Updated OP with latest version

Benutzeravatar
Vaexling
Kadett
Kadett
Beiträge: 14
Registriert: Samstag 19. April 2008, 04:36

Re: BotE Android (Linux)

Beitrag von Vaexling » Dienstag 29. März 2016, 22:51

Vaexling hat geschrieben:I will translate the German version when I go through the steps myself..
edited on May, 30th: completed instructions

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
Clone the source code in your home directory (or anywhere else and adjust future paths)

Code: Alles auswählen

$ cd && git clone https://sarkanyi@bitbucket.org/sarkanyi/bote-libgdx.git
Later, keep the code up-to-date via:

Code: Alles auswählen

$ cd ~/bote-libgdx && git pull
2. JAVA SDK
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
launch it via:

Code: Alles auswählen

$ cd eclipse-installer/ && ./eclipse-inst
Choose the "Eclipse IDE for Java Developers" and install it
Append this line to your ~/.bashrc

Code: Alles auswählen

export PATH=$PATH:/home/developer/eclipse/java-mars/eclipse
(adjust the path if you have installed it to a different directory)

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
Download it from:
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/
Follow the steps 2. and 3. mentioned in /opt/android-studio/Install-Linux-tar.txt, i.e.:

Code: Alles auswählen

$ cd /opt/android-studio/ && ./studio.sh
Note: during the installation, I was advised to install something with KVM to boost performance. I didn't yet, anyway, here's the link:
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
5. GRADLE FOR ECLIPSE
Launch ecplise via:

Code: Alles auswählen

$ eclipse
OK (accept the standard workspace)
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
Again, adjust, if you have a different path. The path can be found via:

Code: Alles auswählen

$ cd /opt/android-studio/bin/ && ./studio.sh
Configure > Project Defaults > Project Structure > Android SDK location

7. GENERATE BOTE DEPENDENCIES

Code: Alles auswählen

$ cd ~/bote-libgdx && ./gradlew generateEclipseDependencies --info
wait until you read "BUILD SUCCESSFUL" :)
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
Configure > SDK Manager > SDK Tools > Show Package Details > Check "Android SDK Build-tools 23.0.2" > Apply > OK > Finish > OK

8.1 DEPENDENCIES IN ECLIPSE
Launch ecplise via:

Code: Alles auswählen

$ eclipse
OK (accept the standard workspace)
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
and get the following output:

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 last line indicates that there's a new file created. Right click on the folder in eclipse and click "Refresh".
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.

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Freitag 1. April 2016, 11:36

Updated OP with latest version

permutator
Offizier
Offizier
Beiträge: 115
Registriert: Freitag 25. August 2006, 21:00

Re: BotE Android (Linux)

Beitrag von permutator » Donnerstag 7. April 2016, 01:00

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.

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Mittwoch 25. Mai 2016, 13:32

Neue Version raus. Siehe OP.

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Freitag 24. Juni 2016, 13:29

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!

blotunga
Flottenkapitän
Flottenkapitän
Beiträge: 747
Registriert: Montag 26. Mai 2014, 15:05

Re: BotE Android (Linux)

Beitrag von blotunga » Freitag 15. Juli 2016, 08:55

New version is out, updated OP with link.

Antworten

Zurück zu „BotE Android (Linux)“