sylpheed-setup.iss.in 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. ; Script generated by the Inno Setup Script Wizard.
  2. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  3. [Setup]
  4. AppName=Sylpheed-Claws
  5. AppVerName=Sylpheed-@VERSION@ Win32
  6. AppPublisher=The friendly Sylpheed hackers
  7. AppPublisherURL=http://claws-w32.sourceforge.net
  8. AppSupportURL=http://claws-w32.sourceforge.net
  9. AppUpdatesURL=http://claws-w32.sourceforge.net
  10. DefaultDirName={code:GetInstalledDir}
  11. DefaultGroupName=Sylpheed-Claws
  12. AllowNoIcons=yes
  13. ;AlwaysCreateUninstallIcon=yes
  14. LicenseFile=@PAKDIR@\doc\COPYING
  15. InfoAfterFile=@PAKDIR@\doc\README
  16. ; uncomment the following line if you want your installation to run on NT 3.51 too.
  17. ; MinVersion=4,3.51
  18. DisableStartupPrompt =yes
  19. OutputBaseFilename =sylpheed-@VERSION@
  20. ;Compression=none
  21. Compression=bzip/9
  22. [Types]
  23. Name: "full"; Description: "Full installation"
  24. Name: "compact"; Description: "Compact installation"
  25. Name: "custom"; Description: "Custom installation"; Flags: iscustom;
  26. [Components]
  27. Name: "main"; Description: "Sylpheed program files"; Types: full compact custom; Flags: fixed;
  28. Name: "settings"; Description: "Sylpheed registry settings"; Types: full compact custom;
  29. Name: "help"; Description: "Sylpheed help files"; Types: full custom;
  30. Name: "themes"; Description: "Sylpheed theme pack"; Types: full;
  31. Name: "gtk"; Description: "Gtk+ libraries (customized build, v1.3 + v2.0)"; Types: full compact custom;
  32. [Tasks]
  33. Name: "sendtoicon"; Description: "Create a &send-to link"; GroupDescription: "Additional icons:"
  34. Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
  35. Name: "quicklaunchicon"; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional icons:";
  36. Name: "reg_sylpheed"; Description: "Create Sylpheed &registry key (recommended)"; GroupDescription: "Registry settings:"; Components: settings;
  37. Name: "reg_defaultmailer"; Description: "Set Sylpheed default &mailer for mailto: links"; GroupDescription: "Registry settings:"; Components: settings;
  38. [Files]
  39. Source: "@PAKDIR@\bin\sylpheed.exe"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  40. Source: "@PAKDIR@\bin\sylpheed.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  41. Source: "@PAKDIR@\bin\fnmatch.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  42. Source: "@PAKDIR@\bin\libcompface.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  43. Source: "@PAKDIR@\bin\regex.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  44. Source: "@PAKDIR@\bin\w32lib.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  45. Source: "@PAKDIR@\bin\iconv.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  46. Source: "@PAKDIR@\bin\crypt.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  47. Source: "@PAKDIR@\bin\pthreadVC.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  48. Source: "@PAKDIR@\bin\gspawn-win32-helper.exe"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  49. Source: "@PAKDIR@\bin\libgthread-2.0-0.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  50. Source: "@PAKDIR@\bin\libgdk-0.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  51. Source: "@PAKDIR@\bin\libglib-2.0-0.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  52. Source: "@PAKDIR@\bin\libgmodule-2.0-0.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  53. Source: "@PAKDIR@\bin\libgobject-2.0-0.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  54. Source: "@PAKDIR@\bin\libgtk-0.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  55. Source: "@PAKDIR@\bin\intl.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  56. Source: "@PAKDIR@\bin\asprintf.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  57. Source: "@PAKDIR@\bin\charset.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: gtk
  58. Source: "@PAKDIR@\Readme.html"; DestDir: "{app}"; CopyMode: alwaysoverwrite
  59. Source: "@PAKDIR@\Readme.txt"; DestDir: "{app}"; CopyMode: alwaysoverwrite
  60. Source: "@PAKDIR@\doc\*.*"; DestDir: "{app}\doc"; CopyMode: alwaysoverwrite
  61. Source: "@PAKDIR@\doc\faq\*.*"; DestDir: "{app}\doc\faq"; CopyMode: alwaysoverwrite; Flags: recursesubdirs; Components: help
  62. Source: "@PAKDIR@\doc\manual\*.*"; DestDir: "{app}\doc\manual"; CopyMode: alwaysoverwrite; Flags: recursesubdirs; Components: help
  63. Source: "@PAKDIR@\etc\*.*"; DestDir: "{app}\etc"; CopyMode: alwaysoverwrite; Flags: recursesubdirs
  64. Source: "@PAKDIR@\locale\*.*"; DestDir: "{app}\locale"; CopyMode: alwaysoverwrite; Flags: recursesubdirs
  65. Source: "@PAKDIR@\themes\*.*"; DestDir: "{app}\themes"; CopyMode: alwaysoverwrite; Flags: recursesubdirs; Components: themes
  66. Source: "@PAKDIR@\openssl\*.*"; DestDir: "{app}\openssl"; CopyMode: alwaysoverwrite; Flags: recursesubdirs
  67. ; Claws specific
  68. Source: "@PAKDIR@\bin\libeay32.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  69. Source: "@PAKDIR@\bin\ssleay32.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  70. Source: "@PAKDIR@\bin\openssl.exe"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite;
  71. ; Plugins
  72. Source: "@PAKDIR@\bin\plugins\demo.dll"; DestDir: "{app}\bin\plugins"; CopyMode: alwaysoverwrite;
  73. Source: "@PAKDIR@\bin\plugins\spamassassin.dll"; DestDir: "{app}\bin\plugins"; CopyMode: alwaysoverwrite;
  74. Source: "@PAKDIR@\bin\plugins\spamassassin_gtk.dll"; DestDir: "{app}\bin\plugins"; CopyMode: alwaysoverwrite;
  75. [INI]
  76. Filename: "{app}\doc\gtk-w32.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.gimp.org/~tml/gimp/win32/"
  77. Filename: "{app}\doc\sylpheed.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://sylpheed.good-day.net"
  78. Filename: "{app}\doc\sylpheed-w32-en.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://claws-w32.sf.net"
  79. Filename: "{app}\doc\sylpheed-w32-jp.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www2.odn.ne.jp/munesato/sylpheed"
  80. Filename: "{app}\doc\sylpheed-claws.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://sylpheed-claws.sf.net"
  81. Filename: "{app}\doc\claws-sf-project.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://sf.net/projects/sylpheed-claws"
  82. Filename: "{app}\doc\claws-cvs.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://cvs.sf.net/cgi-bin/viewcvs.cgi/sylpheed-claws/sylpheed-claws/"
  83. Filename: "{app}\doc\claws-cvs-w32.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://cvs.sf.net/cgi-bin/viewcvs.cgi/sylpheed-claws/sylpheed-claws/?only_with_tag=win32"
  84. Filename: "{app}\doc\claws-patches.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.thewildbeast.co.uk/sylpheed/"
  85. [Icons]
  86. Name: "{sendto}\Sylpheed-Claws"; Filename: "{app}\bin\sylpheed.exe"; Parameters: "--attach"; WorkingDir: "{app}\bin"; MinVersion: 4,4; Tasks: sendtoicon
  87. Name: "{userdesktop}\Sylpheed-Claws"; Filename: "{app}\bin\sylpheed.exe"; WorkingDir: "{app}\bin"; MinVersion: 4,4; Tasks: desktopicon
  88. Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Sylpheed-Claws"; Filename: "{app}\bin\sylpheed.exe"; WorkingDir: "{app}\bin"; MinVersion: 4,4; Tasks: quicklaunchicon
  89. Name: "{group}\Sylpheed-Claws"; Filename: "{app}\bin\sylpheed.exe"; WorkingDir: "{app}\bin"
  90. Name: "{group}\Uninstall Sylpheed for Win32"; Filename: "{uninstallexe}"
  91. Name: "{group}\Win32-Readme (html)"; Filename: "{app}\Readme.html";
  92. Name: "{group}\Win32-Readme (text)"; Filename: "{app}\Readme.txt";
  93. Name: "{group}\Sylpheed-FAQ"; Filename: "{app}\doc\faq\en\sylpheed-faq.html"; Components: help;
  94. Name: "{group}\Sylpheed-Manual"; Filename: "{app}\doc\manual\en\sylpheed.html"; Components: help;
  95. Name: "{group}\links\Sylpheed"; Filename: "{app}\doc\sylpheed.url"
  96. Name: "{group}\links\Sylpheed (Win32) english"; Filename: "{app}\doc\sylpheed-w32-en.url"
  97. Name: "{group}\links\Sylpheed (Win32) japanese"; Filename: "{app}\doc\sylpheed-w32-jp.url"
  98. Name: "{group}\links\Gtk+ for Win32"; Filename: "{app}\doc\gtk-w32.url"
  99. Name: "{group}\links\Sylpheed-Claws"; Filename: "{app}\doc\sylpheed-claws.url"
  100. Name: "{group}\links\Sylpheed-Claws (Win32)"; Filename: "{app}\doc\sylpheed-claws-w32.url"
  101. Name: "{group}\links\Sylpheed-Claws SourceForge project"; Filename: "{app}\doc\claws-sf-project.url"
  102. Name: "{group}\links\Sylpheed-Claws CVS tree"; Filename: "{app}\doc\claws-cvs.url"
  103. Name: "{group}\links\Sylpheed-Claws CVS tree (Win32)"; Filename: "{app}\doc\claws-cvs-w32.url"
  104. Name: "{group}\links\Sylpheed-patches"; Filename: "{app}\doc\claws-patches.url"
  105. [Registry]
  106. Root: HKCU; Subkey: "Software\Sylpheed"; Flags: uninsdeletekeyifempty; Tasks: reg_sylpheed
  107. Root: HKCU; Subkey: "Software\Sylpheed"; ValueType: string; ValueName: "InstalledDir"; ValueData: "{app}"; Tasks: reg_sylpheed
  108. Root: HKCU; Subkey: "Software\Sylpheed"; ValueType: string; ValueName: "HomeDir"; ValueData: "{code:GetHomeDir}"; Tasks: reg_sylpheed
  109. Root: HKCU; Subkey: "Software\Sylpheed"; ValueType: dword; ValueName: "MajorVersion"; ValueData: "@MAJOR_VERSION@"; Flags: uninsdeletekey
  110. Root: HKCU; Subkey: "Software\Sylpheed"; ValueType: dword; ValueName: "MinorVersion"; ValueData: "@MINOR_VERSION@"; Flags: uninsdeletekey
  111. Root: HKCU; Subkey: "Software\Sylpheed"; ValueType: dword; ValueName: "MicroVersion"; ValueData: "@MICRO_VERSION@"; Flags: uninsdeletekey
  112. Root: HKCU; Subkey: "Software\Sylpheed"; ValueType: string; ValueName: "UninstallString"; ValueData: "{uninstallexe}"; Flags: uninsdeletekey
  113. Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\Sylpheed.exe"; Flags: uninsdeletekey; Tasks: reg_sylpheed
  114. Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\Sylpheed_d.exe"; Flags: uninsdeletekey; Tasks: reg_sylpheed
  115. Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\Sylpheed.exe"; ValueType: string; ValueName: "{app}\bin\Sylpheed.exe"; ValueData: "{app}\bin\Sylpheed.exe"; Tasks: reg_sylpheed
  116. Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\Sylpheed_d.exe"; ValueType: string; ValueName: "{app}\bin\Sylpheed_d.exe"; ValueData: "{app}\bin\Sylpheed.exe"; Tasks: reg_sylpheed
  117. Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\Sylpheed.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}\bin;{code:AspellDir};"; Tasks: reg_sylpheed
  118. Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\App Paths\Sylpheed_d.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}\bin;{code:AspellDir};"; Tasks: reg_sylpheed
  119. Root: HKCR; Subkey: "mailto"; Flags: uninsclearvalue; Tasks: reg_defaultmailer
  120. Root: HKCR; Subkey: "mailto"; ValueType: string; ValueName: ""; ValueData: "URL:MailTo-Protocol"; Flags: uninsclearvalue; Tasks: reg_defaultmailer
  121. Root: HKCR; Subkey: "mailto"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsclearvalue; Tasks: reg_defaultmailer
  122. Root: HKCR; Subkey: "mailto"; ValueType: binary; ValueName: "EditFlags"; ValueData: "02 00 00 00"; Flags: uninsclearvalue; Tasks: reg_defaultmailer
  123. Root: HKCR; Subkey: "mailto\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\sylpheed.exe,0"; Flags: uninsclearvalue; Tasks: reg_defaultmailer
  124. Root: HKCR; Subkey: "mailto\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\sylpheed.exe --compose ""%1"""; Flags: uninsclearvalue; Tasks: reg_defaultmailer
  125. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed"; Flags: uninsdeletekey; Tasks: reg_defaultmailer
  126. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail"; ValueType: string; ValueName: ""; ValueData: "Sylpheed"; Tasks: reg_defaultmailer
  127. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed"; ValueType: string; ValueName: ""; ValueData: "Sylpheed"; Tasks: reg_defaultmailer
  128. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed"; ValueType: string; ValueName: "DLLPath"; ValueData: ""; Tasks: reg_defaultmailer
  129. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed\Protocols\mailto"; ValueType: string; ValueName: ""; ValueData: "URL:MailTo-Protokoll"; Tasks: reg_defaultmailer
  130. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed\Protocols\mailto"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Tasks: reg_defaultmailer
  131. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed\Protocols\mailto"; ValueType: binary; ValueName: "EditFlags"; ValueData: "02 00 00 00"; Tasks: reg_defaultmailer
  132. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed\Protocols\mailto\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\sylpheed.exe"; Tasks: reg_defaultmailer
  133. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed\Protocols\mailto\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\sylpheed.exe --compose ""%1"""; Tasks: reg_defaultmailer
  134. Root: HKLM; Subkey: "SOFTWARE\Clients\Mail\Sylpheed\shell\mailto\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\sylpheed.exe"; Tasks: reg_defaultmailer
  135. ;[Run]
  136. ;Filename: "{app}\bin\sylpheed.exe"; Description: "Launch Sylpheed-Claws"; Flags: nowait postinstall skipifsilent
  137. [UninstallDelete]
  138. Type: files; Name: "{app}\doc\sylpheed.url"
  139. Type: files; Name: "{app}\doc\sylpheed-w32-en.url"
  140. Type: files; Name: "{app}\doc\sylpheed-w32-jp.url"
  141. Type: files; Name: "{app}\doc\sylpheed-claws.url"
  142. Type: files; Name: "{app}\doc\claws-sf-project.url"
  143. Type: files; Name: "{app}\doc\claws-cvs.url"
  144. Type: files; Name: "{app}\doc\claws-cvs-w32.url"
  145. Type: files; Name: "{app}\doc\claws-patches.url"
  146. Type: files; Name: "{app}\doc\gtk-w32.url"
  147. Type: dirifempty; Name: "{app}\bin\"
  148. Type: dirifempty; Name: "{app}\doc\"
  149. Type: dirifempty; Name: "{app}"
  150. [Dirs]
  151. Name: {code:GetHomeDir}
  152. [Code]
  153. var
  154. SylpheedHomeDir : string;
  155. SylpheedInstalledDir : string;
  156. function GetHomeDir(default:string):string;
  157. begin
  158. { try to re-use last home dir }
  159. if SylpheedHomeDir = ''
  160. then RegQueryStringValue(HKCU, 'Software\Sylpheed', 'HomeDir', SylpheedHomeDir);
  161. { otherwise use application data folder }
  162. if (SylpheedHomeDir = '')
  163. then SylpheedHomeDir := ExpandConstant('{userappdata}');
  164. Result := SylpheedHomeDir ;
  165. end;
  166. function GetInstalledDir(dummydefault:string):string;
  167. begin
  168. { try to re-use last install dir }
  169. if SylpheedInstalledDir = ''
  170. then RegQueryStringValue(HKCU, 'Software\Sylpheed', 'InstalledDir', SylpheedInstalledDir);
  171. { otherwise use program files dir }
  172. if (SylpheedInstalledDir = '')
  173. then SylpheedInstalledDir := ExpandConstant('{pf}\Sylpheed-Claws');
  174. Result := SylpheedInstalledDir
  175. end;
  176. function SelectHomeDir(var home:string):boolean;
  177. begin
  178. ScriptDlgPageSetCaption('Select HOME directory');
  179. ScriptDlgPageSetSubCaption1('Where should the configuration an mailbox folders be stored?');
  180. ScriptDlgPageSetSubCaption2('(Read the Readme.txt on how to change this locations later)');
  181. ScriptDlgPageShowBackButton(true);
  182. Result := InputDir('', home);
  183. ScriptDlgPageClose(true);
  184. end;
  185. function SylpheedInstalled(var version,uninstallcmd:string):boolean;
  186. var maj,min,mic:Cardinal;
  187. begin
  188. Result := RegQueryDWordValue(HKCU, 'Software\Sylpheed', 'MajorVersion', maj)
  189. and RegQueryDWordValue(HKCU, 'Software\Sylpheed', 'MinorVersion', min)
  190. and RegQueryDWordValue(HKCU, 'Software\Sylpheed', 'MicroVersion', mic);
  191. RegQueryStringValue(HKCU, 'Software\Sylpheed', 'UninstallString', uninstallcmd)
  192. version:=IntToStr(maj)+'.'+IntToStr(min)+'.'+IntToStr(mic);
  193. end;
  194. function AspellDir(default:string):string;
  195. var dir:string;
  196. begin
  197. RegQueryStringValue(HKLM, 'Software\Aspell', '', dir)
  198. Result := dir;
  199. end;
  200. function AspellInstalled():boolean;
  201. begin
  202. Result:=AspellDir('')<>'';
  203. end;
  204. function GPGInstalled(var HomeDir,gpgProgram,InstalledDir:string):boolean;
  205. var
  206. HomeSet,
  207. InstSet,
  208. ProgSet:boolean;
  209. begin
  210. HomeSet := RegQueryStringValue(HKCU, 'Software\GNU\GNUPG', 'HomeDir', HomeDir);
  211. ProgSet := RegQueryStringValue(HKCU, 'Software\GNU\GNUPG', 'gpgProgram', gpgProgram);
  212. InstSet := RegQueryStringValue(HKCU, 'Software\GNU\GNUPG\HomeDir', 'InstalledDir', InstalledDir);
  213. if (not ProgSet)
  214. then
  215. begin
  216. ProgSet:=true;
  217. if InstSet
  218. then gpgProgram:=InstalledDir+'\gpg.exe'
  219. else if HomeSet
  220. then gpgProgram:=HomeDir+'\gpg.exe'
  221. else ProgSet := false;
  222. if ProgSet
  223. then RegWriteStringValue(HKCU, 'Software\GNU\GNUPG', 'gpgProgram', gpgProgram);
  224. end;
  225. Result := ProgSet;
  226. end;
  227. function InitializeSetup(): Boolean;
  228. var version,
  229. uninst :string;
  230. msgres,
  231. execres :integer;
  232. s1,s2,s3:string;
  233. begin
  234. Result:=true;
  235. GetInstalledDir('');
  236. GetHomeDir('');
  237. if SylpheedInstalled(version,uninst)
  238. then
  239. begin
  240. msgres:=MsgBox('Sylpheed-'+version+' is currently installed.'+#13#13
  241. +'Do you want to uninstall it first?.',
  242. mbError, MB_YESNOCANCEL);
  243. case msgres of
  244. IdYes: begin
  245. InstExec(uninst, '', '', true, true, SW_SHOWNORMAL, execres);
  246. Result:=InitializeSetup();
  247. end;
  248. IdCancel: Result:=false;
  249. IdNo: ;
  250. end;
  251. if Result and not GPGInstalled(s1,s2,s3)
  252. then if MsgBox('GPG was not found on your system.'+#13#13
  253. +'If you want to use encrypted mails,'+#13
  254. +'you should install GnuPG first.'+#13#13
  255. +'http://www.gnupg.org (original)'+#13
  256. +'http://www.nullify.org (patched)'+#13#13
  257. +'Do you want to abort?'+#13,
  258. mbError, MB_YESNO) = idNo
  259. then Result := true
  260. else Result := false;
  261. if Result and not AspellInstalled()
  262. then if MsgBox('Aspell was not found on your system.'+#13#13
  263. +'If you want to use spellchecking,'+#13
  264. +'you should download and install it first.'+#13#13
  265. +'GNU-Aspell/Win32'+#13
  266. +'http://aspell.net/win32'+#13#13
  267. +'Do you want to abort?'+#13,
  268. mbError, MB_YESNO) = idNo
  269. then Result:=true
  270. else Result:=false;
  271. end;
  272. end;
  273. const CR = #13 ;
  274. function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
  275. begin
  276. { also display chosen HOME directory }
  277. if MemoUserInfoInfo <> ''
  278. then Result := MemoUserInfoInfo + CR + CR ;
  279. Result := Result + MemoDirInfo + CR + CR
  280. + 'Home directory:' + CR
  281. + Space + SylpheedHomeDir + CR + CR;
  282. if MemoTypeInfo <> ''
  283. then Result := Result + MemoTypeInfo + CR + CR ;
  284. if MemoComponentsInfo <> ''
  285. then Result := Result + MemoComponentsInfo + CR + CR ;
  286. if MemoGroupInfo <> ''
  287. then Result := Result + MemoGroupInfo + CR + CR ;
  288. if MemoTasksInfo <> ''
  289. then Result := Result + MemoTasksInfo + CR + CR ;
  290. end;
  291. function NextButtonClick(CurPage: Integer): Boolean;
  292. begin
  293. { insert home-dir query between install-dir and components page }
  294. if CurPage = wpSelectDir
  295. then Result := SelectHomeDir(SylpheedHomeDir)
  296. else Result := true;
  297. end;
  298. function BackButtonClick(CurPage: Integer): Boolean;
  299. begin
  300. { insert home-dir query between install-dir and components page }
  301. if CurPage = wpSelectComponents
  302. then Result := not SelectHomeDir(SylpheedHomeDir)
  303. else Result := true;
  304. end;