gurrhack / NetHack-Android

Android port of NetHack
128 stars 23 forks source link

Add to F-Droid #29

Open pizzamaker opened 7 years ago

pizzamaker commented 7 years ago

Hey, it'd be nice to have this app on F-Droid. Would that be feasible?

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

ddevault commented 7 years ago

:+1:

mase76 commented 7 years ago

Great idea!

mase76 commented 6 years ago

No more interest in f-droid?

mcagl commented 5 years ago

Is this idea dead? I hope not...

IzzySoft commented 5 years ago

@gurrhack can the app be built from CLI? That's a requirement for F-Droid. See here for details.

licaon-kter commented 5 years ago

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

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

  1. sh ./setup.sh
  2. cd ../..
  3. 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.

  1. Start IntelliJ

I have AndroidStudio, good enough? Maybe...

  1. Create an empty project in the parent directory
  2. Add a new empty Java module to the project root
  3. 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.

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

gurrhack commented 5 years ago

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

IzzySoft commented 5 years ago

Thanks @gurrhack!

gurrhack commented 5 years ago

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.

Rudloff commented 5 years ago

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.

rodneyrod commented 4 years ago

Any update on this one?

IzzySoft commented 4 years ago

@gurrhack any news? The RFP at F-Droid is stalled for a year now. Do we have a chance to get this flying?