Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build instructions? #345

Open
Enovale opened this issue May 1, 2019 · 25 comments
Open

Build instructions? #345

Enovale opened this issue May 1, 2019 · 25 comments

Comments

@Enovale
Copy link

Enovale commented May 1, 2019

In the readme you state that build instructions will come "soon". How soon, exactly? I dont want to be like "release wen" but I also dont want you up and dying on us again before you can post instructions, also, is it possible to modify the current build to build it ourselves? I 'm trying to get it to work anyway but i see a lot of hard coded directories and obviously theres no explanation of anything.

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

@ElijahZAwesome OK, to be completely honest I only released this since other people decompiled the app and got that to work anyways. So I figured having the original source as reference might already be helpful.

If I remember correctly, the build steps are:

build glshim (ndk-build)
build lwjgl (ant compile, then go to platform_build/android_wrapper and ndk-build)
copy the libraries manually

go to Boardwalk

./predex-compile.sh, ./predex-run.sh, ./predex-deploy.sh
ndk-build
ant clean release

but I haven't built this in years and I would also need to figure this out again.

@Enovale
Copy link
Author

Enovale commented May 1, 2019

That's insightful.. However I kind of already pieced that together. the thing is, I can't figure out how to build glshim, and idk what you mean by ndk-build (im new to android devving)

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

@ElijahZAwesome

You'll need to install the Android NDK to build this, since it contains C++ code.

https://developer.android.com/ndk

the glShim shim I uploaded seems to only have the build script for Boardwalk 2.0; I'm going to look for the 1.0 build script; give me a sec

@Enovale
Copy link
Author

Enovale commented May 1, 2019

I already have Android Studio installed, and I believe I installed the NDK with it. I'm not completely oblivious to Android Devving, I have modified apps before, I just don't know the basics

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

@ElijahZAwesome Boardwalk predates Android Studio; I tried to get 2.0 building in Android Studio, but that didn't work, so I never added those changes back to 1.0.

Thus, the 1.0 code still uses the ant build system.

You will need an older version of the Android SDK.

This is everything I have installed right now: I doubt you'll need all of these though.

  • SDK manager 25.2.5
  • SDK tools 25.2.5
  • SDK Platform-tools 23.1
  • SDK build-tools 27.0.3, 23.0.3, 21.1.2, 20, and 17
  • Android 8.1, 6.0, 5.0.1, 4.4, 4.3.1, 4.2.2, 4.0.3, 2.3.3 SDK platforms
  • Google Play Services 29
  • Google Repository 24
  • Android support library 23.1.1

I could, like, zip up my entire Android SDK folder and upload it, but that's probably overkill...

As long as you can build Android apps using ant it should probably work.

You will also want a version of the Android NDK: I'm using Android NDK r10c. A newer version would probably work.

For the libraries it needs:

  • aFileChooser is https://github.com/zhuowei/aFileChooser
  • makeshift and openal-soft will be uploaded to BoardwalkApp
  • update: makeshift is in BoardwalkApp now, and openal-soft is https://github.com/zhuowei/openal-soft
  • gms/gmsads is the Google Play Services Ant package with everything but the Ads part removed. I'll upload this too.
  • lwjgl/platform_build/android_wrapper is the boardwalk-lwjgl repo.

I'm trying to figure this out myself, so sorry about this!

@Enovale
Copy link
Author

Enovale commented May 1, 2019

Honestly I would really like a zipped SDK, just for the ease of access. Also, right now, i'm trying to build one of the dependencies (lwjgl) to work and getting errors about not having "lib/tools.jar" in my JDK. Also glshim wont cmake properly or something, it doesn't seem to be making a makefile for me to use.

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

Don't cmake it: I'm uploading my old build script right now.

@Enovale
Copy link
Author

Enovale commented May 1, 2019

for 1.0 or 2.0? I was hoping to build 2.0 because of the dang nougat bug

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

Oh, 2.0: ... I don't even have graphics working on that, so you might not actually need glshim... Give me a sec. I think I built that using the 1.x build script, not the 1.9 build script.

You don't need the Ant stuff for 2.0, but you still need the Android NDK.

Edit: run ndk-build in https://github.com/BoardwalkApp/boardwalk-glshim/tree/master/build/android

@Enovale
Copy link
Author

Enovale commented May 1, 2019

The more and more I work on this the more i'm realizing I should use linux instead of windows rofl

Ubuntu subsystem yayyy

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

@ElijahZAwesome I'm on Ubuntu 14.04 (amd64) for what it's worth, although I think it would build on newer Ubuntu.

