Merge pull request #629 from kthchew/feature/desktop-shortcut
Add desktop shortcut to Windows installer
This commit is contained in:
commit
f19e27e875
@ -141,12 +141,18 @@ Section "PolyMC"
|
|||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Start Menu Shortcuts" SHORTCUTS
|
Section "Start Menu Shortcut" SM_SHORTCUTS
|
||||||
|
|
||||||
CreateShortcut "$SMPROGRAMS\PolyMC.lnk" "$INSTDIR\polymc.exe" "" "$INSTDIR\polymc.exe" 0
|
CreateShortcut "$SMPROGRAMS\PolyMC.lnk" "$INSTDIR\polymc.exe" "" "$INSTDIR\polymc.exe" 0
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Desktop Shortcut" DESKTOP_SHORTCUTS
|
||||||
|
|
||||||
|
CreateShortcut "$DESKTOP\PolyMC.lnk" "$INSTDIR\polymc.exe" "" "$INSTDIR\polymc.exe" 0
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
; Uninstaller
|
; Uninstaller
|
||||||
@ -215,6 +221,7 @@ Section "Uninstall"
|
|||||||
RMDir /r $INSTDIR\styles
|
RMDir /r $INSTDIR\styles
|
||||||
|
|
||||||
Delete "$SMPROGRAMS\PolyMC.lnk"
|
Delete "$SMPROGRAMS\PolyMC.lnk"
|
||||||
|
Delete "$DESKTOP\PolyMC.lnk"
|
||||||
|
|
||||||
RMDir "$INSTDIR"
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
@ -228,6 +235,7 @@ Function .onInit
|
|||||||
${GetParameters} $R0
|
${GetParameters} $R0
|
||||||
${GetOptions} $R0 "/NoShortcuts" $R1
|
${GetOptions} $R0 "/NoShortcuts" $R1
|
||||||
${IfNot} ${Errors}
|
${IfNot} ${Errors}
|
||||||
!insertmacro UnselectSection ${SHORTCUTS}
|
!insertmacro UnselectSection ${SM_SHORTCUTS}
|
||||||
|
!insertmacro UnselectSection ${DESKTOP_SHORTCUTS}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
Loading…
Reference in New Issue
Block a user