chickensoft-games / GodotEnv

Manage Godot versions and addons from the command line on Windows, macOS, and Linux.

Home Page:https://www.nuget.org/packages/Chickensoft.GodotEnv/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Adding .desktop files / Start Menu shortcuts

wiggleforlife opened this issue · comments

commented

Hi, I've been looking at a bunch of different version managers but I quite like this one. I was wondering if it would be possible to extract a .desktop file to the relevant location on Linux to include in an application launcher (and/or similar for Windows' Start Menu). I believe for Linux this would be /usr/share/applications/.

It would probably be best to have multiple configurations for this, something like

  • All installed versions show (in a folder?)
  • Only the active version shows
  • No versions show

I'd also love a feature like this. I spent quite a while on my mac trying to get an alias in my dock that points to the symlink that points to Godot. No luck, since macOS hates aliases to other aliases, and then configuring dock icons is a pain and requires admin permissions (I believe).

If we can find clever ways to do this on each OS, I'm all in. But we'd need to have some sort of plan going into this.

Hi, I've been looking at a bunch of different version managers but I quite like this one

Thanks that means a lot! It's a tough market for Godot version managers these days 😆

This would be great to have.

Maybe the second option would be a good place to start to create and maintain an active version shortcut, which would allow us to lean on updates to the $GODOT environment variable that's updated with the use command.

In theory, it seems this would work (assuming we can handle each OS nuance to create the shortcut reliably), but this is a new area for me in terms of handling this cross-platform, so I could be oversimplifying the approach.

commented

I was playing around with this on my Linux install, and I could not seem to get it to work because of the environment variable. I could run the shortcut from the terminal with three different tools and it passed two validators, but when it came to actually using it from the application menu, nothing.
This could very well be due to my specific install, so I should try this in a VM as well. If this does not work, however, I think the best way to handle this is to also include a shell script for the shortcut to run (which in theory should be the same as sh - c "$GODOT" but oh well).
Haven't tried with Windows yet, but since this is .NET it very well could be included. I don't really have a Mac to play with, but I know someone who just got a new one so maybe I could liberate their old one.

On the code side of things, I was planning to add AddOrUpdateGodotShortcut() to Features.Godot.Domain.GodotRepository. Thoughts?

Will update on any progress

GodotEnv's big promise to users is "same development environment for Godot, regardless of where you are" basically. To that end, I am also happy to test out anything you all want to try on macOS. It'd probably be hugely beneficial to everyone if we could even just maintain a desktop shortcut to the current version, like @justinhhorner was saying.

I don't know how to do that, but if you have an idea you want to try, I'm happy to help test. The automated CI/CD tests were what allowed me to verify GodotEnv worked on each OS, so we can probably lean on those here too by automatically executing the final desktop shortcut or something.

We use the UACHelper package in this project to request the ability to run a process as admin (it doesn't change the current process, but it allows us to run cmd.exe commands as an admin if the user approves).

Not sure how that works on Linux/macOS from .NET, but we should have permission to mess with shortcuts on the desktop, since it's the users own folder, maybe?