-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Proper path integration for all OS binaries #187
Comments
🍎 The macOS issue is fixed. See #251 and the two linked PRs, which each fixed half of the issues affecting the |
🐧 Pretty simple fix for Linux: we can symlink to In this file: https://github.com/pulsar-edit/pulsar/blob/5f96f2737d787040ff76999eef6de35d9ee8aeca/script/post-install.sh Which is run after installing the .deb or .rpm packages, per the electron-builder config: pulsar/script/electron-builder.js Lines 142 to 144 in 5f96f27
UPDATE: This suggestion is a PR now: #273 We could also consider supporting the "Install Shell Commands" command in-app, just like we do on macOS, to workaround any issues with our packaging, or for folks who have gotten the app as an AppImage or .tar.gz targets, but those are pretty portable/arbitrary where you save them to, and that makes it a lot harder to predict where the real binary will be for us to symlink to... The AppImage one is kinda unfortunate in that sense, since it's such a smooth user experience otherwise, but I think those users should use Likewise for the .tar.gz folks, I especially think they don't expect automatic system integration from just extracting a compressed archive of the files.. |
🪟 For Windows, I suppose we can try to invoke https://stackoverflow.com/a/69383805 Perhaps during the installer: And/or we could likewise add this to a Windows version of the "Install Shell Commands" command, which users can manually run in-app. Portable edition should probably not be put on the PATH, nor used with extensive ppm commands, since it is a self-extracting 7-zip archive, and it takes a super long time to launch... Imagine waiting through that super long extraction process just to run a CLI program... |
@DeeDeeG I'm personally on board with adding everything to be a variant of "Install Shell Commands" as long as that's clearly documented it feels the best, just to offload the choice and responsibility for users. And if it's an option for every OS we can add it right into the "System Settings" page like other OS integration features, rather than have it hidden away behind a command. But of course for simplicity the button there can just invoke the command. But I am really glad to see there is a way to fix, at least quickly for Linux, and is working on MacOS, then looks like it just needs another script for Windows. An alternative approach for Windows, is from some quick research I was doing a few days ago about |
Interesting about AppX... |
@Daeraxa Now with #604 merged, I can personally say that Pulsar has full proper PATH integration for Windows. And you mentioned above that macOS should be fine as well, and some versions of the Linux installer. So really to close this issue out, should we extend the behavior of macOS to Linux to be able to add Pulsar to the PATH manually there as well? I'd love to take a shot at this, but can you think of any examples or possibilities about the code that would have to be implemented itself? And for posterity:
This is looking pretty good, and that we are close to having it fully solved, with obviously a few discrepancies still |
Really anyone downloading the tar.gz should be (and probably will be) dealing with this themselves, at most we may need to provide instructions on where the binaries are in the file structure. Appimage is a bit more difficult |
Have you checked for existing feature requests?
Summary
Commands missing from path
See here for Discord conversation.
Basically we should provide a solution to the various packages to make sure that the Pulsar and PPM commands can always be found on the path.
For example if you currently download the Appimage the only way to get the
pulsar
command working is to include it on the path manually even if integrated with appimageinstaller. Same with the tar.gz.There is already a caveat for macOS in Atom where a command is provided that isn't accessible to other platforms to install the application and apm/ppm commands. (see conversation and atom docs).
There also seems to be a current issue with the Windows binary not installing this to the path which was seemingly handled by Squirrel. Discord.
Now this does work in many places. The .deb file certainly adds
pulsar
to the path and I suspect the.rpm
and macOS.dmg
are similar as thepulsar.sh
file seems to be the one responsible for this.How to fix it?
I think it is important that this gets resolved as currently in the docs it assumes that
pulsar -p
will always work and it seems a bit silly to offer formats where this integration isn't possible without manual steps.It might be useful simply to expose this command to all platforms and extend the logic to work for all of them. This would allow manual install of the command no matter what system it is run on (and in cases where it doesn't work it will be easier to expand this so that it does). This would also potentially solve the Windows problem and take the guesswork out of the existing macOS case.
There should be a mechanism for this to run automatically on first start as well (maybe check from the config.cson) but it maybe shouldn't run without prompting for those who want to use it entirely as a portable app without leaving any traces. Maybe a first start popup asking to integrate Pulsar on the path with a brief explanation.
Enter your response below:
Seamless integration of the
pulsar
andppm
commands without needing to manually add Pulsar to the path.Any alternatives?
Updated installer? A new appimage command for the appimage such as
./Pulsar_1.63.0.appimage --install
that would be the .desktop exec or an option? Use docs to cover this use case?None really seem ideal with our supported distributions.
Other examples:
I think Zed has this option as it doesn't put itself on the path on first install.
Many other applications simply don't come as an appimage and just as OS specific packages which work natively.
The text was updated successfully, but these errors were encountered: