diff options
| author | Anthony Lavado <anthony@lavado.ca> | 2019-10-16 02:01:26 -0400 |
|---|---|---|
| committer | Anthony Lavado <anthony@lavado.ca> | 2019-10-16 02:01:26 -0400 |
| commit | dc46620a81e65d63acf485e2bae5f1462772582a (patch) | |
| tree | 2c78774d948f1594e885a8f7a7d7c107d4052835 | |
| parent | f80343bf9dfa6d79df85b12cdd66d3602c269ebc (diff) | |
Automatically creates shortcuts for non-service installs
If the user is not installing as a service, then the installer creates a Start Menu shortcut, and a desktop shortcut. Commented out future shortcuts for a tray app.
| -rw-r--r-- | deployment/windows/jellyfin.nsi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/deployment/windows/jellyfin.nsi b/deployment/windows/jellyfin.nsi index 375c3cd79..55abaad74 100644 --- a/deployment/windows/jellyfin.nsi +++ b/deployment/windows/jellyfin.nsi @@ -22,6 +22,7 @@ ShowUninstDetails show Var _SERVICEACCOUNTTYPE_ Var _EXISTINGINSTALLATION_ Var _EXISTINGSERVICE_ + Var _MAKESHORTCUTS_ ; !ifdef x64 !define ARCH "x64" @@ -263,6 +264,16 @@ ${AndIf} $_INSTALLSERVICE_ == "Yes" ${EndIf} SectionEnd +Section "Create Shortcuts" CreateWinShortcuts + ${If} $_MAKESHORTCUTS_ == "Yes" + CreateDirectory "$SMPROGRAMS\Jellyfin Server" + CreateShortCut "$SMPROGRAMS\Jellyfin Server\Jellyfin (View Console).lnk" "$INSTDIR\jellyfin.exe" + ;CreateShortCut "$SMPROGRAMS\Jellyfin Server\Jellyfin Tray App.lnk" "$INSTDIR\jellyfin-tray.exe" + CreateShortCut "$DESKTOP\Jellyfin Server.lnk" "$INSTDIR\jellyfin.exe" + ;CreateShortCut "$DESKTOP\Jellyfin Server\Jellyfin Server.lnk" "$INSTDIR\jellyfin-tray.exe" + ${EndIf} +SectionEnd + ;-------------------------------- ;Descriptions @@ -334,6 +345,7 @@ Function .onInit StrCpy $_SERVICEACCOUNTTYPE_ "NetworkService" StrCpy $_EXISTINGINSTALLATION_ "No" StrCpy $_EXISTINGSERVICE_ "No" + StrCpy $_MAKESHORTCUTS_ "No" SetShellVarContext current StrCpy $_JELLYFINDATADIR_ "$%ProgramData%\Jellyfin\Server" @@ -468,6 +480,8 @@ ${If} $BasicInstall == 1 StrCpy $_INSTALLSERVICE_ "No" StrCpy $_SERVICESTART_ "No" StrCpy $_SERVICEACCOUNTTYPE_ "None" + StrCpy $_MAKESHORTCUTS_ "Yes" + ${Else} StrCpy $_SETUPTYPE_ "Advanced" StrCpy $_INSTALLSERVICE_ "Yes" |
