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 pyinstaller to create bundle with python and all the libs #22

Open
rllola opened this issue Apr 1, 2019 · 6 comments
Open

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

rllola opened this issue Apr 1, 2019 · 6 comments

Comments

@rllola
Copy link

rllola commented Apr 1, 2019

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

https://www.pyinstaller.org/

@HelloZeroNet
Copy link
Owner

I had compatibility problems with earlier macos versions with pyinstaller (it was missing some dlls), so I switched to py2app there: dfe0955

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

rllola commented Apr 2, 2019

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

HelloZeroNet commented Apr 2, 2019

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:

  • Portable (unpack zip, run): You don't need root/admin access, you can run it from external drive and move it to other machine easily
  • Installer/deb: Creates icons / puts binary/data to proper location in users home dir, easier for most users

@rllola
Copy link
Author

rllola commented Apr 2, 2019

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

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

@rllola
Copy link
Author

rllola commented Apr 2, 2019

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.... ?

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

2 participants