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

Add to F-Droid #29

Open
pizzamaker opened this issue Oct 2, 2016 · 13 comments
Open

Add to F-Droid #29

pizzamaker opened this issue Oct 2, 2016 · 13 comments

Comments

@pizzamaker
Copy link

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

@gurrhack
Copy link
Owner

gurrhack commented Oct 7, 2016

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
Copy link

👍

@mase76
Copy link

mase76 commented Jan 13, 2017

Great idea!

@mase76
Copy link

mase76 commented Oct 29, 2017

No more interest in f-droid?

@mcagl
Copy link

mcagl commented Sep 18, 2018

Is this idea dead? I hope not...

@IzzySoft
Copy link

IzzySoft commented Feb 2, 2019

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

@licaon-kter
Copy link

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
Copy link
Owner

gurrhack commented Feb 4, 2019

@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
Copy link

IzzySoft commented Feb 4, 2019

Thanks @gurrhack!

@gurrhack
Copy link
Owner

gurrhack commented Apr 27, 2019

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
Copy link

Rudloff commented Apr 27, 2019

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
Copy link

Any update on this one?

@IzzySoft
Copy link

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

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

9 participants