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

Installers and Packaging #481

Closed
vkbo opened this issue Oct 17, 2020 · 15 comments
Closed

Installers and Packaging #481

vkbo opened this issue Oct 17, 2020 · 15 comments
Assignees
Labels
help wanted Note: Assistance needed question Meta: More information requested

Comments

@vkbo
Copy link
Owner

vkbo commented Oct 17, 2020

Updated on 22 August 2022

I've spent quite some time writing and rewriting the setup.py script to make it easier to install and run novelWriter.

novelWriter is released to pip, and can be installed from there on all platforms supported by pip and Python.

Windows

The setup.py script can create a single file executable installer for Windows, with dependencies and Python embedded. The installer is unsigned though, which raises a warning. I'm looking for an inexpensive way to sign the packages like I can for Ubuntu. A minimal package release is also available with some simple batch scripts for install/uninstall.

Linux

For Ubuntu, Debian and Mint, the debian packages can be installed directly or via Launchpad. AppImages are available from release 1.7. RPM-package releases are needed, see #907. A minimal package release is also available for manual install. Direct local setup from setup.py is also possible.

macOS

I know too little about macs to attempt anything related to packaging of novelWriter for macOS. Some assistance would be appreciated here. See the help wanted task #867.

@vkbo vkbo added help wanted Note: Assistance needed question Meta: More information requested labels Oct 17, 2020
@vkbo vkbo pinned this issue Oct 17, 2020
@vkbo vkbo self-assigned this Oct 17, 2020
@jyhelle
Copy link
Contributor

jyhelle commented Oct 25, 2020

tested on Manjaro Linux, all went OK (except the "launcher" option which is in fact "xdg-install")

@vkbo
Copy link
Owner Author

vkbo commented Oct 26, 2020

Thanks for testing.

Yes, I rewrote the launcher installer and used the proper xdg tools, so it made sense to rename it. The README is updated, but the text here is out of date. I'll update it.

@singlebunglemrbungle

This comment has been minimized.

@vkbo
Copy link
Owner Author

vkbo commented Jun 10, 2021

Hi @singlebunglemrbungle, I moved your report to a separate issue thread on #805. Please see my response there. Thanks!

@vkbo vkbo unpinned this issue Jun 14, 2021
@vkbo vkbo pinned this issue Jul 13, 2021
@ak-42
Copy link

ak-42 commented Aug 21, 2022

@vkbo Hi. Have you considered packaging novelWriter using one of the Linux distro-agnostic methods, such as Flatpak (via Flathub) or AppImage?

While the minimal package works fine for me, I am hesitant to rely on a program which does not receive automated updates, which seems like a return to Windows-like dark age of application updates. I understand it is likely unfeasible for you to package the program for all the various distros, and since Flatpaks and AppImages run on virtually all modern distros, this increase the reach of novelWriter and reduce troubleshooting and dependency issues (since all dependencies are generally included into Flatpaks).

@vkbo
Copy link
Owner Author

vkbo commented Aug 22, 2022

Hi!

AppImage has already been added in #1092 thanks to @Ryex, and will be available from release 1.7 RC 1, which will arrive soon. I did not backport it to the recent 1.6.3 release. I'm not sure how auto-updates are done in AppImage though. I tend to avoid those sort of distributions myself.

For Debian/Ubuntu, it is on Launchpad, and I've been tinkering with rpm-packages from time to time. Eventually I will get it done too. For Mac, I still need help since I have no access to a Mac of any kind, and for Windows I have added back the setup.exe installer without using any of the packaging tools which tend to send low-end virus software panicking.

I should update the main post here to reflect these changes.

@ak-42
Copy link

ak-42 commented Aug 22, 2022

That's good to hear. AppImages can self-update without a centralised repository, the relevant documentation is here.

@johnblommers
Copy link

IMHO it's preferred to allow the user to download updated AppImage files. This way they can have multiple versions of an application concurrently on the system.

In general I'm leery of automatic application updates because if it goes wrong the user has to figure out how to fix the mess.

I am in favor of applications checking for an update and offer to download it. But the user has to decide to switch to it and delete the old version.

@ak-42
Copy link

ak-42 commented Aug 22, 2022

@johnblommers If you open the link I provided above, all of those points are addressed by the 'Recommended user experience' section.

@Ryex
Copy link
Contributor

Ryex commented Aug 23, 2022

@ak-42
I tried to come up with a comfortable way to add update information when I made my PR but there is a distinct lack of clarity when it comes to the documentation. there is also some complication in obtaining a python build that is portable enough to work in an Appimage. The current method used in the setup.py uses python-appimage which does not support generating the zsync update information. Normally I would have then gone upstream to make a PR for that and then come back, but the docs provide so little information that I couldn't see how to do it.

in theory it's as simple as lettings us pass through an -u with "zsync|https://github.com/vkbo/novelWriter/releases/latest/download/novelwriter.Appimage" to appimagetool but internally python-appimage takes some shortcuts that makes me dubious

EDIT:
on further research it seems that there may be an issue using python-appimage because the pyqt5 clib deps do not get included in the Appimage?. It seems like an unlikely case that someone won't have most of then on their system already but if it's true then it will need more work...

It seems the likely solution will be to use linuxdeploy with it's conda plugin... It makes things much messier though.

EDIT 2:
https://github.com/Pext/Pext/blob/master/ci/build-appimage.sh is a PyQT5 project with a seemingly working appimage build script.
I'll see what I can do with it.

@Ryex
Copy link
Contributor

Ryex commented Aug 23, 2022

As for MacOS

the same project has a script for making dmg's
https://github.com/Pext/Pext/blob/master/ci/build-dmg.sh

turns out that's a relatively simple process so long as you know how to make an .app bundle
https://www.maketecheasier.com/anatomy-macos-app-bundles/
https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle

Running this kind of script in an OSX ci workflow on github should work to make a working dmg but it will need to be verified by someone with a working Mac.

@vkbo
Copy link
Owner Author

vkbo commented Aug 23, 2022

Yeah, I have looked into packaging for mac, but to be honest, since I don't have access to one, I am reluctant to release something I cannot verify. I have an old VM with an older macos that I used to tweak some of the code for mac, but it's no longer usable for proper testing beyond that.

Making all of these packages also takes a lot of time. Setting up the debian build was a huge job, and I have spent a massive amount of time redoing the Windows installer in various ways. It takes up a lot of the time I have available for developing the actual app. I'm hoping someone would take on releasing for mac and rpm.

Life would have been so much simpler if pip also worked properly for GUI apps ...

@Ryex
Copy link
Contributor

Ryex commented Aug 25, 2022

well, good news. turns out is dead simple to run a macOS VM via docker with https://github.com/sickcodes/Docker-OSX

I have a working VM with macOS 10.15 now and I'm completely willing to work on a packaging script for it your interested

@vkbo
Copy link
Owner Author

vkbo commented Aug 25, 2022

Sure, that would be great!

@vkbo
Copy link
Owner Author

vkbo commented Jan 31, 2024

AppImages have been implemented. and flatpak may be added, and anyway has a separate ticket at #1651. I'm closing this old discussion thread.

@vkbo vkbo closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Note: Assistance needed question Meta: More information requested
Projects
None yet
Development

No branches or pull requests

6 participants