install.pas 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516
  1. {
  2. $Id$
  3. This file is part of Free Pascal
  4. Copyright (c) 1993-2000 by Florian Klaempfl
  5. member of the Free Pascal development team
  6. This is the install program for Free Pascal
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. program install;
  14. {$DEFINE FV} (* TH - added to make use of the original Turbo Vision possible. *)
  15. { $DEFINE DLL} (* TH - if defined, UNZIP32.DLL library is used to unpack. *)
  16. { $DEFINE DOSSTUB} (* TH - should _not_ be defined unless creating a bound DOS and OS/2 installer!!! *)
  17. (* Defining DOSSTUB causes adding a small piece of code *)
  18. (* for starting the OS/2 part from the DOS part of a bound *)
  19. (* application if running in OS/2 VDM (DOS) window. Used *)
  20. (* only if compiling with TP/BP (see conditionals below). *)
  21. {$IFDEF VER60}
  22. {$DEFINE TP}
  23. {$ENDIF}
  24. {$IFDEF VER70}
  25. {$DEFINE TP}
  26. {$ENDIF}
  27. {$IFNDEF TP}
  28. {$UNDEF DOSSTUB}
  29. {$ELSE}
  30. {$IFDEF OS2}
  31. {$UNDEF DOSSTUB}
  32. {$ENDIF}
  33. {$ENDIF}
  34. {$IFDEF OS2}
  35. {$UNDEF FV}
  36. {$IFDEF VIRTUALPASCAL}
  37. {$DEFINE DLL}
  38. {$ENDIF}
  39. {$ENDIF}
  40. {$IFDEF DPMI}
  41. {$UNDEF DOSSTUB}
  42. {$ENDIF}
  43. uses
  44. {$IFDEF OS2}
  45. {$IFDEF FPC}
  46. DosCalls,
  47. {$ELSE FPC}
  48. {$IFDEF VirtualPascal}
  49. OS2Base,
  50. {$ELSE VirtualPascal}
  51. BseDos,
  52. {$ENDIF VirtualPascal}
  53. {$ENDIF FPC}
  54. {$ENDIF OS2}
  55. {$IFDEF GO32V2}
  56. emu387,
  57. {$ENDIF}
  58. {$ifdef HEAPTRC}
  59. heaptrc,
  60. {$endif HEAPTRC}
  61. strings,dos,objects,drivers,
  62. {$IFDEF FV}
  63. commands,
  64. {$ENDIF}
  65. unzip,ziptypes,
  66. {$IFDEF DLL}
  67. unzipdll,
  68. {$ENDIF}
  69. app,dialogs,views,menus,msgbox,colortxt,tabs,inststr,scroll;
  70. const
  71. installerversion='1.02';
  72. {$ifdef TP}lfnsupport=false;{$endif}
  73. maxpacks=10;
  74. maxpackages=20;
  75. maxdefcfgs=1024;
  76. CfgExt = '.dat';
  77. MaxStatusPos = 4;
  78. StatusChars: string [MaxStatusPos] = '/-\|';
  79. StatusPos: byte = 1;
  80. {$IFDEF LINUX}
  81. DirSep='/';
  82. {$ELSE}
  83. {$IFDEF UNIX}
  84. DirSep='/';
  85. {$ELSE}
  86. DirSep='\';
  87. {$ENDIF}
  88. {$ENDIF}
  89. {$IFNDEF GO32V2}
  90. {$IFDEF GO32V1}
  91. LFNSupport = false;
  92. {$ELSE}
  93. {$IFDEF TP}
  94. LFNSupport = false;
  95. {$ELSE}
  96. LFNSupport = true;
  97. {$ENDIF}
  98. {$ENDIF}
  99. {$ENDIF}
  100. type
  101. tpackage=record
  102. name : string[60];
  103. zip : string[12];
  104. end;
  105. tpack=record
  106. name : string[12];
  107. binsub : string[40];
  108. ppc386 : string[20];
  109. defcfgfile : string[12];
  110. include : boolean;
  111. filechk : string[40];
  112. packages : longint;
  113. package : array[1..maxpackages] of tpackage;
  114. end;
  115. cfgrec=record
  116. title : string[80];
  117. version : string[20];
  118. language : string[30];
  119. basepath : DirStr;
  120. packs : word;
  121. pack : array[1..maxpacks] of tpack;
  122. defcfgs : longint;
  123. defcfg : array[1..maxdefcfgs] of pstring;
  124. end;
  125. datarec=packed record
  126. basepath : DirStr;
  127. cfgval : word;
  128. packmask : array[1..maxpacks] of word;
  129. end;
  130. punzipdialog=^tunzipdialog;
  131. tunzipdialog=object(tdialog)
  132. filetext : pstatictext;
  133. extractfiletext : pstatictext;
  134. constructor Init(var Bounds: TRect; ATitle: TTitleStr);
  135. procedure do_unzip(s,topath:string);
  136. end;
  137. penddialog = ^tenddialog;
  138. tenddialog = object(tdialog)
  139. constructor init;
  140. end;
  141. pinstalldialog = ^tinstalldialog;
  142. tinstalldialog = object(tdialog)
  143. constructor init;
  144. end;
  145. planguagedialog = ^tlanguagedialog;
  146. tlanguagedialog = object(tdialog)
  147. constructor init;
  148. end;
  149. tapp = object(tapplication)
  150. procedure initmenubar;virtual;
  151. procedure handleevent(var event : tevent);virtual;
  152. procedure do_installdialog;
  153. procedure do_languagedialog;
  154. procedure readcfg(const fn:string);
  155. procedure checkavailpack;
  156. end;
  157. {$IFDEF DOSSTUB}
  158. PByte = ^byte;
  159. PRunBlock = ^TRunBlock;
  160. TRunBlock = record
  161. Length: word;
  162. Dependent: word;
  163. Background: word;
  164. TraceLevel: word;
  165. PrgTitle: PChar;
  166. PrgName: PChar;
  167. Args: PChar;
  168. TermQ: longint;
  169. Environment: pointer;
  170. Inheritance: word;
  171. SesType: word;
  172. Icon: pointer;
  173. PgmHandle: longint;
  174. PgmControl: word;
  175. Column: word;
  176. Row: word;
  177. Width: word;
  178. Height: word;
  179. end;
  180. {$ENDIF}
  181. var
  182. installapp : tapp;
  183. startpath : string;
  184. successfull : boolean;
  185. cfg : cfgrec;
  186. data : datarec;
  187. CfgName: NameStr;
  188. DStr: DirStr;
  189. EStr: ExtStr;
  190. UnzDlg : punzipdialog;
  191. log : text;
  192. createlog : boolean;
  193. msgfile : string;
  194. {$IFNDEF DLL}
  195. const
  196. UnzipErr: longint = 0;
  197. {$ENDIF}
  198. {*****************************************************************************
  199. Helpers
  200. *****************************************************************************}
  201. procedure errorhalt;
  202. begin
  203. installapp.done;
  204. halt(1);
  205. end;
  206. function packagemask(i:longint):longint;
  207. begin
  208. packagemask:=1 shl (i-1);
  209. end;
  210. function upper(const s : string):string;
  211. var
  212. i : integer;
  213. begin
  214. for i:=1 to length(s) do
  215. if s[i] in ['a'..'z'] then
  216. upper[i]:=chr(ord(s[i])-32)
  217. else
  218. upper[i]:=s[i];
  219. upper[0]:=s[0];
  220. end;
  221. function Replace(var s:string;const s1,s2:string) : boolean;
  222. var
  223. i : longint;
  224. begin
  225. Replace:=false;
  226. repeat
  227. i:=pos(s1,s);
  228. if i>0 then
  229. begin
  230. Delete(s,i,length(s1));
  231. Insert(s2,s,i);
  232. Replace:=true;
  233. end;
  234. until i=0;
  235. end;
  236. function file_exists(const f : string;const path : string) : boolean;
  237. begin
  238. file_exists:=fsearch(f,path)<>'';
  239. end;
  240. function createdir(s:string):boolean;
  241. var
  242. s1,start : string;
  243. err : boolean;
  244. i : longint;
  245. begin
  246. err:=false;
  247. {$I-}
  248. getdir(0,start);
  249. {$ifndef linux}
  250. if (s[2]=':') and (s[3]=DirSep) then
  251. begin
  252. chdir(Copy(s,1,3));
  253. Delete(S,1,3);
  254. end;
  255. {$endif}
  256. repeat
  257. i:=Pos(DirSep,s);
  258. if i=0 then
  259. i:=255;
  260. s1:=Copy(s,1,i-1);
  261. Delete(s,1,i);
  262. ChDir(s1);
  263. if ioresult<>0 then
  264. begin
  265. mkdir(s1);
  266. chdir(s1);
  267. if ioresult<>0 then
  268. begin
  269. err:=true;
  270. break;
  271. end;
  272. end;
  273. until s='';
  274. chdir(start);
  275. {$I+}
  276. createdir:=err;
  277. end;
  278. function DiskSpaceN(const zipfile : string) : longint;
  279. var
  280. compressed,uncompressed : longint;
  281. s : string;
  282. begin
  283. s:=zipfile+#0;
  284. if not (IsZip (@S [1])) then DiskSpaceN := -1 else
  285. begin
  286. Uncompressed:=UnzipSize(@s[1],compressed);
  287. DiskSpaceN:=uncompressed shr 10;
  288. end;
  289. end;
  290. function diskspace(const zipfile : string) : string;
  291. var
  292. uncompressed : longint;
  293. s : string;
  294. begin
  295. uncompressed:=DiskSpaceN (zipfile);
  296. if Uncompressed = -1 then DiskSpace := str_invalid else
  297. begin
  298. str(uncompressed,s);
  299. diskspace:=' ('+s+' KB)';
  300. end;
  301. end;
  302. function createinstalldir(s : string) : boolean;
  303. var
  304. err : boolean;
  305. dir : searchrec;
  306. params : array[0..0] of pointer;
  307. begin
  308. if s[length(s)]=DirSep then
  309. dec(s[0]);
  310. FindFirst(s,AnyFile,dir);
  311. if doserror=0 then
  312. begin
  313. if Dir.Attr and Directory = 0 then
  314. begin
  315. messagebox(msg_problems_create_dir,nil,
  316. mferror+mfokbutton);
  317. createinstalldir:=false;
  318. end else
  319. createinstalldir:=messagebox(msg_install_dir_exists,nil,
  320. mferror+mfyesbutton+mfnobutton)=cmYes;
  321. exit;
  322. end;
  323. err:=Createdir(s);
  324. if err then
  325. begin
  326. params[0]:=@s;
  327. messagebox(msg_install_cant_be_created,
  328. @params,mferror+mfokbutton);
  329. createinstalldir:=false;
  330. exit;
  331. end;
  332. {$ifndef TP}
  333. {$IFNDEF OS2}
  334. FindClose (dir);
  335. {$ENDIF}
  336. {$endif}
  337. createinstalldir:=true;
  338. end;
  339. function GetProgDir: DirStr;
  340. var
  341. D: DirStr;
  342. N: NameStr;
  343. E: ExtStr;
  344. begin
  345. FSplit (FExpand (ParamStr (0)), D, N, E);
  346. if (D [0] <> #0) and (D [byte (D [0])] = '\') then Dec (D [0]);
  347. GetProgDir := D;
  348. end;
  349. {*****************************************************************************
  350. Writing of ppc386.cfg
  351. *****************************************************************************}
  352. procedure writedefcfg(const fn:string);
  353. var
  354. t : text;
  355. i : longint;
  356. s : string;
  357. dir : searchrec;
  358. params : array[0..0] of pointer;
  359. d : dirstr;
  360. n : namestr;
  361. e : extstr;
  362. begin
  363. { already exists }
  364. findfirst(fn,AnyFile,dir);
  365. if doserror=0 then
  366. begin
  367. params[0]:=@fn;
  368. if MessageBox(msg_overwrite_cfg,@params,
  369. mfinformation+mfyesbutton+mfnobutton)=cmNo then
  370. exit;
  371. end;
  372. { create directory }
  373. fsplit(fn,d,n,e);
  374. createdir(d);
  375. { create the ppc386.cfg }
  376. assign(t,fn);
  377. {$I-}
  378. rewrite(t);
  379. {$I+}
  380. if ioresult<>0 then
  381. begin
  382. params[0]:=@fn;
  383. MessageBox(msg_problems_writing_cfg,@params,mfinformation+mfokbutton);
  384. exit;
  385. end;
  386. for i:=1 to cfg.defcfgs do
  387. if assigned(cfg.defcfg[i]) then
  388. begin
  389. s:=cfg.defcfg[i]^;
  390. Replace(s,'$1',data.basepath);
  391. { error msg file entry? }
  392. if Replace(s,'$L',msgfile) then
  393. begin
  394. { if we've to set an error msg file, we }
  395. { write it else we discard the line }
  396. if msgfile<>'' then
  397. writeln(t,s);
  398. end
  399. else
  400. writeln(t,s);
  401. end
  402. else
  403. writeln(t,'');
  404. close(t);
  405. end;
  406. {*****************************************************************************
  407. TUnZipDialog
  408. *****************************************************************************}
  409. constructor tunzipdialog.Init(var Bounds: TRect; ATitle: TTitleStr);
  410. var
  411. r : trect;
  412. begin
  413. inherited init(bounds,atitle);
  414. (* R.Assign (11, 4, 38, 6);*)
  415. R.Assign (1, 4,bounds.B.X-Bounds.A.X-2, 6);
  416. filetext:=new(pstatictext,init(r,#3'File: '));
  417. insert(filetext);
  418. R.Assign (1, 7,bounds.B.X-Bounds.A.X-2, 9);
  419. extractfiletext:=new(pstatictext,init(r,#3' '));
  420. insert(extractfiletext);
  421. end;
  422. {$IFNDEF DLL}
  423. procedure UnzipCheckFn (Retcode: longint; Rec: pReportRec );{$ifdef Delphi32}STDCALL;{$endif}
  424. {$IFNDEF BIT32} FAR;{$ENDIF BIT32}
  425. var
  426. name : string;
  427. begin
  428. case Rec^.Status of
  429. unzip_starting:
  430. UnzipErr := 0;
  431. file_starting:
  432. begin
  433. with UnzDlg^.extractfiletext^ do
  434. begin
  435. Disposestr(text);
  436. name:=Strpas(Rec^.FileName);
  437. Text:=NewStr(#3+name);
  438. DrawView;
  439. end;
  440. end;
  441. file_failure: UnzipErr := RetCode;
  442. file_unzipping:
  443. begin
  444. with UnzDlg^.FileText^ do
  445. begin
  446. Inc (StatusPos);
  447. if StatusPos > MaxStatusPos then StatusPos := 1;
  448. Text^ [Length (Text^)] := StatusChars [StatusPos];
  449. DrawView;
  450. end;
  451. end;
  452. end;
  453. end;
  454. {$ENDIF}
  455. procedure tunzipdialog.do_unzip(s,topath : string);
  456. var
  457. again : boolean;
  458. fn,dir,wild : string;
  459. Cnt: integer;
  460. params : array[0..0] of pointer;
  461. begin
  462. Disposestr(filetext^.text);
  463. filetext^.Text:=NewStr(#3+str_file+s+ #13#3' ');
  464. filetext^.drawview;
  465. if not(file_exists(s,startpath)) then
  466. begin
  467. params[0]:=@s;
  468. messagebox(msg_file_missing,@params,mferror+mfokbutton);
  469. errorhalt;
  470. end;
  471. {$IFNDEF DLL}
  472. {$IFDEF FPC}
  473. SetUnzipReportProc (@UnzipCheckFn);
  474. {$ELSE FPC}
  475. SetUnzipReportProc (UnzipCheckFn);
  476. {$ENDIF FPC}
  477. {$ENDIF DLL}
  478. repeat
  479. fn:=startpath+DirSep+s+#0;
  480. dir:=topath+#0;
  481. wild:=AllFiles + #0;
  482. again:=false;
  483. FileUnzipEx(@fn[1],@dir[1],@wild[1]);
  484. if (UnzipErr <> 0) then
  485. begin
  486. Str(UnzipErr,s);
  487. params[0]:=@s;
  488. if messagebox(msg_extraction_error,@params,mferror+mfyesbutton+mfnobutton)=cmNo then
  489. errorhalt
  490. else
  491. again:=true;
  492. end;
  493. until not again;
  494. end;
  495. {*****************************************************************************
  496. TEndDialog
  497. *****************************************************************************}
  498. constructor tenddialog.init;
  499. var
  500. R : TRect;
  501. P : PStaticText;
  502. Control : PButton;
  503. YB: word;
  504. {$IFNDEF LINUX}
  505. i : longint;
  506. S: string;
  507. WPath: boolean;
  508. {$ENDIF}
  509. {$IFDEF OS2}
  510. ErrPath: array [0..259] of char;
  511. Handle: longint;
  512. WLibPath: boolean;
  513. const
  514. EMXName: array [1..4] of char = 'EMX'#0;
  515. {$ENDIF}
  516. begin
  517. YB := 14;
  518. {$IFNDEF LINUX}
  519. s:='';
  520. for i:=1 to cfg.packs do
  521. if cfg.pack[i].binsub<>'' then
  522. begin
  523. if s<>'' then
  524. s:=s+';';
  525. S := s+Data.BasePath + Cfg.pack[i].BinSub;
  526. end;
  527. if Pos (Upper (S), Upper (GetEnv ('PATH'))) = 0 then
  528. begin
  529. WPath := true;
  530. Inc (YB, 2);
  531. end
  532. else
  533. WPath := false;
  534. {$IFDEF OS2}
  535. if DosLoadModule (@ErrPath, SizeOf (ErrPath), @EMXName, Handle) = 0 then
  536. begin
  537. WLibPath := false;
  538. DosFreeModule (Handle);
  539. end
  540. else
  541. begin
  542. WLibPath := true;
  543. Inc (YB, 2);
  544. end;
  545. {$ENDIF}
  546. {$ENDIF}
  547. R.Assign(6, 6, 74, YB);
  548. inherited init(r,dialog_enddialog_title);
  549. {$IFNDEF LINUX}
  550. if WPath then
  551. begin
  552. R.Assign(2, 3, 64, 5);
  553. P:=new(pstatictext,init(r,str_extend_path+''''+S+''''));
  554. insert(P);
  555. end;
  556. {$IFDEF OS2}
  557. if WLibPath then
  558. begin
  559. if WPath then
  560. S := str_libpath+'''' + S + '\'+str_dll+''''
  561. else
  562. S := str_extend_libpath+'''' + S + '\'+str_dll+'''';
  563. R.Assign (2, YB - 13, 64, YB - 11);
  564. P := New (PStaticText, Init (R, S));
  565. Insert (P);
  566. end;
  567. {$ENDIF}
  568. {$ENDIF}
  569. R.Assign(2, YB - 11, 64, YB - 10);
  570. P:=new(pstatictext,init(r,str_to_compile+''''+cfg.pack[1].ppc386+str_file2+''''));
  571. insert(P);
  572. R.Assign (29, YB - 9, 39, YB - 7);
  573. Control := New (PButton, Init (R,str_ok, cmOK, bfDefault));
  574. Insert (Control);
  575. end;
  576. {*****************************************************************************
  577. TInstallDialog
  578. *****************************************************************************}
  579. var
  580. islfn : boolean;
  581. procedure lfnreport( Retcode : longint;Rec : pReportRec );
  582. {$IFDEF TP}
  583. far;
  584. {$ENDIF}
  585. var
  586. p : pathstr;
  587. n : namestr;
  588. e : extstr;
  589. begin
  590. fsplit(strpas(rec^.Filename),p,n,e);
  591. if length(n)>8 then
  592. islfn:=true;
  593. end;
  594. function haslfn(const zipfile,path : string) : boolean;
  595. var
  596. buf : array[0..255] of char;
  597. begin
  598. strpcopy(buf,path+DirSep+zipfile);
  599. islfn:=false;
  600. {$ifdef FPC}
  601. ViewZip(buf,AllFiles,@lfnreport);
  602. {$else FPC}
  603. ViewZip(buf,AllFiles,lfnreport);
  604. {$endif FPC}
  605. haslfn:=islfn;
  606. end;
  607. constructor tlanguagedialog.init;
  608. const
  609. languages = 8;
  610. width = 40;
  611. height = languages+5;
  612. x1 = (79-width) div 2;
  613. y1 = (23-height) div 2;
  614. x2 = x1+width;
  615. y2 = y1+height;
  616. var
  617. r : trect;
  618. okbut : pbutton;
  619. line : longint;
  620. rb : PRadioButtons;
  621. begin
  622. r.assign(x1,y1,x2,y2);
  623. inherited init(r,dialog_language_title);
  624. GetExtent(R);
  625. R.Grow(-2,-1);
  626. line:=r.a.y+1;
  627. r.assign((width div 2)-15,line,(width div 2)+15,line+7);
  628. New(rb, Init(r,
  629. NewSItem(dialog_language_english,
  630. NewSItem(dialog_language_dutch,
  631. NewSItem(dialog_language_french,
  632. NewSItem(dialog_language_russian,
  633. NewSItem(dialog_language_hungarian,
  634. NewSItem(dialog_language_spanish,
  635. NewSItem(dialog_language_german,
  636. NewSItem(dialog_language_russian_win,
  637. nil))))))))));
  638. insert(rb);
  639. inc(line,7);
  640. inc(line,1);
  641. r.assign((width div 2)-5,line,(width div 2)+5,line+2);
  642. new(okbut,init(r,str_ok,cmok,bfdefault));
  643. Insert(OkBut);
  644. end;
  645. constructor tinstalldialog.init;
  646. const
  647. width = 76;
  648. height = 21;
  649. x1 = (79-width) div 2;
  650. y1 = (23-height) div 2;
  651. x2 = x1+width;
  652. y2 = y1+height;
  653. var
  654. tabr,tabir,r : trect;
  655. packmask : array[1..maxpacks] of longint;
  656. i,line,j : integer;
  657. items : array[1..maxpacks] of psitem;
  658. f : pview;
  659. found : boolean;
  660. okbut,cancelbut : pbutton;
  661. firstitem : array[1..maxpacks] of integer;
  662. packcbs : array[1..maxpacks] of pcheckboxes;
  663. packtd : ptabdef;
  664. labpath : plabel;
  665. ilpath : pinputline;
  666. tab : ptab;
  667. titletext : pcoloredtext;
  668. labcfg : plabel;
  669. cfgcb : pcheckboxes;
  670. scrollbox: pscrollbox;
  671. sbr,sbsbr: trect;
  672. sbsb: pscrollbar;
  673. begin
  674. f:=nil;
  675. { walk packages reverse and insert a newsitem for each, and set the mask }
  676. for j:=1 to cfg.packs do
  677. with cfg.pack[j] do
  678. begin
  679. firstitem[j]:=0;
  680. items[j]:=nil;
  681. packmask[j]:=0;
  682. for i:=packages downto 1 do
  683. begin
  684. if file_exists(package[i].zip,startpath) then
  685. begin
  686. {$ifdef go32v2}
  687. if not(lfnsupport) then
  688. begin
  689. if not(haslfn(package[i].zip,startpath)) then
  690. begin
  691. items[j]:=newsitem(package[i].name+diskspace(startpath+DirSep+package[i].zip),items[j]);
  692. packmask[j]:=packmask[j] or packagemask(i);
  693. firstitem[j]:=i;
  694. if createlog then
  695. writeln(log,str_checking_lfn,startpath+DirSep+package[i].zip,' ... no lfn');
  696. end
  697. else
  698. begin
  699. items[j]:=newsitem(package[i].name+str_requires_lfn,items[j]);
  700. if createlog then
  701. writeln(log,str_checking_lfn,startpath+DirSep+package[i].zip,' ... uses lfn');
  702. end;
  703. end
  704. else
  705. {$endif go32v2}
  706. begin
  707. items[j]:=newsitem(package[i].name+diskspace(startpath+DirSep+package[i].zip),items[j]);
  708. packmask[j]:=packmask[j] or packagemask(i);
  709. firstitem[j]:=i;
  710. end;
  711. end
  712. else
  713. items[j]:=newsitem(package[i].name,items[j]);
  714. end;
  715. end;
  716. { If no component found abort }
  717. found:=false;
  718. for j:=1 to cfg.packs do
  719. if packmask[j]<>0 then
  720. found:=true;
  721. if not found then
  722. begin
  723. messagebox(msg_no_components_found,nil,mferror+mfokbutton);
  724. errorhalt;
  725. end;
  726. r.assign(x1,y1,x2,y2);
  727. inherited init(r,'');
  728. GetExtent(R);
  729. R.Grow(-2,-1);
  730. Dec(R.B.Y,2);
  731. TabR.Copy(R);
  732. TabIR.Copy(R);
  733. TabIR.Grow(-2,-2);
  734. TabIR.Move(-2,0);
  735. {-------- General Sheets ----------}
  736. R.Copy(TabIR);
  737. r.move(0,1);
  738. r.b.x:=r.a.x+40;
  739. r.b.y:=r.a.y+1;
  740. new(titletext,init(r,cfg.title,$71));
  741. r.move(0,2);
  742. r.b.x:=r.a.x+40;
  743. new(labpath,init(r,dialog_install_basepath,f));
  744. r.move(0,1);
  745. r.b.x:=r.a.x+40;
  746. r.b.y:=r.a.y+1;
  747. new(ilpath,init(r,high(DirStr)));
  748. r.move(0,2);
  749. r.b.x:=r.a.x+40;
  750. new(labcfg,init(r,dialog_install_config,f));
  751. r.move(0,1);
  752. r.b.x:=r.a.x+40;
  753. r.b.y:=r.a.y+1;
  754. new(cfgcb,init(r,newsitem(dialog_install_createppc386cfg,nil)));
  755. data.cfgval:=1;
  756. {-------- Pack Sheets ----------}
  757. for j:=1 to cfg.packs do
  758. begin
  759. R.Copy(TabIR);
  760. if R.A.Y+cfg.pack[j].packages>R.B.Y then
  761. R.B.Y:=R.A.Y+cfg.pack[j].packages;
  762. new(packcbs[j],init(r,items[j]));
  763. if data.packmask[j]=$ffff then
  764. data.packmask[j]:=packmask[j];
  765. packcbs[j]^.enablemask:={$ifdef DEV}$7fffffff{$else}packmask[j]{$endif};
  766. packcbs[j]^.movedto(firstitem[j]);
  767. end;
  768. {--------- Main ---------}
  769. packtd:=nil;
  770. sbr.assign(1,3,tabr.b.x-tabr.a.x-3,tabr.b.y-tabr.a.y-1);
  771. for j:=cfg.packs downto 1 do
  772. begin
  773. if (sbr.b.y-sbr.a.y)<cfg.pack[j].packages then
  774. begin
  775. sbsbr.assign(sbr.b.x,sbr.a.y,sbr.b.x+1,sbr.b.y);
  776. New(sbsb, init(sbsbr));
  777. end
  778. else
  779. sbsb:=nil;
  780. New(ScrollBox, Init(sbr, nil, sbsb));
  781. PackCbs[j]^.MoveTo(0,0);
  782. ScrollBox^.Insert(PackCbs[j]);
  783. packtd:=NewTabDef(
  784. cfg.pack[j].name,ScrollBox,
  785. NewTabItem(sbsb,
  786. NewTabItem(ScrollBox,
  787. nil)),
  788. packtd);
  789. end;
  790. New(Tab, Init(TabR,
  791. NewTabDef(dialog_install_general,IlPath,
  792. NewTabItem(TitleText,
  793. NewTabItem(LabPath,
  794. NewTabItem(ILPath,
  795. NewTabItem(LabCfg,
  796. NewTabItem(CfgCB,
  797. nil))))),
  798. packtd)
  799. ));
  800. Tab^.GrowMode:=0;
  801. Insert(Tab);
  802. line:=tabr.b.y;
  803. r.assign((width div 2)-18,line,(width div 2)-4,line+2);
  804. new(okbut,init(r,str_continue,cmok,bfdefault));
  805. Insert(OkBut);
  806. r.assign((width div 2)+4,line,(width div 2)+14,line+2);
  807. new(cancelbut,init(r,str_quit,cmcancel,bfnormal));
  808. Insert(CancelBut);
  809. Tab^.Select;
  810. end;
  811. {*****************************************************************************
  812. TUnZipDialog
  813. *****************************************************************************}
  814. procedure tapp.do_languagedialog;
  815. var
  816. p : planguagedialog;
  817. langdata : longint;
  818. c : word;
  819. begin
  820. { select components }
  821. new(p,init);
  822. langdata:=0;
  823. c:=executedialog(p,@langdata);
  824. writeln(langdata);
  825. if c=cmok then
  826. begin
  827. case langdata of
  828. 0:
  829. cfg.language:='English';
  830. 1:
  831. begin
  832. cfg.language:='Dutch';
  833. msgfile:='errorn.msg';
  834. end;
  835. 2:
  836. begin
  837. cfg.language:='French';
  838. msgfile:='errorf.msg';
  839. end;
  840. 3:
  841. begin
  842. cfg.language:='Russian';
  843. msgfile:='errorr.msg';
  844. end;
  845. 4:
  846. cfg.language:='Hungarian';
  847. 5:
  848. begin
  849. cfg.language:='Spanish';
  850. msgfile:='errors.msg';
  851. end;
  852. 6:
  853. begin
  854. cfg.language:='German';
  855. msgfile:='errord.msg';
  856. end;
  857. 7:
  858. begin
  859. cfg.language:='RussianWin';
  860. msgfile:='errorrw.msg';
  861. end;
  862. end;
  863. end;
  864. end;
  865. {*****************************************************************************
  866. TApp
  867. *****************************************************************************}
  868. const
  869. cmstart = 1000;
  870. procedure tapp.do_installdialog;
  871. var
  872. p : pinstalldialog;
  873. p3 : penddialog;
  874. r : trect;
  875. result,
  876. c : word;
  877. i,j : longint;
  878. found : boolean;
  879. params : array[0..0] of pointer;
  880. {$ifndef linux}
  881. DSize,Space,ASpace : longint;
  882. S: DirStr;
  883. {$endif}
  884. begin
  885. data.basepath:=cfg.basepath;
  886. data.cfgval:=0;
  887. for j:=1 to cfg.packs do
  888. data.packmask[j]:=$ffff;
  889. repeat
  890. { select components }
  891. p:=new(pinstalldialog,init);
  892. c:=executedialog(p,@data);
  893. if (c=cmok) then
  894. begin
  895. if Data.BasePath = '' then
  896. messagebox(msg_select_dir,nil,mferror+mfokbutton)
  897. else
  898. begin
  899. found:=false;
  900. for j:=1 to cfg.packs do
  901. if data.packmask[j]>0 then
  902. found:=true;
  903. if found then
  904. begin
  905. {$IFNDEF LINUX}
  906. { TH - check the available disk space here }
  907. DSize := 0;
  908. for j:=1 to cfg.packs do
  909. with cfg.pack[j] do
  910. begin
  911. for i:=1 to packages do
  912. begin
  913. if data.packmask[j] and packagemask(i)<>0 then
  914. begin
  915. ASpace := DiskSpaceN (package[i].zip);
  916. if ASpace = -1 then
  917. begin
  918. params[0]:=@package[i].zip;
  919. MessageBox (msg_corrupt_zip,
  920. @params,mferror + mfokbutton);
  921. end
  922. else Inc (DSize, ASpace);
  923. end;
  924. end;
  925. end;
  926. S := FExpand (Data.BasePath);
  927. if S [Length (S)] = DirSep then
  928. Dec (S [0]);
  929. Space := DiskFree (byte (Upcase(S [1])) - 64) shr 10;
  930. if Space < DSize then
  931. S := str_is_not
  932. else
  933. S := '';
  934. if (Space < DSize + 500) then
  935. begin
  936. if S = '' then
  937. S := str_might_not_be;
  938. params[0]:=@s;
  939. if messagebox(msg_space_warning,@params,
  940. mferror+mfyesbutton+mfnobutton) = cmYes then
  941. Continue;
  942. end;
  943. {$ENDIF}
  944. if createinstalldir(data.basepath) then
  945. break;
  946. end
  947. else
  948. begin
  949. { maybe only config }
  950. if (data.cfgval and 1)<>0 then
  951. begin
  952. result:=messagebox(msg_no_components_selected,nil,
  953. mfinformation+mfyesbutton+mfnobutton);
  954. if (result=cmYes) and createinstalldir(data.basepath) then
  955. begin
  956. for i:=1 to cfg.packs do
  957. if cfg.pack[i].defcfgfile<>'' then
  958. writedefcfg(data.basepath+cfg.pack[i].binsub+DirSep+cfg.pack[i].defcfgfile);
  959. end;
  960. exit;
  961. end
  962. else
  963. begin
  964. result:=messagebox(msg_nocomponents,nil,
  965. mferror+mfyesbutton+mfnobutton);
  966. if result=cmYes then
  967. exit;
  968. end;
  969. end;
  970. end;
  971. end
  972. else
  973. exit;
  974. until false;
  975. { extract packages }
  976. for j:=1 to cfg.packs do
  977. with cfg.pack[j] do
  978. begin
  979. r.assign(10,7,70,18);
  980. UnzDlg:=new(punzipdialog,init(r,dialog_unzipdialog_title));
  981. desktop^.insert(UnzDlg);
  982. for i:=1 to packages do
  983. begin
  984. if data.packmask[j] and packagemask(i)<>0 then
  985. UnzDlg^.do_unzip(package[i].zip,data.basepath);
  986. end;
  987. desktop^.delete(UnzDlg);
  988. dispose(UnzDlg,done);
  989. end;
  990. { write config }
  991. if (data.cfgval and 1)<>0 then
  992. begin
  993. for i:=1 to cfg.packs do
  994. if cfg.pack[i].defcfgfile<>'' then
  995. writedefcfg(data.basepath+cfg.pack[i].binsub+DirSep+cfg.pack[i].defcfgfile);
  996. end;
  997. { show end message }
  998. p3:=new(penddialog,init);
  999. executedialog(p3,nil);
  1000. end;
  1001. procedure tapp.readcfg(const fn:string);
  1002. var
  1003. t : text;
  1004. i,j,
  1005. line : longint;
  1006. item,
  1007. s : string;
  1008. params : array[0..0] of pointer;
  1009. {$ifndef FPC}
  1010. procedure readln(var t:text;var s:string);
  1011. var
  1012. c : char;
  1013. i : longint;
  1014. begin
  1015. c:=#0;
  1016. i:=0;
  1017. while (not eof(t)) and (c<>#10) do
  1018. begin
  1019. read(t,c);
  1020. if c<>#10 then
  1021. begin
  1022. inc(i);
  1023. s[i]:=c;
  1024. end;
  1025. end;
  1026. if (i>0) and (s[i]=#13) then
  1027. dec(i);
  1028. s[0]:=chr(i);
  1029. end;
  1030. {$endif}
  1031. begin
  1032. assign(t,StartPath + DirSep + fn);
  1033. {$I-}
  1034. reset(t);
  1035. {$I+}
  1036. if ioresult<>0 then
  1037. begin
  1038. StartPath := GetProgDir;
  1039. assign(t,StartPath + DirSep + fn);
  1040. {$I-}
  1041. reset(t);
  1042. {$I+}
  1043. if ioresult<>0 then
  1044. begin
  1045. params[0]:=@fn;
  1046. messagebox(msg_file_not_found,@params,mferror+mfokbutton);
  1047. errorhalt;
  1048. end;
  1049. end;
  1050. line:=0;
  1051. while not eof(t) do
  1052. begin
  1053. readln(t,s);
  1054. inc(line);
  1055. if (s<>'') and not(s[1] in ['#',';']) then
  1056. begin
  1057. i:=pos('=',s);
  1058. if i>0 then
  1059. begin
  1060. item:=upper(Copy(s,1,i-1));
  1061. system.delete(s,1,i);
  1062. if item='VERSION' then
  1063. cfg.version:=s
  1064. else
  1065. if item='TITLE' then
  1066. cfg.title:=s
  1067. else
  1068. if item='LANGUAGE' then
  1069. cfg.language:=s
  1070. else
  1071. if item='BASEPATH' then
  1072. cfg.basepath:=s
  1073. else
  1074. if item='DEFAULTCFG' then
  1075. begin
  1076. repeat
  1077. readln(t,s);
  1078. if upper(s)='ENDCFG' then
  1079. break;
  1080. if cfg.defcfgs<maxdefcfgs then
  1081. begin
  1082. inc(cfg.defcfgs);
  1083. cfg.defcfg[cfg.defcfgs]:=newstr(s);
  1084. end;
  1085. until false;
  1086. end
  1087. else
  1088. if item='PACK' then
  1089. begin
  1090. inc(cfg.packs);
  1091. if cfg.packs>maxpacks then
  1092. begin
  1093. writeln('Too much packs');
  1094. halt(1);
  1095. end;
  1096. cfg.pack[cfg.packs].name:=s;
  1097. end
  1098. else
  1099. if item='CFGFILE' then
  1100. begin
  1101. if cfg.packs=0 then
  1102. begin
  1103. writeln('No pack set');
  1104. halt(1);
  1105. end;
  1106. cfg.pack[cfg.packs].defcfgfile:=s
  1107. end
  1108. else
  1109. if item='PPC386' then
  1110. begin
  1111. if cfg.packs=0 then
  1112. begin
  1113. writeln('No pack set');
  1114. halt(1);
  1115. end;
  1116. cfg.pack[cfg.packs].ppc386:=s;
  1117. end
  1118. else
  1119. if item='BINSUB' then
  1120. begin
  1121. if cfg.packs=0 then
  1122. begin
  1123. writeln('No pack set');
  1124. halt(1);
  1125. end;
  1126. cfg.pack[cfg.packs].binsub:=s;
  1127. end
  1128. else
  1129. if item='FILECHECK' then
  1130. begin
  1131. if cfg.packs=0 then
  1132. begin
  1133. writeln('No pack set');
  1134. halt(1);
  1135. end;
  1136. cfg.pack[cfg.packs].filechk:=s;
  1137. end
  1138. else
  1139. if item='PACKAGE' then
  1140. begin
  1141. if cfg.packs=0 then
  1142. begin
  1143. writeln('No pack set');
  1144. halt(1);
  1145. end;
  1146. with cfg.pack[cfg.packs] do
  1147. begin
  1148. j:=pos(',',s);
  1149. if (j>0) and (packages<maxpackages) then
  1150. begin
  1151. inc(packages);
  1152. package[packages].zip:=copy(s,1,j-1);
  1153. package[packages].name:=copy(s,j+1,255);
  1154. end;
  1155. end;
  1156. end
  1157. end;
  1158. end;
  1159. end;
  1160. close(t);
  1161. end;
  1162. procedure tapp.checkavailpack;
  1163. var
  1164. j : longint;
  1165. dir : searchrec;
  1166. begin
  1167. { check the packages }
  1168. j:=0;
  1169. while (j<cfg.packs) do
  1170. begin
  1171. inc(j);
  1172. if cfg.pack[j].filechk<>'' then
  1173. begin
  1174. findfirst(cfg.pack[j].filechk,$20,dir);
  1175. if doserror<>0 then
  1176. begin
  1177. { remove the package }
  1178. move(cfg.pack[j+1],cfg.pack[j],sizeof(tpack)*(cfg.packs-j));
  1179. dec(cfg.packs);
  1180. dec(j);
  1181. end;
  1182. {$IFNDEF TP}
  1183. findclose(dir);
  1184. {$ENDIF}
  1185. end;
  1186. end;
  1187. end;
  1188. procedure tapp.initmenubar;
  1189. var
  1190. r : trect;
  1191. begin
  1192. getextent(r);
  1193. r.b.y:=r.a.y+1;
  1194. menubar:=new(pmenubar,init(r,newmenu(
  1195. newsubmenu(menu_install,hcnocontext,newmenu(nil
  1196. ),
  1197. nil))));
  1198. end;
  1199. procedure tapp.handleevent(var event : tevent);
  1200. begin
  1201. inherited handleevent(event);
  1202. if event.what=evcommand then
  1203. if event.command=cmstart then
  1204. begin
  1205. clearevent(event);
  1206. do_installdialog;
  1207. if successfull then
  1208. begin
  1209. event.what:=evcommand;
  1210. event.command:=cmquit;
  1211. handleevent(event);
  1212. end;
  1213. end;
  1214. end;
  1215. {$IFDEF DOSSTUB}
  1216. function CheckOS2: boolean;
  1217. var
  1218. OwnName: PathStr;
  1219. OwnDir: DirStr;
  1220. Name: NameStr;
  1221. Ext: ExtStr;
  1222. DosV, W: word;
  1223. P: PChar;
  1224. const
  1225. Title: string [15] = 'FPC Installer'#0;
  1226. RunBlock: TRunBlock = (Length: $32;
  1227. Dependent: 0;
  1228. Background: 0;
  1229. TraceLevel: 0;
  1230. PrgTitle: @Title [1];
  1231. PrgName: nil;
  1232. Args: nil;
  1233. TermQ: 0;
  1234. Environment: nil;
  1235. Inheritance: 0;
  1236. SesType: 2;
  1237. Icon: nil;
  1238. PgmHandle: 0;
  1239. PgmControl: 2;
  1240. Column: 0;
  1241. Row: 0;
  1242. Width: 80;
  1243. Height: 25);
  1244. begin
  1245. CheckOS2 := false;
  1246. asm
  1247. mov ah, 30h
  1248. int 21h
  1249. xchg ah, al
  1250. mov DosV, ax
  1251. mov ax, 4010h
  1252. int 2Fh
  1253. cmp ax, 4010h
  1254. jnz @0
  1255. xor bx, bx
  1256. @0:
  1257. mov W, bx
  1258. end;
  1259. if DosV > 3 shl 8 then
  1260. begin
  1261. OwnName := FExpand (ParamStr (0));
  1262. FSplit (OwnName, OwnDir, Name, Ext);
  1263. if (DosV >= 20 shl 8 + 10) and (W >= 20 shl 8 + 10) then
  1264. (* OS/2 version 2.1 or later running (double-checked) *)
  1265. begin
  1266. OwnName [Succ (byte (OwnName [0]))] := #0;
  1267. RunBlock.PrgName := @OwnName [1];
  1268. P := Ptr (PrefixSeg, $80);
  1269. if PByte (P)^ <> 0 then
  1270. begin
  1271. Inc (P);
  1272. RunBlock.Args := Ptr (PrefixSeg, $81);
  1273. end;
  1274. asm
  1275. mov ax, 6400h
  1276. mov bx, 0025h
  1277. mov cx, 636Ch
  1278. mov si, offset RunBlock
  1279. int 21h
  1280. jc @0
  1281. mov DosV, 0
  1282. @0:
  1283. end;
  1284. CheckOS2 := DosV = 0;
  1285. end;
  1286. end;
  1287. end;
  1288. {$ENDIF}
  1289. var
  1290. i : longint;
  1291. begin
  1292. {$ifdef FPC}
  1293. {$ifdef win32}
  1294. Dos.Exec(GetEnv('COMSPEC'),'/C echo This dummy call gets the mouse to become visible');
  1295. {$endif win32}
  1296. {$endif FPC}
  1297. (* TH - no error boxes if checking an inaccessible disk etc. *)
  1298. {$IFDEF OS2}
  1299. {$IFDEF FPC}
  1300. DosCalls.DosError (0);
  1301. {$ELSE FPC}
  1302. {$IFDEF VirtualPascal}
  1303. OS2Base.DosError (ferr_DisableHardErr);
  1304. {$ELSE VirtualPascal}
  1305. BseDos.DosError (0);
  1306. {$ENDIF VirtualPascal}
  1307. {$ENDIF FPC}
  1308. {$ENDIF}
  1309. {$IFDEF DOSSTUB}
  1310. if CheckOS2 then Halt;
  1311. {$ENDIF}
  1312. createlog:=false;
  1313. for i:=1 to paramcount do
  1314. begin
  1315. if paramstr(i)='-l' then
  1316. createlog:=true
  1317. else if paramstr(i)='-h' then
  1318. begin
  1319. writeln('FPC Installer Copyright (c) 1993-2000 Florian Klaempfl');
  1320. writeln('Command line options:');
  1321. writeln(' -l create log file');
  1322. writeln;
  1323. writeln(' -h displays this help');
  1324. halt(0);
  1325. end
  1326. else
  1327. begin
  1328. writeln('Illegal command line parameter: ',paramstr(i));
  1329. halt(1);
  1330. end;
  1331. end;
  1332. if createlog then
  1333. begin
  1334. assign(log,'install.log');
  1335. rewrite(log);
  1336. if not(lfnsupport) then
  1337. writeln(log,'OS doesn''t have LFN support');
  1338. end;
  1339. getdir(0,startpath);
  1340. successfull:=false;
  1341. fillchar(cfg, SizeOf(cfg), 0);
  1342. fillchar(data, SizeOf(data), 0);
  1343. { set a default language }
  1344. cfg.language:='English';
  1345. { don't use a message file by default }
  1346. msgfile:='';
  1347. installapp.init;
  1348. FSplit (FExpand (ParamStr (0)), DStr, CfgName, EStr);
  1349. installapp.readcfg(CfgName + CfgExt);
  1350. installapp.checkavailpack;
  1351. installapp.do_languagedialog;
  1352. { installapp.readcfg(startpath+dirsep+cfgfile);}
  1353. if not(lfnsupport) then
  1354. MessageBox(msg_no_lfn,nil,mfinformation or mfokbutton);
  1355. installapp.do_installdialog;
  1356. installapp.done;
  1357. if createlog then
  1358. close(log);
  1359. end.
  1360. {
  1361. $Log$
  1362. Revision 1.7 2000-09-22 23:13:37 pierre
  1363. * add emulation for go32v2 and display currently extraced file
  1364. and changes by Gabor for scrolling support (merged)
  1365. Revision 1.6 2000/09/22 12:15:49 florian
  1366. + support of Russian (Windows)
  1367. Revision 1.5 2000/09/22 11:07:51 florian
  1368. + all language dependend strings are now resource strings
  1369. + the -Fr switch is now set in the ppc386.cfg
  1370. Revision 1.4 2000/09/21 22:09:23 florian
  1371. + start of multilanguage support
  1372. Revision 1.3 2000/09/17 14:44:12 hajny
  1373. * compilable with TP again
  1374. Revision 1.2 2000/07/21 10:43:01 florian
  1375. + added for lfn support
  1376. Revision 1.1 2000/07/13 06:30:21 michael
  1377. + Initial import
  1378. }