1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 3054

Show
Ignore:
Timestamp:
05/10/09 20:58:25 (4 years ago)
Author:
matysek03
Message:

win32 installer - add quicklaunch shortcut, possibility change current/all users

Location:
trunk/win32/nsis
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/win32/nsis/ChangeLog

    r3053 r3054  
     12009-02-18  matysek <matysek03@users.sf.net> 
     2 
     3        * added quick launch icon 
     4        * added possibility to install shortcuts for all/current user 
     5 
    162009-02-18  matysek <matysek03@users.sf.net> 
    27 
  • trunk/win32/nsis/installer.nsi

    r3053 r3054  
    187187    !insertmacro MUI_PAGE_LICENSE \ 
    188188        $(LICENSE_FILE) ; defined in language file 
    189     ;!insertmacro MUI_PAGE_COMPONENTS 
     189    !insertmacro MUI_PAGE_COMPONENTS 
    190190    !insertmacro MUI_PAGE_DIRECTORY 
    191191    !insertmacro MUI_PAGE_INSTFILES 
    192192 
    193     !insertmacro MUI_PAGE_STARTMENU Application $StartMenuDir 
     193    ;!insertmacro MUI_PAGE_STARTMENU Application $StartMenuDir 
    194194 
    195195    ; page with release notes 
     
    243243; Section is like one component 
    244244Section $(CORE_SEC_TITLE) SecCore 
    245  
    246     ; shortcuts will be installed for all users - Desktop/Startmenu 
    247     ; and Sword data files will be also installed for all users 
    248     SetShellVarContext all 
    249  
    250245 
    251246    ; Install fonts 
     
    293288    !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
    294289 
    295     ; Install Sword files 
     290    ; Sword data files need to be installed for all users 
     291    SetShellVarContext all 
     292    ; Install Sword files - not needed to uninstall 
    296293    SetOutPath '$APPDATA\${INSTPATH_SWORD}' 
    297294    File /r "${SWORD_F}" 
    298  
    299     ; startmenu/shortcuts 
    300  
    301     !define STM_DIR "$SMPROGRAMS\$StartMenuDir" 
    302  
    303     !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 
    304         ;Create shortcuts 
    305         CreateDirectory '${STM_DIR}' 
    306         CreateShortCut '${STM_DIR}\${APP_NAME}.lnk' '$INSTDIR\bin\${APP_BINARY_NAME}' 
    307         CreateShortCut '${STM_DIR}\Uninstall.lnk' '${UNINST_EXE}' 
    308         ; utils.bat and EN help file 
    309         CreateShortCut '${STM_DIR}\Utils.lnk' '$INSTDIR\bin\utils.bat' 
    310         CreateShortCut '${STM_DIR}\Help.lnk' '$INSTDIR\share\help\C\xiphos.chm' 
    311     !insertmacro MUI_STARTMENU_WRITE_END 
    312  
    313     ; Desktop shortcuts 
    314     CreateShortCut '$DESKTOP\${APP_NAME}.lnk' '$INSTDIR\bin\${APP_BINARY_NAME}' 
     295    ; set to default value  
     296    SetShellVarContext current 
    315297 
    316298    ; Add uninstall information to Add/Remove Programs 
     
    340322 
    341323;-------------------------------- 
     324; Other Sections Section 
     325 
     326Section "Install for All Users" 
     327    ; shortcuts will be installed for all users - Desktop/Startmenu/Quick launch 
     328    SetShellVarContext all 
     329SectionEnd 
     330 
     331Section "Start Menu Shortcuts" 
     332    ; startmenu/shortcuts 
     333    !define STM_DIR "$SMPROGRAMS\${APP_NAME}" 
     334 
     335    ; Create shortcuts 
     336    CreateDirectory '${STM_DIR}' 
     337    CreateShortCut '${STM_DIR}\Uninstall.lnk' '${UNINST_EXE}' 
     338    CreateShortCut '${STM_DIR}\Xiphos Help.lnk' '$INSTDIR\share\help\C\xiphos.chm' 
     339    CreateShortCut '${STM_DIR}\Utils.lnk' '$INSTDIR\bin\utils.bat' 
     340    CreateShortCut '${STM_DIR}\${APP_NAME}.lnk' '$INSTDIR\bin\${APP_BINARY_NAME}' 
     341SectionEnd 
     342  
     343Section "Desktop Shortcut" 
     344    CreateShortCut '$DESKTOP\${APP_NAME}.lnk' '$INSTDIR\bin\${APP_BINARY_NAME}' 
     345SectionEnd 
     346 
     347Section "Quick Launch Icon" 
     348    CreateShortCut '$QUICKLAUNCH\${APP_NAME}.lnk' '$INSTDIR\bin\${APP_BINARY_NAME}' 
     349SectionEnd 
     350 
     351;-------------------------------- 
    342352; Installer Functions 
    343353 
     
    368378 
    369379Section Uninstall 
    370  
    371     ; uninstall shortcuts for all users - Desktop/Startmenu 
    372     SetShellVarContext all 
    373380 
    374381    ; Hack to speed up uninstaller 
     
    391398    RMDir "$PROGRAMFILES\CrossWire" 
    392399 
    393     !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuDir 
    394     !define ST_MENU "$SMPROGRAMS\$StartMenuDir" 
    395  
     400 
     401    ;----------------------------------- 
     402    ; Uninstall shortcuts for all susers 
     403 
     404    ; uninstall shortcuts for all users - Desktop/Startmenu 
     405    SetShellVarContext all 
     406 
     407    !define ST_MENU "$SMPROGRAMS\${APP_NAME}" 
     408 
     409    ; remove Startmenu 
    396410    Delete "${ST_MENU}\${APP_NAME}.lnk" 
    397411    Delete "${ST_MENU}\Uninstall.lnk" 
    398412    Delete "${ST_MENU}\Utils.lnk" 
    399     Delete "${ST_MENU}\Help.lnk" 
     413    Delete "${ST_MENU}\${APP_NAME} Help.lnk" 
    400414    RMDir "${ST_MENU}" 
     415 
     416    ; remove desktop icon 
    401417    Delete "$DESKTOP\${APP_NAME}.lnk" 
     418 
     419    ; remove Quick Launch icon 
     420    Delete "$QUICKLAUNCH\${APP_NAME}.lnk" 
     421 
     422    ;------------------------------------- 
     423    ; Uninstall shortcuts for current user 
     424 
     425    ; uninstall shortcuts for current user - Desktop/Startmenu 
     426    SetShellVarContext current 
     427 
     428    !define ST2_MENU "$SMPROGRAMS\${APP_NAME}" 
     429 
     430    ; remove Startmenu 
     431    Delete "${ST2_MENU}\${APP_NAME}.lnk" 
     432    Delete "${ST2_MENU}\Uninstall.lnk" 
     433    Delete "${ST2_MENU}\Utils.lnk" 
     434    Delete "${ST2_MENU}\${APP_NAME} Help.lnk" 
     435    RMDir "${ST2_MENU}" 
     436 
     437    ; remove desktop icon 
     438    Delete "$DESKTOP\${APP_NAME}.lnk" 
     439 
     440    ; remove Quick Launch icon 
     441    Delete "$QUICKLAUNCH\${APP_NAME}.lnk" 
     442 
    402443 
    403444    ; clean Windows Registry