View Single Post
  #10  
Unread 06-08-2005, 11:39 PM
taco-man's Avatar
taco-man taco-man is offline
EQ2MAP Updater Author
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 1,349
Default

here is the full details of what the installer does. this is the file i have created to make the installer using NSIS
Code:
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "EQ2MAP Updater"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "Nathan Lockett"
!define PRODUCT_WEB_SITE "http://maps.eq2interface.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\EQ2MAP_Updater.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\EQ2MAP_Updater.exe"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "EQ2MAP-Updater-1.0.0-Setup.exe"
InstallDir "$PROGRAMFILES\EQ2MAP Updater"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
  SetOutPath "$INSTDIR"
  SetOverwrite ifnewer
  File "EQ2MAP_Updater.exe"
  CreateDirectory "$SMPROGRAMS\EQ2MAP Updater"
  CreateShortCut "$SMPROGRAMS\EQ2MAP Updater\EQ2MAP Updater.lnk" "$INSTDIR\EQ2MAP_Updater.exe"
  CreateShortCut "$DESKTOP\EQ2MAP Updater.lnk" "$INSTDIR\EQ2MAP_Updater.exe"
  CreateShortCut "$SMPROGRAMS\EQ2MAP Updater\EQ2MAP Updater Test Server.lnk" "$INSTDIR\EQ2MAP_Updater.exe /testserver"
  File "stop_button.png"
  File "update_button.png"
  File "AxInterop.SHDocVw.dll"
  File "Interop.SHDocVw.dll"
SectionEnd

Section -AdditionalIcons
  WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  CreateShortCut "$SMPROGRAMS\EQ2MAP Updater\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
  CreateShortCut "$SMPROGRAMS\EQ2MAP Updater\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\EQ2MAP_Updater.exe"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\EQ2MAP_Updater.exe"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd


Function un.onUninstSuccess
  HideWindow
  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd

Function un.onInit
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
  Abort
FunctionEnd

Section Uninstall
  Delete "$INSTDIR\${PRODUCT_NAME}.url"
  Delete "$INSTDIR\uninst.exe"
  Delete "$INSTDIR\Interop.SHDocVw.dll"
  Delete "$INSTDIR\AxInterop.SHDocVw.dll"
  Delete "$INSTDIR\update_button.png"
  Delete "$INSTDIR\stop_button.png"
  Delete "$INSTDIR\EQ2MAP_Updater.exe"

  Delete "$SMPROGRAMS\EQ2MAP Updater\Uninstall.lnk"
  Delete "$SMPROGRAMS\EQ2MAP Updater\Website.lnk"
  Delete "$SMPROGRAMS\EQ2MAP Updater\EQ2MAP Updater Test Server.lnk"
  Delete "$DESKTOP\EQ2MAP Updater.lnk"
  Delete "$SMPROGRAMS\EQ2MAP Updater\EQ2MAP Updater.lnk"

  RMDir "$SMPROGRAMS\EQ2MAP Updater"
  RMDir "$INSTDIR"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd
__________________
EQ2MAP Updater Download
EQ2MAP Website
How to Install a custom interface
Reply With Quote