bondolo / tribaltrouble

Restoration fork of classic Java Real Time Strategy Game Tribal Trouble
GNU General Public License v2.0
18 stars 6 forks source link

[linux] Build on aarch64 required java library path tweaks in ant config files (attached) #6

Open clort81 opened 1 year ago

clort81 commented 1 year ago
Clone the repository:

git clone https://github.com/bondolo/tribaltrouble.git

Make sure you have Java SDK at least version 8, and Apache Ant.

To build the game client, do this:

cd tt
ant run

What is the command to start the game after building, if not using 'ant'? Since i'm not on x86, I need to override the java.library.path for libraries that assume AMD64.

P.S. Here is my current java environment.

$ java -Djava.library.path=/usr/java/packages/lib/aarch64:/usr/lib/aarch64-linux-gnu/jni:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/aarch64:/lib/aarch64-linux-gnu:/usr/lib/aarch64-linux-gnu:/usr/lib/jni:/lib:/usr/lib  -XshowSettings:properties
Property settings:
    awt.toolkit = sun.awt.X11.XToolkit
    file.encoding = UTF-8
    file.encoding.pkg = sun.io
    file.separator = /
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.path = .
    java.class.version = 52.0
    java.endorsed.dirs = /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/endorsed
    java.ext.dirs = /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/ext
        /usr/java/packages/lib/ext
    java.home = /usr/lib/jvm/java-8-openjdk-arm64/jre
    java.io.tmpdir = /tmp
    java.library.path =  /usr/java/packages/lib/aarch64
        /usr/lib/aarch64-linux-gnu/jni
        /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/aarch64
        /lib/aarch64-linux-gnu
        /usr/lib/aarch64-linux-gnu
        /usr/lib/jni
        /lib
        /usr/lib
    java.runtime.name = OpenJDK Runtime Environment
    java.runtime.version = 1.8.0_352-8u352-ga-1-b08
    java.specification.maintenance.version = 4
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Oracle Corporation
    java.specification.version = 1.8
    java.vendor = Debian
    java.vendor.url = http://java.oracle.com/
    java.vendor.url.bug = http://bugreport.sun.com/bugreport/
    java.version = 1.8.0_352
    java.vm.info = mixed mode
    java.vm.name = OpenJDK 64-Bit Server VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Oracle Corporation
    java.vm.specification.version = 1.8
    java.vm.vendor = Debian
    java.vm.version = 25.352-b08
    line.separator = \n 
    os.arch = aarch64
    os.name = Linux
    os.version = 5.15.0+
    path.separator = :
    sun.arch.data.model = 64
    sun.boot.class.path = /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/resources.jar
        /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/rt.jar
        /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/sunrsasign.jar
        /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jsse.jar
        /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jce.jar
        /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/charsets.jar
        /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jfr.jar
        /usr/lib/jvm/java-8-openjdk-arm64/jre/classes
    sun.boot.library.path = /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/aarch64
    sun.cpu.endian = little
    sun.cpu.isalist = 
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.jnu.encoding = UTF-8
    sun.management.compiler = HotSpot 64-Bit Tiered Compilers
    sun.os.patch.level = unknown
    user.country = US
    user.dir = /media/sd/Projects/TermFun/VoxelSpace/tribaltrouble/binaries/tribaltrouble
    user.home = /home/plab
    user.language = en
    user.name = plab
    user.timezone = 
clort81 commented 1 year ago

I have patched two ant build files that got me to a working game by overriding the java library paths. Attached here and closing the issue. buildpatches_mylinux.zip

Works splendidly on khadas vim3 with panfrost drivers. Thank you for your work on this! It is a very nice procedural terrain generator to study.

clort81 commented 1 year ago

Re-opening so master Bondolo might see it more easily. :)

bondolo commented 1 year ago

Could you submit the changes as a pull request?

clort81 commented 1 year ago

These are the tweaked paths that work for me. I am not a java programmer and I do not know how to make library path changes that would work on other computers. For this reason I think a pull request would be inappropriate.