Anyways, for 2.0: the build process is even crazier, because I was trying to get mods working.

  • You might need Android NDK r15c (which supports Android Studio) as well as r10c (which doesn't support Android Studio, but I know works with glshim and lwjgl)

  • build OpenJDK. https://github.com/BoardwalkApp/boardwalk2-openjdk-build (that's going to take an hour; start that one first.)

  • build boardwalk2-lwjgl3

  • (not sure what else?)

  • run the repacklwjgl3 and lwjgloverride scripts in Boardwalk. (I don't have these uploaded yet: give me asec.)

  • then build Boardwalk with Android Studio.

  • run it: you'll get a blank screen and a crash somewhere in lwjgl. yay?

@Enovale
Copy link
Author

Enovale commented May 1, 2019

So 2.0 isn't functional yet? Damn. So there's still no way to play on v>Nougat without just finishing 2.0?

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

@ElijahZAwesome I know @khanhduytran0 has an app that includes a decompiled version of Boardwalk modified so it works on Nougat and Oreo - see #304 .

I think they removed the download link as I told them that including Boardwalk a the time infringes on Boardwalk's code. I open sourced Boardwalk so they can hopefully upload their app again (and then people won't ask me to update Boardwalk anymore)...

Anyways, even that app still won't support mods, which is why I'm trying to get 2.0 working instead of fixing 1.x

@Enovale
Copy link
Author

Enovale commented May 1, 2019

Gotcha. If there's any way I can help (Maybe explain how this mess of code works sometime?) I would be glad to. It doesn't look like khan's source is anywhere, so I guess I just have to wait?

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

@ElijahZAwesome

Mess of code basically has five parts, each part fixing one compat issue:

Minecraft renders graphics using LWJGL and desktop OpenGL.

  • LWJGL is patched to run on Android and to use glshim as its OpenGL library
  • glshim (which is completely unmodified from ptitSeb's glshim version that worked on Minecraft for non-Android devices) converts desktop OpenGL to mobile OpenGL ES 1.1

Minecraft plays sound using OpenAL.

  • thankfully OpenAL already works on Android.

Minecraft uses Desktop Java instead of Android's Dalvik.

  • Android SDK's dx tool is run on the phone itself to convert Minecraft's .jar to Dalvik format.
    • this doesn't work on Nougat and Oreo, so I think khan's app just does this ahead of time. This does mean that it can only run one version of Minecraft at a time.
  • other libraries used by Minecraft is converted ahead of time (using the predex* scripts)

Minecraft loads PNG files using Java AWT, which isn't available on Android.

  • Boardwalk uses jarjar to redirect these calls to Boardwalk's makeshift library, which implements these APIs using Android's image loader

Finally, the Minecraft launcher's login screen doesn't work on Android.

  • Boardwalk implements Minecraft.net logins.

So that's basically the five parts of Boardwalk 1.x.

Boardwalk 2.0 has two additional goals:

Mods won't run on Android's Dalvik: converting them like Minecraft won't work, since Modloader needs a real Java virtual machine

  • Boardwalk 2.0 actually uses the real Java virtual machine, which Oracle ported to Android in 2016.
  • it doesn't work well though.

Minecraft 1.13 and above doesn't use lwjgl - they switched to lwjgl3

  • Boardwalk 2.0 tries to implement this, but fails - immediately crashes.

So that's a super high level summary of what Boardwalk does.

Also, check your email.

@Enovale
Copy link
Author

Enovale commented May 1, 2019

Thanks a lot for that (and the email). Idk, I might look into 2.0 if/when i get it built, but like i said im not super experienced in android so it will take a while (or at least until you figure it out yourself)

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

@ElijahZAwesome Again, sorry about this. If I ever get 2.0 working, I'll definitely make sure it's buildable with one command instead of this craziness.

@Enovale
Copy link
Author

Enovale commented May 1, 2019

How long do you plan to support this @zhuowei ? Or are you going to get thanos snapped for another 3 years :P

@zhuowei
Copy link
Owner

zhuowei commented May 1, 2019

@ElijahZAwesome Unfortunately, I really don't have a plan for this. One of the reasons why I uploaded the source right now is that I'm not sure how much time I'll have later this year to work on projects. I'll let you know once I figure this out. I'm so sorry about this.

(Also, Endgame spoilers! nooooo ;) )

@Enovale
Copy link
Author

Enovale commented May 1, 2019

I kind of figured as much. Well no matter how much time you put into it, I'm glad you open sourced it. I've been waiting a very long time for this lol.

(Never watched endgame or infinity war :P)

@lerepex
Copy link

lerepex commented May 7, 2019

@zhuowei @ElijahZAwesome
The version from @khanhduytran0 ist still available at Aptoide I just downloaded it there. Here is the link:
https://net-minecraft-kdt.en.aptoide.com/

Edit: Can confirm that it's the right one and that it is working fine even on Android 9

@Vretox
Copy link

Vretox commented May 11, 2019

The app was probably deleted from Aptoide (or I just can't download it). At least I found a site where you can download it. Link ---> https://android-apk.org/net.minecraft.kdt/42357093-net-minecraft-kdt/

1.9 works perfectly with 7 render distance on Poco F1 (around 30-40 fps)

@GalaxinTM
Copy link

But it does not have all of the versions, 1. 1, 1.7.2, 1.7.10, 1.8, 1.9

@KorewaLidesu
Copy link

android-apk.org had been removed too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants