Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, I was playing around with this project and implemented the shortcuts for the current selected version of Godot
The implementation feels really hacky and I think I made some questionable decisions on where to place some of the code, but, the idea is here
Features tested, respecting the selected current version:
As I said, I coudn't really spot the best place for some of the code, please let me know if you think of any changes and of course, feel free to deny it if you think its too hacky haha
For MacOS:
Creating an .app directory on the users Applications dir so Mac recognizes it as a program, then symlinking every file from godot current selected version does the trick
In fact, linking the binary (Godot.app/Content/MacOS/godot) whould be enought but it could lead to wrong informations on the app metadata and the files not linked whould have to be copied from somewhere
For Linux:
The app menus on linux are kinda similar to Mac, but instead of the actual app it has a .desktop file with all the information (like the plist on mac), so creating one and pointing to the "bin" symlink is enough
It also works if it's created point to the actual binary, but some menu apps/desktop environments can cache these .desktop files and keep pointing to the wrong version until a force refresh (like reboot or logging off)
The problem with linux is that executables doesn't have icons, so there is a png download for placing on the user's icons dir
For Windows:
This was a hard one, because Start Menu only works with .lnk files (the normal shortcut file), Web Shortcut files could also work but there is the cache again
Also, the shortcut is only a pointing file and the real instance of godot (even pointing to the symlink) whould be the real .exe file, so creating a hard link can trick Windows to think the link is the real .exe and even pinning on task bar works this way
For creating a normal shortcut the I used a small powershell script importing the WScript (it could also be imported via C# but it would not be available on mac and linux)
Solves #30