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

qt: create windows desktop shortcut during installation #3003

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jadzeidan
Copy link
Contributor

Currently, Windows users need to manually create a desktop shortcut.
This PR creates a desktop shortcut during the installation process.

@jadzeidan
Copy link
Contributor Author

jadzeidan commented Oct 29, 2024

@benma please have a look.

I looked into whether it is possible to add a checkbox to the last screen to create a shortcut, however with nsis, it doesn't seem possible to do without removing the "Run BitBoxApp" checkbox, which I don't think it we should remove.

Therefore, the shortcut created by default. I think this is totally acceptable behavior for Windows users. Many apps create a desktop shortcut and it is expected. For those that don't want a a shortcut, it is trivial to delete from the desktop.

File "${ICONDIR}\icon.ico"

# Create a shortcut on the desktop
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}" "" "$INSTDIR\icon.ico" 0
Copy link
Contributor

Choose a reason for hiding this comment

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

the app already embeds an icon doesn't it? can you try simply setting the icon string to "" and not copying the icon again to the install folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean like this?

CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APP_EXE}" 0

That change seems to work but I need the BBApp already installed for the logo to appear on the shortcut (I am just testing the script by compiling with NSIS).

So I think it should work but I can't fully test because I can't build the app.

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant to try like this:

CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${APP_EXE}" "" "" 0

Copy link
Contributor

Choose a reason for hiding this comment

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

ping @jadzeidan

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tested and that works 👍

Will update PR

Comment on lines 108 to 109
# Explicitly copy the icon file to the installation directory
File "${ICONDIR}\icon.ico"
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like this is not needed anymore, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, forgot to remove it in last update. Fixed now.

Currently, Windows users need to manually create a desktop shortcut.

This PR creates a desktop shortcut during the installation process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants