forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RocketChat#313 from alexbrazier/feature/startup
Run at startup option for Windows
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
!ifndef BUILD_UNINSTALLER | ||
Function AddToStartup | ||
CreateShortCut "$SMSTARTUP\Rocket.Chat+.lnk" "$INSTDIR\Rocket.Chat+.exe" "" | ||
FunctionEnd | ||
|
||
; Using the read me setting as an easy way to add an add to startup option | ||
!define MUI_FINISHPAGE_SHOWREADME | ||
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Run at startup" | ||
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION AddToStartup | ||
!endif | ||
|
||
!macro customInstall | ||
; Required as electron-builder does not provide a way to specify it as of version 11.2.4 | ||
WriteRegStr SHCTX "${UNINSTALL_REGISTRY_KEY}" "DisplayIcon" '"$INSTDIR\resources\build\icon.ico"' | ||
!macroend | ||
|
||
!macro customUnInstall | ||
Delete "$SMSTARTUP\Rocket.Chat+.lnk" | ||
!macroend |