;NSIS Modern User Interface version 1.70 ;-------------------------------- ;Include Modern UI !include "MUI.nsh" ;-------------------------------- ;General !define VERSION "3.4" !define TITLE "HeroesOfFantasyClient" !define FULL_TITLE "Heroes of Fantasy client" !define CREATOR "maronsoft" !define CHANGELOG_FILE "readme.txt" !define STARTER "HoFClient.exe" !define HELP_FILENAME "Hof Client.hlp" ;Name and file Name "${FULL_TITLE} ${VERSION}" OutFile "Instalace${TITLE}-${VERSION}.exe" ;Default installation folder InstallDir "$PROGRAMFILES\${CREATOR}\${FULL_TITLE}\" ;-------------------------------- ;Interface Settings !define MUI_ABORTWARNING ;-------------------------------- ;Language Selection Dialog Settings ;Remember the installer language !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" !define MUI_LANGDLL_REGISTRY_KEY "Software\${CREATOR}\${FULL_TITLE}" !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" ;-------------------------------- ;Pages !define MUI_ICON "..\trunk\image\Heroes.ico" !define MUI_UNICON "..\trunk\image\Heroes.ico" !insertmacro MUI_PAGE_WELCOME ;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "Czech" ;-------------------------------- ;Reserve Files ;These files should be inserted before other files in the data block ;Keep these lines before any File command ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA) !insertmacro MUI_RESERVEFILE_LANGDLL ;-------------------------------- ;Installer Sections Section "Nutné součásti" Nutne SectionIn RO ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "DisplayName" "${FULL_TITLE}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoRepair" 1 SetOutPath "$INSTDIR" ;ADD YOUR OWN FILES HERE... File "..\trunk\HoFclient.exe" File "${CHANGELOG_FILE}" File "..\trunk\image\Heroes.ico" SetOutPath "$INSTDIR\Fonts\" File "Fonts\*.*" ;Store installation folder WriteRegStr HKCU "Software\${CREATOR}\${TITLE}" "" $INSTDIR ;Create uninstaller WriteUninstaller "$INSTDIR\Uninstall.exe" SectionEnd Section "Přidat do nabídky Start" CreateDirectory "$SMPROGRAMS\${FULL_TITLE}" CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Uninstall.lnk" "$INSTDIR\uninstall.exe" CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\${FULL_TITLE}.lnk" "$INSTDIR\${STARTER}" "" "$INSTDIR\Heroes.ico" CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Readme.lnk" "$INSTDIR\${CHANGELOG_FILE}" CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Domovská stránka.lnk" "http://www.heroesoffantasy.cz/?page=client" "" "$INSTDIR\Heroes.ico" SectionEnd Section "Umístit ikonu na plochu" CreateShortCut "$DESKTOP\${FULL_TITLE}.lnk" "$INSTDIR\${STARTER}" "" "$INSTDIR\Heroes.ico" SectionEnd Section "Nápověda" SetOutPath "$INSTDIR" File "..\trunk\help\${HELP_FILENAME}" SectionEnd Section "Skiny" SetOutPath "$INSTDIR\Skiny\" File "Skiny\*.*" SectionEnd Section "Zvuky" SetOutPath "$INSTDIR\Sounds\" File "Sounds\*.*" SectionEnd Section "Zobrazit informace" ExecShell "open" "$INSTDIR\${CHANGELOG_FILE}" SectionEnd Section "Spustit clienta" ExecShell "open" "$INSTDIR\HoFclient.exe" SectionEnd ;-------------------------------- ;Installer Functions Function .onInit !insertmacro MUI_LANGDLL_DISPLAY FunctionEnd ;-------------------------------- ;Descriptions ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC ;Assign descriptions to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${Nutne} "Vyberte potřebné součásti." !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- ;Uninstaller Section Section "Uninstall" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" Delete "$DESKTOP\${TITLE}.lnk" RMDir /r "$SMPROGRAMS\${CREATOR}\${FULL_TITLE}" RMDir /r "$PROGRAMFILES\${CREATOR}\${FULL_TITLE}" DeleteRegKey /ifempty HKCU "Software\${CREATOR}\${FULL_TITLE}" SectionEnd ;-------------------------------- ;Uninstaller Functions Function un.onInit !insertmacro MUI_UNGETLANGUAGE FunctionEnd