| 1 | ;NSIS Modern User Interface version 1.70
|
|---|
| 2 |
|
|---|
| 3 | ;--------------------------------
|
|---|
| 4 | ;Include Modern UI
|
|---|
| 5 |
|
|---|
| 6 | !include "MUI.nsh"
|
|---|
| 7 |
|
|---|
| 8 | ;--------------------------------
|
|---|
| 9 | ;General
|
|---|
| 10 |
|
|---|
| 11 | !define VERSION "2.9.1"
|
|---|
| 12 | !define TITLE "SunriseChat"
|
|---|
| 13 | !define FULL_TITLE "SunriseChat"
|
|---|
| 14 | !define CREATOR "Chronosoft"
|
|---|
| 15 | !define CHANGELOG_FILE "Novinky.txt"
|
|---|
| 16 |
|
|---|
| 17 | ;Name and file
|
|---|
| 18 | Name "${FULL_TITLE} ${VERSION}"
|
|---|
| 19 | OutFile "Instalace${TITLE}-${VERSION}.exe"
|
|---|
| 20 |
|
|---|
| 21 | ;Default installation folder
|
|---|
| 22 | InstallDir "$PROGRAMFILES\${FULL_TITLE}\"
|
|---|
| 23 |
|
|---|
| 24 | ;Get installation folder from registry if available
|
|---|
| 25 | InstallDirRegKey HKCU "Software\${CREATOR}\${FULL_TITLE}" ""
|
|---|
| 26 |
|
|---|
| 27 | ;--------------------------------
|
|---|
| 28 | ;Interface Settings
|
|---|
| 29 |
|
|---|
| 30 | !define MUI_ABORTWARNING
|
|---|
| 31 |
|
|---|
| 32 | ;--------------------------------
|
|---|
| 33 | ;Language Selection Dialog Settings
|
|---|
| 34 |
|
|---|
| 35 | ;Remember the installer language
|
|---|
| 36 | !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
|
|---|
| 37 | !define MUI_LANGDLL_REGISTRY_KEY "Software\${CREATOR}\${FULL_TITLE}"
|
|---|
| 38 | !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
|
|---|
| 39 |
|
|---|
| 40 | ;--------------------------------
|
|---|
| 41 | ;Pages
|
|---|
| 42 |
|
|---|
| 43 | !define MUI_ICON "..\Resources\Icons\SunriseChat.ico"
|
|---|
| 44 | !define MUI_UNICON "..\Resources\Icons\SunriseChat.ico"
|
|---|
| 45 | ;!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
|---|
| 46 |
|
|---|
| 47 | !insertmacro MUI_PAGE_WELCOME
|
|---|
| 48 | ;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
|
|---|
| 49 | !insertmacro MUI_PAGE_COMPONENTS
|
|---|
| 50 | !insertmacro MUI_PAGE_DIRECTORY
|
|---|
| 51 | !insertmacro MUI_PAGE_INSTFILES
|
|---|
| 52 |
|
|---|
| 53 | !insertmacro MUI_UNPAGE_CONFIRM
|
|---|
| 54 | !insertmacro MUI_UNPAGE_INSTFILES
|
|---|
| 55 |
|
|---|
| 56 | ;--------------------------------
|
|---|
| 57 | ;Languages
|
|---|
| 58 |
|
|---|
| 59 | !insertmacro MUI_LANGUAGE "English"
|
|---|
| 60 | !insertmacro MUI_LANGUAGE "Czech"
|
|---|
| 61 |
|
|---|
| 62 | ;--------------------------------
|
|---|
| 63 | ;Reserve Files
|
|---|
| 64 |
|
|---|
| 65 | ;These files should be inserted before other files in the data block
|
|---|
| 66 | ;Keep these lines before any File command
|
|---|
| 67 | ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
|
|---|
| 68 |
|
|---|
| 69 | !insertmacro MUI_RESERVEFILE_LANGDLL
|
|---|
| 70 |
|
|---|
| 71 | ;--------------------------------
|
|---|
| 72 | ;Installer Sections
|
|---|
| 73 |
|
|---|
| 74 | Section "Nutné součásti" Nutne
|
|---|
| 75 |
|
|---|
| 76 | SectionIn RO
|
|---|
| 77 |
|
|---|
| 78 | ; Write the uninstall keys for Windows
|
|---|
| 79 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "DisplayName" "${FULL_TITLE}"
|
|---|
| 80 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
|---|
| 81 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoModify" 1
|
|---|
| 82 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoRepair" 1
|
|---|
| 83 |
|
|---|
| 84 | SetOutPath "$INSTDIR"
|
|---|
| 85 |
|
|---|
| 86 | ;ADD YOUR OWN FILES HERE...
|
|---|
| 87 | File "..\_Latest\SunriseChat.exe"
|
|---|
| 88 | File "..\_Latest\SunriseChat.map"
|
|---|
| 89 | File "..\_Latest\Network.cfg"
|
|---|
| 90 | File "..\_Latest\Horse.avi"
|
|---|
| 91 | File "..\${CHANGELOG_FILE}"
|
|---|
| 92 | File "..\Resources\Icons\Envelope.ico"
|
|---|
| 93 |
|
|---|
| 94 | ;Language files
|
|---|
| 95 | File "..\_Latest\Czech.lng"
|
|---|
| 96 | File "..\_Latest\English.lng"
|
|---|
| 97 |
|
|---|
| 98 | ;Store installation folder
|
|---|
| 99 | WriteRegStr HKCU "Software\${CREATOR}\${TITLE}" "" $INSTDIR
|
|---|
| 100 |
|
|---|
| 101 | ;Create uninstaller
|
|---|
| 102 | WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|---|
| 103 |
|
|---|
| 104 | SectionEnd
|
|---|
| 105 |
|
|---|
| 106 | Section "Přidat do nabídky Start"
|
|---|
| 107 |
|
|---|
| 108 | CreateDirectory "$SMPROGRAMS\${FULL_TITLE}"
|
|---|
| 109 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
|---|
| 110 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\${FULL_TITLE}.lnk" "$INSTDIR\${TITLE}.exe"
|
|---|
| 111 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\${CHANGELOG_FILE}" "$INSTDIR\${CHANGELOG_FILE}"
|
|---|
| 112 |
|
|---|
| 113 | SectionEnd
|
|---|
| 114 |
|
|---|
| 115 | Section "Umístit ikonu na plochu"
|
|---|
| 116 |
|
|---|
| 117 | CreateShortCut "$DESKTOP\${FULL_TITLE}.lnk" "$INSTDIR\${TITLE}.exe"
|
|---|
| 118 |
|
|---|
| 119 | SectionEnd
|
|---|
| 120 |
|
|---|
| 121 | Section "Zobrazit informace"
|
|---|
| 122 |
|
|---|
| 123 | ExecShell "open" "${CHANGELOG_FILE}"
|
|---|
| 124 |
|
|---|
| 125 | SectionEnd
|
|---|
| 126 |
|
|---|
| 127 | Section "Kopírovat zvuky"
|
|---|
| 128 |
|
|---|
| 129 | SetOutPath "$INSTDIR\Sounds"
|
|---|
| 130 |
|
|---|
| 131 | File "..\Resources\Sounds\*.*"
|
|---|
| 132 |
|
|---|
| 133 | SectionEnd
|
|---|
| 134 |
|
|---|
| 135 | Section "Kopírovat obrázky"
|
|---|
| 136 |
|
|---|
| 137 | ; SetOutPath "$INSTDIR\Images"
|
|---|
| 138 |
|
|---|
| 139 | ; File "..\Resources\Images\*.*"
|
|---|
| 140 |
|
|---|
| 141 | SetOutPath "$INSTDIR\Smileys"
|
|---|
| 142 |
|
|---|
| 143 | File /r "..\Resources\Images\Smileys\SunriseChat (sunrisechat.zdechov.net)\*.*"
|
|---|
| 144 |
|
|---|
| 145 | SectionEnd
|
|---|
| 146 |
|
|---|
| 147 | ;--------------------------------
|
|---|
| 148 | ;Installer Functions
|
|---|
| 149 |
|
|---|
| 150 | Function .onInit
|
|---|
| 151 |
|
|---|
| 152 | !insertmacro MUI_LANGDLL_DISPLAY
|
|---|
| 153 |
|
|---|
| 154 | FunctionEnd
|
|---|
| 155 |
|
|---|
| 156 | ;--------------------------------
|
|---|
| 157 | ;Descriptions
|
|---|
| 158 |
|
|---|
| 159 | ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
|
|---|
| 160 |
|
|---|
| 161 | ;Assign descriptions to sections
|
|---|
| 162 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|---|
| 163 | !insertmacro MUI_DESCRIPTION_TEXT ${Nutne} "Vyberte potřebné součásti."
|
|---|
| 164 | !insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|---|
| 165 |
|
|---|
| 166 |
|
|---|
| 167 | ;--------------------------------
|
|---|
| 168 | ;Uninstaller Section
|
|---|
| 169 |
|
|---|
| 170 | Section "Uninstall"
|
|---|
| 171 |
|
|---|
| 172 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}"
|
|---|
| 173 |
|
|---|
| 174 | Delete "$DESKTOP\${TITLE}.lnk"
|
|---|
| 175 |
|
|---|
| 176 | RMDir /r "$SMPROGRAMS\${FULL_TITLE}"
|
|---|
| 177 | RMDir /r "$INSTDIR"
|
|---|
| 178 |
|
|---|
| 179 |
|
|---|
| 180 | DeleteRegKey /ifempty HKCU "Software\${CREATOR}\${FULL_TITLE}"
|
|---|
| 181 |
|
|---|
| 182 | SectionEnd
|
|---|
| 183 |
|
|---|
| 184 | ;--------------------------------
|
|---|
| 185 | ;Uninstaller Functions
|
|---|
| 186 |
|
|---|
| 187 | Function un.onInit
|
|---|
| 188 |
|
|---|
| 189 | !insertmacro MUI_UNGETLANGUAGE
|
|---|
| 190 |
|
|---|
| 191 | FunctionEnd
|
|---|