Open pizzamaker opened 7 years ago
Yes, I think it's time for me to move on from Google's Play Store. They have some serious policy problems. Maybe F-Droid is better, I will look into it.
:+1:
Great idea!
No more interest in f-droid?
Is this idea dead? I hope not...
@gurrhack can the app be built from CLI? That's a requirement for F-Droid. See here for details.
Some notes, following https://github.com/gurrhack/NetHack-Android/blob/master/sys/android/README
- Install the Android SDK
- Download and extract the Android NDK
- Install 'bison' and 'flex'
- Check out the source
ok
- Open Makefile.src and change NDK to the appropriate path
That didn't work, but I've read and created a standalone toolchain, that moved things along
- sh ./setup.sh
- cd ../..
- make install
ok, but the doc
fails to create the Guidebook, it doesn't show any error but the file is 151bytes only, hence the .so
is smaller.
- Start IntelliJ
I have AndroidStudio, good enough? Maybe...
- Create an empty project in the parent directory
- Add a new empty Java module to the project root
- Import the ForkFront module located at
/forkfront.iml
Ok, we got some gradle files that maybe we can just re-create for F-Droid.
Remove from manifest, since the import put them in build.gradle
anyway:
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="15"/>
Try a build, fix error package org.apache.http does not exist
with a line under buildtools like useLibrary 'org.apache.http.legacy'
.
Try again, see error: cannot find symbol method sqrt(int)
and other math functions, so we find/replace them all from FloatMath
to (float)Math
, also remove the useless import android.util.FloatMath;
(This might be avoided in a lower SDK iirc)
So now we have an app that builds, but we don't have the assets, and the lib from NetHack.
- Import the NetHack module located at
/sys/android/NetHack.iml
Fails with "Specify location of the Gradle or Android Eclipse project", doesn't matter if I choose the .iml
or the folder.
The end...
But, I did try to just bring them from NetHack, assets/res/lib, merge config.xml, added a lib folder for the .so
, but the app ends up without an actual main activity to start, so I guess it needs more that this.
I did try to import NetHack as a project too, not sure how it went the first time, but now, I get "The project file specified already exists" when I choose the .iml
no matter what config files I delete, not sure where this is kept in history or cache.
@licaon-kter Sounds like Android Studio wants to use Gradle which is weird, because it's not a Gradle project. I still use NDK r9d and SDK r22.6 to build the official releases. It works well with those but I realize they are a bit on the old side.
@IzzySoft My TODO has a line that literally says: "Command line build script including APK generation". I'm sure it's possible but I haven't really looked into it yet.
@mcagl It's not dead, just slow moving.
Thanks @gurrhack!
I've added basic Gradle scripts for nethack and forkfront (it's only experimental and likely to change). Also commited a pre-built forkfront binary to sys/android/nethack/libs which the nethack build depends on, so you don't have to clone forkfront to build a nethack APK. You still have to build the native library like before. The scripts are meant to be run from the command line, a simple "gradle build" should do it. It will tell you to put the path to the Android SDK in a local.properties file, so do that.
Also commited a pre-built forkfront binary to sys/android/nethack/libs which the nethack build depends on, so you don't have to clone forkfront to build a nethack APK.
We don't allow prebuilt binaries, so we will have to build this from source anyway.
Any update on this one?
@gurrhack any news? The RFP at F-Droid is stalled for a year now. Do we have a chance to get this flying?
Hey, it'd be nice to have this app on F-Droid. Would that be feasible?