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

Add 'Create shortcut' button to instance toolbar #227

Merged
merged 25 commits into from Nov 25, 2022
Merged

Add 'Create shortcut' button to instance toolbar #227

merged 25 commits into from Nov 25, 2022

Conversation

Leo40Git
Copy link
Contributor

@Leo40Git Leo40Git commented Oct 22, 2022

Closes #210.

This PR also makes FileSystem::createShortcut function on Windows systems.

TODO

  • Icon for "Create Shortcut" action
    • Missing in Legacy, Flat, and Flat (White)
  • Shortcut for "Create Shortcut" action
  • Platform-specific behavior
    • Windows
      • Use instance icon for shortcuts
    • Linux
      • Testing!!
    • macOSX
      • Write shell script
      • Testing!!

@flowln flowln added the enhancement New feature or request label Oct 22, 2022
@Leo40Git Leo40Git marked this pull request as ready for review October 25, 2022 14:44
launcher/FileSystem.cpp Fixed Show resolved Hide resolved
@Leo40Git
Copy link
Contributor Author

Windows now has instance icons!

@Leo40Git
Copy link
Contributor Author

Leo40Git commented Oct 28, 2022

KNOWN BUG: Creating an instance shortcut on Windows replaces the application's icon with the instance's icon.
I have no idea how this happens (I blame COM), and am reasonably sure a simple setIcon call will fix this?

EDIT: Fixed!

launcher/FileSystem.cpp Outdated Show resolved Hide resolved
launcher/ui/MainWindow.cpp Outdated Show resolved Hide resolved
launcher/ui/MainWindow.cpp Outdated Show resolved Hide resolved
launcher/ui/MainWindow.cpp Outdated Show resolved Hide resolved
launcher/ui/MainWindow.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@flowln flowln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix DCO :)

launcher/FileSystem.cpp Outdated Show resolved Hide resolved
Leo40Git and others added 21 commits November 12, 2022 20:18
Implemented on Windows only rn!

Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Add a few comments

Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Dunno why it happens but the fix was literally 2 lines, so whatever I guess

Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Co-authored-by: flow <flowlnlnln@gmail.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
- create .command files instead of .sh
- fix shortcuts not working if path to Prism Launcher contains spaces
- fix path to executable in shortcutss
- add check for running from extracted folder (prevents creating shortcuts)

Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
- Fix shortcut icons
- Possibly fix shortcut creation on AppImages
- Fix shortcut not working if path to launcher contains spaces

Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Copy link
Contributor

@flowln flowln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

just do the TODOs (particularly the icon one, since now that we have icons on the sidebar for every other action, this action not having one looks weird) :D

launcher/ui/MainWindow.cpp Outdated Show resolved Hide resolved
NOTE: Currently missing on Legacy, Flat and Flat (White)
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Signed-off-by: ADudeCalledLeo <7997354+Leo40Git@users.noreply.github.com>
Copy link
Member

@Scrumplex Scrumplex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Scrumplex Scrumplex added this to the 6.0 milestone Nov 25, 2022
@Scrumplex
Copy link
Member

We can handle the missing icons in a separate PR

@Scrumplex Scrumplex merged commit fd8b4c5 into PrismLauncher:develop Nov 25, 2022
@Leo40Git Leo40Git deleted the feature/instance-shortcuts branch November 25, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instance shortcuts
3 participants