HelloZeroNet / ZeroBundle

Packed ZeroNet dependecies
113 stars 37 forks source link

Using pyinstaller to create bundle with python and all the libs #22

Open rllola opened 5 years ago

rllola commented 5 years ago

Pyinstaller would allow to create a proper application package for each platforms.

https://www.pyinstaller.org/

HelloZeroNet commented 5 years ago

I had compatibility problems with earlier macos versions with pyinstaller (it was missing some dlls), so I switched to py2app there: https://github.com/HelloZeroNet/ZeroBundle/commit/dfe0955e9e10695bc5f6c555cb9861ac3f0d0a25

With the upcoming py3 version I will try it again.

For Linux I'm still not sure if we should keep the current ZeroNet.sh version (have the Python distribution in a directory) or create our own binary. Reasons for .sh: It would be more transparent, because you can compare the python binaries with the original ones, less side-effects. Reason for custom zeronet binary: It would appear in process list as zeronet and not as python

rllola commented 5 years ago

I would remove the .sh for linux and instead create a .deb. You can still create a install/uninstall script I believe. It will package it in a cleaner way (and we can also add the .desktop file to have Zeronet showing in the menu).

I don't know if we should create a binary actually... The advantage seems a bit thin for it.

HelloZeroNet commented 5 years ago

I don't know much about .deb format, but what about non-apt distributions? Are they also able to install .deb? Also what about if you don't have root on the machine?

I assume it would have the same pro/cons as installer/portable on windows:

rllola commented 5 years ago

but what about non-apt distributions? Are they also able to install .deb?

I think you just need to have dpkg install to have it to work.

Also what about if you don't have root on the machine?

I guess it depends what your install script does... If you install the app locally (e.g /home/lola/.local/share/ ) you good.

It would definitey be cleaner and we can indeed create icon and access from launcher. If this not what the user want it can just download the zip of the source file.

I don't have lots of experience creating those kind of package neither but I believe it is a good thing to have.

HelloZeroNet commented 5 years ago

Yes, it would be great to have it and also a setup.exe/msi for windows

rllola commented 5 years ago

I was wrong. We still need the root access and it will install it in the system. What worries me then is the data_dir it will need to use the data from the users and we would preferably want to have them saved inside a /home/lola/.zeronet/ folder. It will definitely be more standard but might require some changes that could be breaking.

It would also require to have the zeronet.conf inside /home/lola/.zeronet/ so it would need to look at eitheir the current folder or the user space. Not much code but would change a bit the way it is working for linux.

One of the main advantage would be to have something more standard.... ?