[BACK]Return to README-OpenBSD.md CVS log [TXT][DIR] Up to [local] / projects / libgdx-openbsd

Annotation of projects/libgdx-openbsd/README-OpenBSD.md, Revision 1.1

1.1     ! thfr        1: Purpose
        !             2: =======
        !             3:
        !             4: This repo is a fork of libgdx with modifications to allow running libgdx
        !             5: games on OpenBSD. Current limitations are that setup involves many steps and is
        !             6: difficult, and that only some of the backend code is adapted (lwjgl, but not
        !             7: lwjgl3, etc). In its current form, this can be used to run Slay the Spire.
        !             8:
        !             9: The ultimate purpose of this repo is to contribute to making the upstream
        !            10: libgdx framework usable on OpenBSD. **Ultimately, this repo will hopefully
        !            11: become obsolete once upstream accomodates OpenBSD.**
        !            12:
        !            13: Besides upstreaming OpenBSD-specifics, native shared object (.so) libraries
        !            14: might best be converted to an OpenBSD port.
        !            15:
        !            16: Files Changed from libgdx 1.9.9 or Added
        !            17: ========================================
        !            18:
        !            19: backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglNativesLoader.java
        !            20: backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/audio/OpenALMusic.java
        !            21: extensions/gdx-controllers/gdx-controllers-desktop/jni/build-openbsd64.xml
        !            22: extensions/gdx-freetype/jni/build-openbsd64.xml
        !            23: extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/JniGenSharedLibraryLoader.java
        !            24: gdx/jni/build-openbsd64.xml
        !            25: gdx/src/com/badlogic/gdx/scenes/scene2d/utils/UIUtils.java
        !            26: gdx/src/com/badlogic/gdx/utils/SharedLibraryLoader.java
        !            27: README.md
        !            28: README-OpenBSD.md
        !            29:
        !            30: Example: Running Slay the Spire on OpenBSD
        !            31: ==========================================
        !            32:
        !            33: This is based on my testing on OpenBSD 6.4-current with jdk-1.8.0.202v0.
        !            34:
        !            35: Prerequisite Packages:
        !            36: ----------------------
        !            37:
        !            38: * openal
        !            39: * lwjgl
        !            40: * jdk
        !            41: * intellij
        !            42: * ant
        !            43: * rsync
        !            44:
        !            45: Also Slay the Spire, release version 1.0 (needs to be obtained via Steam on
        !            46: another operating system).
        !            47:
        !            48: Step-by-Step:
        !            49: -------------
        !            50:
        !            51: 1. Copy the files of Slay the Spire to your OpenBSD installation.
        !            52:
        !            53: 2. Locate desktop-1.0.jar and extract it to a separate directory (with jar(1)).
        !            54:
        !            55: 3. Replace libopenal64.so and liblwjgl64.so with the corresponding libraries
        !            56:    from the packages, for example:
        !            57:
        !            58:    $ cp /usr/local/lib/libopenal.so.3.1 libopenal64.so
        !            59:
        !            60: 4. Obtain the libgdx-openbsd code:
        !            61:
        !            62:    $ cvs -d anoncvs@anoncvs.thfr.info:/cvs checkout -P projects/libgdx-openbsd
        !            63:
        !            64: 5. Build native (JNI) libs of the libgdx project:
        !            65:
        !            66:    $ cd gdx/jni && ant -f build-openbsd64.xml && cd -
        !            67:    $ cd extensions/gdx-freetype/jni && ant -f build-openbsd64.xml && cd -
        !            68:    $ cd extensions/gdx-controllers/gdx-controllers-desktop/jni && \
        !            69:      ant -f build-openbsd64.xml && cd -
        !            70:
        !            71: 6. Copy these libs to the Slay the Spire directory, replacing existing files.
        !            72:    After building with ant(1), the libs are located in the libs/openbsd64
        !            73:    subdirectory (e.g. gdx/libs/openbsd64).
        !            74:
        !            75: 7. Open the libgdx-openbsd directory in intellij(1). This will import the Maven
        !            76:    project.
        !            77:
        !            78: 8. Right click on the following folders and (re-)build the modules **in this
        !            79:    order**:
        !            80:    - extensions/gdx-jnigen
        !            81:    - gdx
        !            82:    - backends/gdx-backend-lwjgl
        !            83:    - extensions/gdx-freetype
        !            84:    - extensions/gdx-controllers/gdx-controllers
        !            85:    - extensions/gdx-controllers/gdx-controllers-desktop
        !            86:
        !            87: 9. Locate the class trees in all these modules (in target/classes subdir) and
        !            88:    put all of them together, for example with:
        !            89:
        !            90:    $ rsync -avh gdx/target/classes/* /tmp/
        !            91:    $ rsync -avh backends/gdx-backend-lwjgl/target/classes/* /tmp/
        !            92:
        !            93:    etc. (gdx-jnigen may not be needed anymore in this step.)
        !            94:
        !            95: 10.Remove the original com/badlogic subdir in Slay the Spire and replace it
        !            96:    with the one that you just built (in /tmp/com/badlogic following the
        !            97:    example code).
        !            98:
        !            99:    $ rm -rf com/badlogic
        !           100:    $ cp -R /tmp/com/badlogic com/
        !           101:
        !           102: 11.The main java class and the arguments for the Java VM are documented in the
        !           103:    config.json that comes with the game. Based on that, start the game with the
        !           104:    following command:
        !           105:
        !           106:    $ java -Xmx1G -Dsun.java2d.dpiaware=true com.megacrit.cardcrawl.desktop.DesktopLauncher
        !           107:
        !           108: Notes:
        !           109: ------
        !           110:
        !           111: * For some reason sometimes the java runtime fails to load libopenal64.so when
        !           112:   starting the game. This is usually resolved by simply starting the game again
        !           113:   with the same command.
        !           114:
        !           115: Goals for the Future:
        !           116: =====================
        !           117:
        !           118: * fix gamecontroller support
        !           119: * lwjgl3 backend (required for MewnBase)
        !           120: * try it with more libgdx games (e.g. Halfway)
        !           121: * ...
        !           122:
        !           123: Contact
        !           124: =======
        !           125:
        !           126: Thomas Frohwein <thfr@openbsd.org>

Contact: <mail@mail.thfr.info>