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

Using chaquopy may get more contributers for this project #69

Open
canewsin opened this issue Aug 13, 2019 · 30 comments
Open

Using chaquopy may get more contributers for this project #69

canewsin opened this issue Aug 13, 2019 · 30 comments

Comments

@canewsin
Copy link

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

canewsin commented Aug 13, 2019

@mkg20001

@mkg20001
Copy link
Collaborator

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

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)

@canewsin
Copy link
Author

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

@canewsin
Copy link
Author

May we can store files on private data folder

@mkg20001
Copy link
Collaborator

mkg20001 commented Aug 13, 2019

Breaks zeronet profile switcher (the app)

@canewsin
Copy link
Author

canewsin commented Aug 14, 2019

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

@mkg20001
Copy link
Collaborator

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

mkg20001 commented Aug 14, 2019

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

@canewsin
Copy link
Author

yes it has all precompiled bins with requires native implementation

@canewsin
Copy link
Author

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

@canewsin
Copy link
Author

canewsin commented Aug 14, 2019

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

@canewsin
Copy link
Author

canewsin commented Sep 7, 2019

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

@canewsin
Copy link
Author

@mkg20001 did you try any thing since last conversation?

@mkg20001
Copy link
Collaborator

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

@canewsin
Copy link
Author

canewsin commented Dec 13, 2019

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.

@mkg20001
Copy link
Collaborator

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

@canewsin
Copy link
Author

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

@mkg20001
Copy link
Collaborator

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)

@canewsin
Copy link
Author

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.

@styromaniac
Copy link

styromaniac commented Dec 15, 2019

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

@mkg20001
Copy link
Collaborator

@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

@canewsin
Copy link
Author

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

with this we can achieve all the above requirements from above

@canewsin
Copy link
Author

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

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

canewsin commented Jan 2, 2020

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

@canewsin
Copy link
Author

canewsin commented Jan 2, 2020

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.

@styromaniac
Copy link

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

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.

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

3 participants