; Dragonlords Install Configuration File !include FontReg.nsh !include FontName.nsh Name "Dragonlords" BrandingText "Dragonlords Installer" OutFile "c:\dragon.exe" Icon "Setup.ico" ; Some default compiler settings (uncomment and change at will): ; SetCompress auto ; (can be off or force) ; SetDatablockOptimize on ; (can be off) ; CRCCheck on ; (can be off) ; AutoCloseWindow false ; (can be true for the window go away automatically at end) ; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable) ; SetDateSave off ; (can be on to have files restored to their orginal date) ;ShowInstDetails show ;ShowUninstDetails show ; *** License Screen *** LicenseText "You must agree to this license before installing." LicenseData "license.txt" InstallDir "$PROGRAMFILES\Dragonlords" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Dragonlords" "" ;DirShow show; (make this hide to not let the user change it) DirText "Select the directory to install Dragonlords in:" ; *** Begin Default install section *** Section "" ; (default section) SetOutPath "$INSTDIR" ; - Add files to be installed here File /r "files\*.*" ; - Setup the registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Dragonlords" "" "$INSTDIR" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Dragonlords" "DisplayName" "Dragonlords (remove only)" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Dragonlords" "UninstallString" '"$INSTDIR\uninst.exe"' ;WriteRegStr HKEY_CLASSES_ROOT ".sav\shell\open\command" "" "$INSTDIR\v3gui.exe" WriteRegStr HKEY_CLASSES_ROOT ".sav\DefaultIcon" "" "$INSTDIR\data\install\sav.ico" ;WriteRegStr HKEY_CLASSES_ROOT ".new\shell\open\command" "" "$INSTDIR\v3gui.exe" WriteRegStr HKEY_CLASSES_ROOT ".new\DefaultIcon" "" "$INSTDIR\data\install\new.ico" ;WriteRegStr HKEY_CLASSES_ROOT ".upg\shell\open\command" "" "$INSTDIR\v3gui.exe" WriteRegStr HKEY_CLASSES_ROOT ".upg\DefaultIcon" "" "$INSTDIR\data\install\upg.ico" ;WriteRegStr HKEY_CLASSES_ROOT ".shr\shell\open\command" "" "$INSTDIR\v3gui.exe" WriteRegStr HKEY_CLASSES_ROOT ".shr\DefaultIcon" "" "$INSTDIR\data\install\shr.ico" ; - Create shortcuts CreateShortCut "$DESKTOP\Dragonlords.lnk" "$INSTDIR\v3gui.exe" CreateDirectory "$SMPROGRAMS\Dragonlords" CreateShortCut "$SMPROGRAMS\Dragonlords\Dragonlords.lnk" "$INSTDIR\v3gui.exe" CreateShortCut "$DESKTOP\Dragonlords Rulebook.lnk" "$INSTDIR\data\install\Rulebook.doc" CreateShortCut "$SMPROGRAMS\Dragonlords\Rulebook.lnk" "$INSTDIR\data\install\Rulebook.doc" CreateShortCut "$SMPROGRAMS\Dragonlords\Tutorial.lnk" "$INSTDIR\data\install\tutorial.doc" CreateShortCut "$SMPROGRAMS\Dragonlords\Uninstall Dragonlords.lnk" "$INSTDIR\uninst.exe" CreateShortCut "$SMPROGRAMS\Dragonlords\WWW - Dragonlords Homepage.lnk" "http://www.lordsofconquest.com/dragon/" ; - Install the Font: StrCpy $FONT_DIR $INSTDIR\data\install\ CopyFiles /SILENT "$INSTDIR\data\install\v2dlx.ttf" "$WINDIR\Fonts" !insertmacro InstallTTFFont 'v2dlx.ttf' SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000 ; - Create the Uninstaller WriteUninstaller "$INSTDIR\uninst.exe" SectionEnd ; *** End Default install section*** ; *** Begin Uninstall Instructions *** Section Uninstall ; 1) Delete all shortcuts ;Delete "$INSTDIR\uninst.exe" Delete "$DESKTOP\Dragonlords.lnk" RMDir /r "$SMPROGRAMS\Dragonlords" ; 2) Delete the Registry Keys DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Dragonlords" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Dragonlords" DeleteRegKey HKEY_CLASSES_ROOT ".sav" DeleteRegKey HKEY_CLASSES_ROOT ".new" DeleteRegKey HKEY_CLASSES_ROOT ".upg" DeleteRegKey HKEY_CLASSES_ROOT ".shr" ; 3) Delete the install directry RMDir /r "$INSTDIR" SectionEnd ; *** End Uninstall Instructions *** ; eof