ZeroNet-kivy icon indicating copy to clipboard operation
ZeroNet-kivy copied to clipboard

Using chaquopy may get more contributers for this project

Open canewsin opened this issue 4 years ago • 30 comments

I recently read all the issues of this project and concluded that most of the users want to contribute to the project but some factors stoping them One is project is not buildable by android studio to develop android most of the developers use it so these users are not able to contribute Another one is able to built on windows even most servers runs on linux, desktop space is dominated by windows, same for developers, but kivy only works linux may be we can use wsl but it is mess dugging up issues with that and after some more similar considerations i googled for solutions to these problems and landed on chaquopy github.com/chaquo/chaquopy/ Advantages of caquopy are It is free for open source projects All libraries are prebuilt so you dont have to recompile them [ there is a problem regarding gevent, gevent-websocket, coincurve, i had opened issue with them and convience them its gona help large opensource project they immeadiately resolved the issue and now all the libraries are fully compatible] Android studio project structure Python 3 support Adding modules to project is as simple adding line to build.gradle file

If a wraper is written with chaquopy We can write native android apps with native ui as well Following issues will be addressed #20 #18 #66 #32 and may be #44 What are your thoughts about it

canewsin avatar Aug 13 '19 19:08 canewsin

@mkg20001

canewsin avatar Aug 13 '19 19:08 canewsin

@canewsin If somebody does it and it works, then that PR will be merged. It should do python modules as well as native compilation, since zeronet depends on some modules that require native compilation.

mkg20001 avatar Aug 13 '19 19:08 mkg20001

Actually, looking into it it sounds fairly easy. Maybe I'll get some spare time to do it this week. Would have to figure out how to do the architecture then

Currently the zeronet files are copied into Android/data/net.mkg20001.zeronet/files and then whenever an update is done the old folder is renamed, the new one is copied in and data/ folder is moved to the new one.

Then a service is launched that handles the pre-startup logic and later runs the zeronet code.

