calibre-web icon indicating copy to clipboard operation
calibre-web copied to clipboard

Standalone executable / app

Open aniqueta opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. Setting up a full Python environment or Docker VM is a lot for low-power systems and 'production' systems. For me, on macOS, Docker has abysmal filesystem performance and runs a Linux VM, which is overkill for just calibre-web. From Docker, accessing the natively-running calibre database and book library requires significant workarounds.

Describe the solution you'd like It would be ideal to have a standalone executable / app to run alongside calibre, with both running natively.

Describe alternatives you've considered On a separate development system, I attempted to package this as a standalone app for macOS using Py2App and PyInstaller. Py2App was able to build, but the app first did not run and then when it did crashed immediately. The former issue was due to a lack of Gatekeeper signing and potentially notorization. [1] I was able to circumvent this by disabling Gatekeeper, but then the app opened and crashed immediately. I did not work on signing further given this. I believe the crashing is a result of needing to access files through AppKit. [2] I think this would require modifying code that sets up file access to detect macOS and use AppKit in those cases. PyInstaller threw many errors for me to explore this further.

[1] https://haim.dev/posts/2020-08-08-python-macos-app/ [2] https://stackoverflow.com/questions/63611190/python-macos-builds-run-from-terminal-but-crash-on-finder-launch/64042327#64042327

Additional context Thanks for a fantastic project. Hopefully, this request makes sense, and some of the above helps. I can understand if feature development is a priority before this. I think the project has matured enough to make it easier to use for a broader set of calibre users.

aniqueta avatar Dec 29 '20 10:12 aniqueta

I have meanwhile a standalone program for windows, with the next release I will have it for linux/amd64 and linux/aarch (raspberry pi), a MacOS executable is still a problem, as I don't own a Mac and pyinstaller is not able to do cross compiling.

OzzieIsaacs avatar May 01 '22 09:05 OzzieIsaacs

You could try to build it for a MacOS system on your own using this script: https://github.com/OzzieIsaacs/calibre-web-test/blob/e552c5e8fd1b16ca0a73860341afa675d6de8457/build/make_release.py (The proper configuration for building with pyinstaller is included) A basic manual is included in the readme (https://github.com/OzzieIsaacs/calibre-web-test#build-package-files-and-executables)

OzzieIsaacs avatar May 01 '22 09:05 OzzieIsaacs

I can't support executables for MacOS, as I don't have a working cross compiler and can't affort to buy a MacOs only for this task.

OzzieIsaacs avatar Aug 04 '23 09:08 OzzieIsaacs