niqdev/ipcam-view

F-Droid

Poussinou opened this issue ยท 17 comments

F-Droid received a Request For Packaging for your app.
To be build by F-Droid, we need to find a way to build everything from source. Could you help us to do so? Here are the problematic prebuilt libraries:

ERROR: Found shared library at mjpeg-view/src/main/jniLibs/x86/libImageProc.so
ERROR: Found shared library at mjpeg-view/src/main/jniLibs/mips/libImageProc.so
ERROR: Found shared library at mjpeg-view/src/main/jniLibs/armeabi-v7a/libImageProc.so
ERROR: Found shared library at mjpeg-view/src/main/jniLibs/armeabi/libImageProc.so

Hi, thanks for including the package on F-Droid.
So there is a script to build those libraries, but unfortunately at the moment is not integrated with any CI/CD and they were built manually.
Consider also that with the help of @amadeu01 we are looking at #59 and #60 which means a full rewrite of the project in Kotlin, so not sure if is worth fix this issue now.

Where those errors came from? How is the build process working to release the app on F-Droid?

This script could work for us if the SDK path was not hardcoded:

diff --git a/compileJni.sh b/compileJni.sh
index 9a76b5a..a16dc11 100755
--- a/compileJni.sh
+++ b/compileJni.sh
@@ -3,7 +3,7 @@
 JNI_SRC="mjpeg-view/src/main"
 
 rm -fr $JNI_SRC/jniLibs
-~/Library/Android/sdk/ndk-bundle/ndk-build -C $JNI_SRC
+$ANDROID_HOME/ndk-bundle/ndk-build -C $JNI_SRC
 cp -a $JNI_SRC/libs $JNI_SRC/jniLibs
 rm -fr $JNI_SRC/libs $JNI_SRC/obj

However, if you are rewriting the app, it might be safer to wait before including it in F-Droid (so we don't have to do the packaging work twice).

I can create a PR for that now if you want, is not a big deal. Regarding the rewrite is not something that is going to happen any time soon, just considering how and what to do.

Well, if building the libraries is as easy as running this script, I guess I can work on packaging the current version.

Are these prebuilt libraries really necessary?
It seems I can build and run the demo app with Gradle even if I remove them.

No, I was planning to remove it before considering a full rewrite. The native implementation is broken and never got time to try to fix it. If it compiles and work just ignore those files

Oh OK so we can totally package this on F-Droid then.
Thanks for the explanation!

Nice, I'll merge the PR then, is that enough?

If you are talking about #63, I don't think we strictly need it, it's just something our linter complains about.

So I think you should merge it (for security reasons) but it is not a requirement.

Got it, is correct the command I've added in the PR to generate the hash? or how did you get that and what should I run next time I bump the version?

@Rudloff last question, which are the criteria to add an app on F-Droid other then being open source? I have another app that you might be interested in...

You can check our inclusion policy.

Feel free to open a request for your other app if it meets the criteria.

Awesome, thanks!

Sorry to bother you again but I tried to build v1.6 and it does not work correctly.
Some of the videos are blank and I get this error in logcat:

05-26 14:16:58.618 15296 15411 E Mjpeg   : error during connection
05-26 14:16:58.618 15296 15296 E IpCamSnapshotActivity: mjpeg error

However 663e23e builds and runs correctly.
Are you planning a new release soon?

Yep, I'm going to release the latest version now, I'll tell you when is done

I've released app v.1.7.0, let me know if works now

It works, thanks!