This would possibly stay this way, since this is actually the easiest way to implement it (sadly android doesn't let us use symlinks like I did in the snap)

mkg20001 avatar Aug 13 '19 20:08 mkg20001

Yes it will, it has also flags to compile python code to native

canewsin avatar Aug 13 '19 20:08 canewsin

May we can store files on private data folder

canewsin avatar Aug 13 '19 20:08 canewsin

Breaks zeronet profile switcher (the app)

mkg20001 avatar Aug 13 '19 21:08 mkg20001

could you share the code your'e working as separate branch(may be a repo), if i had a time i will look into it, even it breaks, commit to latest working so that i can work form there

canewsin avatar Aug 14 '19 04:08 canewsin

So I just realized that I have android studio on my PC And I'm not at home but somewhere else. So I'd have to postpone it until in a week

mkg20001 avatar Aug 14 '19 07:08 mkg20001

Chaoqupy does have precompiled packages for x86, x86_64, armv7a and armv8?

mkg20001 avatar Aug 14 '19 07:08 mkg20001

yes it has all precompiled bins with requires native implementation

canewsin avatar Aug 14 '19 08:08 canewsin

if lib is bear python code its works without any native implementation as stated by them

canewsin avatar Aug 14 '19 08:08 canewsin

I started working on repo which is available at http://github.com/canewsin/ZeroNetChaquoPy simplify continue from here

canewsin avatar Aug 14 '19 22:08 canewsin

I currently dont have time to continue i will be a little free to contribute from december

canewsin avatar Sep 07 '19 20:09 canewsin

@mkg20001 did you try any thing since last conversation?

canewsin avatar Dec 13 '19 11:12 canewsin

No, I'm primarily busy with other things right now.

mkg20001 avatar Dec 13 '19 11:12 mkg20001

code is mostly runnable but there is uiserver.py connection error, did you look into it because you have previously connected with zeronet repo i think some code modifications should be done in python code to run perfectly. look at my repo if possible.

canewsin avatar Dec 13 '19 16:12 canewsin

Yes, mostly the upgrading logic is missing

This month I'll likely won't have any time because I've already got a lot of thing on my list.

I'll see next year

mkg20001 avatar Dec 13 '19 17:12 mkg20001

so i thought you was refering to, when repo get updated it should be downloaded to some folder and run without rebuilding app right.

canewsin avatar Dec 14 '19 04:12 canewsin

Actually I intended the app code to be update via the app updates (later once things work we could add automated build & release, like I did for the zeronet snap)

It's rather about upgrading the plugins directory since users should be able to modify it, yet it needs to be modified by the app on upgrades (and keep the disabled/enabled prefix)

mkg20001 avatar Dec 14 '19 18:12 mkg20001

Ok, i want some list of TODOs you want with the repo so if possible i may try with the app code. What i want you to do is list out what are requirements if possible i will tweak the app code after that we can do big fixing.

canewsin avatar Dec 15 '19 04:12 canewsin

Ok, i want some list of TODOs you want with the repo so if possible i may try with the app code. What i want you to do is list out what are requirements if possible i will tweak the app code after that we can do big fixing.

Background processing - no need to keep the window open

Autorun at device boot option (Important to make sure ZeroNet is always running, so nobody has to be bothered to run it manually)

users.json import/export

Command line interface

Use a mesh networking API like neighbor-aware WiFi or one of the handful of others

Prompt the user on first run to select the features they want enabled

Yggdrasil or similar

styromaniac avatar Dec 15 '19 14:12 styromaniac

@canewsin What's also in current zeronet APK and should be included:

  • Allow users to modify plugins & enable/disable them
    • This should be synced accross upgrades
  • The zeronet source code should be app-managed, so that we always have the right libraries (Like it currently is)
    • Later I'll set up a CI build once things work to automate the upgrade & release process, but that'll require a setup where the zeronet tests are auto-run on the android OS, so we know stuff works (unlike the current solution with manual testing)
  • The data directory should be in a location where the user can access it, not in the app's private directory

@styromaniac

Going through your list, I see things quite out of scope:

Command line interface

This is rather uncommon on android and if needed one could run a termux-based install

Yggdrasil or similar

Since zeronet auto-listens on all addresses, simply having a yggdrasil or cjdns node running should make both connect

Also

Background processing - no need to keep the window open

Actually we're using a persistent notification already in the current version, but it seems android likes to kill things from time to time, so we should check out what's making it do that once that feature is ported

Other than that LGTM

mkg20001 avatar Dec 16 '19 18:12 mkg20001

chaquopy requires heavy modification of source code apart from that i was tested latest py3 repo with termux all plugins except coincurve are installed, sites are running well except openssl not found error if it is successful we have another option to try for latest version(py3)

canewsin avatar Dec 18 '19 10:12 canewsin

with this we can achieve all the above requirements from above

canewsin avatar Dec 18 '19 10:12 canewsin

coincurve is also successful zeronet is running normally with bear py3 zeronet code now i will pack those resouces to app make an app on top of it.

canewsin avatar Dec 19 '19 07:12 canewsin

i made an app with compiled sources openssl lib problem except that all is working well i will publish work soon as new app. on top of it i will write ui code with platform side code.

canewsin avatar Dec 21 '19 05:12 canewsin

hi i published apks at canews/zeronet download the relevent apps and try them.

canewsin avatar Jan 02 '20 13:01 canewsin

It almost takes 2 full months of work(for finding solution for every problem i faced during this work) to complete this app, so i want to publish the app as separate app as an ad supported version because my financial conditions are very bad, hope this will helps me. you may try with chaquopy but it requires heavy code modifications in zeronet repo code. my version is py3 fully supported.

canewsin avatar Jan 02 '20 13:01 canewsin

hi i published apks at canews/zeronet download the relevent apps and try them.

It gets a lockfile error once ZeroNet crashes or is shut down.

It almost takes 2 full months of work(for finding solution for every problem i faced during this work) to complete this app, so i want to publish the app as separate app as an ad supported version because my financial conditions are very bad, hope this will helps me. you may try with chaquopy but it requires heavy code modifications in zeronet repo code. my version is py3 fully supported.

Setup an account on liberapay or other such so we can support you. The ad networks pay out very little, IMHO.

styromaniac avatar Jan 04 '20 21:01 styromaniac

I realize the larger APK seems to have no problems. The one that's 64-bit only was problematic.

https://github.com/canewsin/ZeroNet/releases/download/APKs/app-release.apk

^Good to go.

styromaniac avatar Jan 04 '20 23:01 styromaniac