Browse Source

* updates for new installer
+ checkbox if ppc386.cfg needs to be written, also createdir() is used
for ppc386.cfg creation

peter 26 years ago
parent
commit
6650a43218

+ 17 - 8
install/fpinst/install.dos

@@ -3,24 +3,33 @@
 #
 #
 # Go32v2 Install file
 # Go32v2 Install file
 #
 #
-title=Free Pascal Compiler for Go32v2
-version=0.99.12
+title=Free Pascal Compiler 0.99.12b for Go32v2
+version=0.99.12b
 
 
 basepath=c:\pp
 basepath=c:\pp
 binsub=\bin\go32v2
 binsub=\bin\go32v2
 ppc386=ppc386
 ppc386=ppc386
 
 
+#
+# Binary packages
+#
 package=basego32.zip,~B~asic system for Go32v2 (required)
 package=basego32.zip,~B~asic system for Go32v2 (required)
 package=asldgo32.zip,GNU ~L~inker and GNU Assembler for Go32v2 (required)
 package=asldgo32.zip,GNU ~L~inker and GNU Assembler for Go32v2 (required)
 package=gdbgo32.zip,GNU ~D~ebugger for Go32v2
 package=gdbgo32.zip,GNU ~D~ebugger for Go32v2
 package=utilgo32.zip,GNU ~U~tilities (for makefiles)
 package=utilgo32.zip,GNU ~U~tilities (for makefiles)
-package=doc-html.zip,Documentation (~H~TML)
+package=docs-pdf.zip,Documentation (~P~DF)
 package=demo.zip,D~e~mos
 package=demo.zip,D~e~mos
-package=fclgo32.zip,~F~ree Component Libary
-package=fvgo32.zip,Free ~V~ision and API units
-package=rl09912s.zip,~R~un time library sources
-package=pp09912s.zip,~C~ompiler sources
-package=doc160s.zip,Documentation sources (La~T~eX)
+package=fclgo32.zip,~F~ree Component Libary (FCL)
+package=fvgo32.zip,Free ~V~ision (FV) and API units
+#
+# Source packages
+#
+source=rl09912s.zip,~R~un time library sources
+source=pp09912s.zip,~C~ompiler sources
+source=fc09912s.zip,~F~ree component library (FCL) sources
+source=fv09912s.zip,Free ~V~ision (FV) and API units sources
+source=gt09912s.zip,~G~TK interface sources
+source=doc160s.zip,Documentation sources (La~T~eX)
 
 
 cfgfile=ppc386.cfg
 cfgfile=ppc386.cfg
 defaultcfg=
 defaultcfg=

+ 15 - 6
install/fpinst/install.lin

@@ -3,22 +3,31 @@
 #
 #
 # Linux Install file
 # Linux Install file
 #
 #
-title=Free Pascal Compiler for Linux
-version=0.99.12
+title=Free Pascal Compiler 0.99.12b for Linux
+version=0.99.12b
 
 
 basepath=/usr/lib/fpc/0.99.12
 basepath=/usr/lib/fpc/0.99.12
 binsub=
 binsub=
 ppc386=ppc386
 ppc386=ppc386
 
 
+#
+# Binary packages
+#
 package=baselin.zip,~B~asic system for Linux (required)
 package=baselin.zip,~B~asic system for Linux (required)
 #package=asldlin.zip,GNU ~L~inker and GNU Assembler for Go32v2 (required)
 #package=asldlin.zip,GNU ~L~inker and GNU Assembler for Go32v2 (required)
 #package=gdblin.zip,GNU ~D~ebugger for Go32v2
 #package=gdblin.zip,GNU ~D~ebugger for Go32v2
 #package=utillin.zip,GNU ~U~tilities (required to recompile run time library)
 #package=utillin.zip,GNU ~U~tilities (required to recompile run time library)
-package=doc-html.zip,Documentation (~H~TML)
+package=docs-pdf.zip,Documentation (~P~DF)
 package=demo.zip,D~e~mos
 package=demo.zip,D~e~mos
-package=rl09912s.zip,~R~un time library sources
-package=pp09912s.zip,~C~ompiler sources
-package=doc160s.zip,Documentation sources (La~T~eX)
+#
+# Source packages
+#
+source=rl09912s.zip,~R~un time library sources
+source=pp09912s.zip,~C~ompiler sources
+source=fc09912s.zip,~F~ree component library (FCL) sources
+source=fv09912s.zip,Free ~V~ision (FV) and API sources
+source=gt09912s.zip,~G~TK interface sources
+source=doc160s.zip,Documentation sources (La~T~eX)
 
 
 cfgfile=ppc386.cfg
 cfgfile=ppc386.cfg
 defaultcfg=
 defaultcfg=

+ 15 - 6
install/fpinst/install.os2

@@ -3,22 +3,31 @@
 #
 #
 # EMX Install file
 # EMX Install file
 #
 #
-title=Free Pascal Compiler for OS/2 and DOS
-version=0.99.12
+title=Free Pascal Compiler 0.99.12b for OS/2 and DOS
+version=0.99.12b
 
 
 basepath=c:\pp
 basepath=c:\pp
 binsub=\bin\os2
 binsub=\bin\os2
 ppc386=ppos2
 ppc386=ppos2
 
 
+#
+# Binary packages
+#
 package=baseemx.zip,~B~asic system for EMX (required)
 package=baseemx.zip,~B~asic system for EMX (required)
 package=asldemx.zip,GNU ~L~inker and assembler for EMX (required)
 package=asldemx.zip,GNU ~L~inker and assembler for EMX (required)
 package=gdbemx.zip,GNU ~D~ebugger for EMX and PMGDB front-end
 package=gdbemx.zip,GNU ~D~ebugger for EMX and PMGDB front-end
 package=utilemx.zip,GNU ~U~tilities (for makefiles)
 package=utilemx.zip,GNU ~U~tilities (for makefiles)
-package=doc-htm.zip,Documentation (~H~TML)
+package=docs-pdf.zip,Documentation (~P~DF)
 package=demo.zip,D~e~mos
 package=demo.zip,D~e~mos
-package=rl09912s.zip,~R~un time library sources
-package=pp09912s.zip,~C~ompiler sources
-package=doc160s.zip,Documentation sources (La~T~eX)
+#
+# Source packages
+#
+source=rl09912s.zip,~R~un time library sources
+source=pp09912s.zip,~C~ompiler sources
+source=fc09912s.zip,~F~ree component library (FCL) sources
+source=fv09912s.zip,Free ~V~ision (FV) and API sources
+source=gt09912s.zip,~G~TK interface sources
+source=doc160s.zip,Documentation sources (La~T~eX)
 
 
 cfgfile=ppc386.cfg
 cfgfile=ppc386.cfg
 defaultcfg=
 defaultcfg=

+ 142 - 93
install/fpinst/install.pas

@@ -74,10 +74,12 @@ program install;
 {$IFDEF DLL}
 {$IFDEF DLL}
      unzipdll,
      unzipdll,
 {$ENDIF}
 {$ENDIF}
-     app,dialogs,views,menus,msgbox,tabs;
+     app,dialogs,views,menus,msgbox,colortxt,tabs;
 
 
 
 
   const
   const
+     installerversion='0.99.12b';
+
      maxpackages=20;
      maxpackages=20;
      maxsources=20;
      maxsources=20;
      maxdefcfgs=1024;
      maxdefcfgs=1024;
@@ -113,6 +115,7 @@ program install;
 
 
      datarec=packed record
      datarec=packed record
        basepath : DirStr;
        basepath : DirStr;
+       cfgval   : word;
        packmask : word;
        packmask : word;
        srcmask  : word;
        srcmask  : word;
      end;
      end;
@@ -226,6 +229,44 @@ program install;
        file_exists:=fsearch(f,path)<>'';
        file_exists:=fsearch(f,path)<>'';
     end;
     end;
 
 
+  function createdir(s:string):boolean;
+    var
+      s1,start : string;
+      err : boolean;
+      i : longint;
+    begin
+       err:=false;
+       {$I-}
+       getdir(0,start);
+{$ifndef linux}
+       if (s[2]=':') and (s[3]=DirSep) then
+        begin
+          chdir(Copy(s,1,3));
+          Delete(S,1,3);
+        end;
+{$endif}
+       repeat
+         i:=Pos(DirSep,s);
+         if i=0 then
+          i:=255;
+         s1:=Copy(s,1,i-1);
+         Delete(s,1,i);
+         ChDir(s1);
+         if ioresult<>0 then
+          begin
+            mkdir(s1);
+            chdir(s1);
+            if ioresult<>0 then
+             begin
+               err:=true;
+               break;
+             end;
+          end;
+       until s='';
+       chdir(start);
+       {$I+}
+       createdir:=err;
+    end;
 
 
   function DiskSpaceN(const zipfile : string) : longint;
   function DiskSpaceN(const zipfile : string) : longint;
     var
     var
@@ -249,11 +290,8 @@ program install;
     end;
     end;
 
 
 
 
-  function createdir(s : string) : boolean;
+  function createinstalldir(s : string) : boolean;
     var
     var
-      start,
-      s1 : string;
-      i : longint;
       err : boolean;
       err : boolean;
       dir : searchrec;
       dir : searchrec;
       params : array[0..0] of pointer;
       params : array[0..0] of pointer;
@@ -263,55 +301,25 @@ program install;
        FindFirst(s,AnyFile,dir);
        FindFirst(s,AnyFile,dir);
        if doserror=0 then
        if doserror=0 then
          begin
          begin
-(* TH - check the directory attribute! *)
             if Dir.Attr and Directory = 0 then
             if Dir.Attr and Directory = 0 then
               begin
               begin
                 messagebox('A file with the name chosen as the installation '+
                 messagebox('A file with the name chosen as the installation '+
                 'directory exists already. Cannot create this directory!',nil,
                 'directory exists already. Cannot create this directory!',nil,
                 mferror+mfokbutton);
                 mferror+mfokbutton);
-                createdir:=false;
+                createinstalldir:=false;
               end else
               end else
-                createdir:=messagebox('The installation directory exists already. '+
-                'Do you want to enter a new installation directory ?',nil,
-                mferror+mfyesbutton+mfnobutton)=cmNo;
+                createinstalldir:=messagebox('The installation directory exists already. '+
+                'Do you want to continue ?',nil,
+                mferror+mfyesbutton+mfnobutton)=cmYes;
             exit;
             exit;
          end;
          end;
-       err:=false;
-       {$I-}
-       getdir(0,start);
-{$ifndef linux}
-       if (s[2]=':') and (s[3]=DirSep) then
-        begin
-          chdir(Copy(s,1,3));
-          Delete(S,1,3);
-        end;
-{$endif}
-       repeat
-         i:=Pos(DirSep,s);
-         if i=0 then
-          i:=255;
-         s1:=Copy(s,1,i-1);
-         Delete(s,1,i);
-         ChDir(s1);
-         if ioresult<>0 then
-          begin
-            mkdir(s1);
-            chdir(s1);
-            if ioresult<>0 then
-             begin
-               err:=true;
-               break;
-             end;
-          end;
-       until s='';
-       chdir(start);
-       {$I+}
+       err:=Createdir(s);
        if err then
        if err then
          begin
          begin
             params[0]:=@s;
             params[0]:=@s;
             messagebox('The installation directory %s couldn''t be created',
             messagebox('The installation directory %s couldn''t be created',
               @params,mferror+mfokbutton);
               @params,mferror+mfokbutton);
-            createdir:=false;
+            createinstalldir:=false;
             exit;
             exit;
          end;
          end;
 {$ifndef TP}
 {$ifndef TP}
@@ -319,9 +327,10 @@ program install;
        FindClose (dir);
        FindClose (dir);
  {$ENDIF}
  {$ENDIF}
 {$endif}
 {$endif}
-       createdir:=true;
+       createinstalldir:=true;
     end;
     end;
 
 
+
   function GetProgDir: DirStr;
   function GetProgDir: DirStr;
     var
     var
       D: DirStr;
       D: DirStr;
@@ -345,14 +354,23 @@ program install;
       s      : string;
       s      : string;
       dir    : searchrec;
       dir    : searchrec;
       params : array[0..0] of pointer;
       params : array[0..0] of pointer;
+      d : dirstr;
+      n : namestr;
+      e : extstr;
     begin
     begin
+    { already exists }
       findfirst(fn,AnyFile,dir);
       findfirst(fn,AnyFile,dir);
       if doserror=0 then
       if doserror=0 then
        begin
        begin
          params[0]:=@fn;
          params[0]:=@fn;
-         MessageBox(#3'Default config not written.'#13#3'%s'#13#3'already exists',@params,mfinformation+mfokbutton);
-         exit;
+         if MessageBox('Config %s already exists, continue writing default config?',@params,
+                       mfinformation+mfyesbutton+mfnobutton)=cmNo then
+           exit;
        end;
        end;
+    { create directory }
+      fsplit(fn,d,n,e);
+      createdir(d);
+    { create the ppc386.cfg }
       assign(t,fn);
       assign(t,fn);
       {$I-}
       {$I-}
        rewrite(t);
        rewrite(t);
@@ -527,6 +545,9 @@ program install;
        labpath : plabel;
        labpath : plabel;
        ilpath : pinputline;
        ilpath : pinputline;
        tab : ptab;
        tab : ptab;
+       titletext : pcoloredtext;
+       labcfg : plabel;
+       cfgcb : pcheckboxes;
     begin
     begin
      { walk packages reverse and insert a newsitem for each, and set the mask }
      { walk packages reverse and insert a newsitem for each, and set the mask }
        items:=nil;
        items:=nil;
@@ -564,7 +585,7 @@ program install;
         end;
         end;
 
 
        r.assign(x1,y1,x2,y2);
        r.assign(x1,y1,x2,y2);
-       inherited init(r,cfg.title+' Installation');
+       inherited init(r,'');
        GetExtent(R);
        GetExtent(R);
        R.Grow(-2,-1);
        R.Grow(-2,-1);
        Dec(R.B.Y,2);
        Dec(R.B.Y,2);
@@ -575,14 +596,28 @@ program install;
 
 
        {-------- Sheet 1 ----------}
        {-------- Sheet 1 ----------}
        R.Copy(TabIR);
        R.Copy(TabIR);
-       r.b.x:=r.a.x+6;
+       r.move(0,1);
+       r.b.x:=r.a.x+40;
        r.b.y:=r.a.y+1;
        r.b.y:=r.a.y+1;
-       new(labpath,init(r,'~P~ath',f));
+       new(titletext,init(r,cfg.title,$71));
 
 
+       r.move(0,2);
+       r.b.x:=r.a.x+40;
+       new(labpath,init(r,'~B~ase path',f));
        r.move(0,1);
        r.move(0,1);
        r.b.x:=r.a.x+40;
        r.b.x:=r.a.x+40;
+       r.b.y:=r.a.y+1;
        new(ilpath,init(r,high(DirStr)));
        new(ilpath,init(r,high(DirStr)));
 
 
+       r.move(0,2);
+       r.b.x:=r.a.x+40;
+       new(labcfg,init(r,'Con~f~ig',f));
+       r.move(0,1);
+       r.b.x:=r.a.x+40;
+       r.b.y:=r.a.y+1;
+       new(cfgcb,init(r,newsitem('create ppc386.cfg',nil)));
+       data.cfgval:=1;
+
        {-------- Sheet 2 ----------}
        {-------- Sheet 2 ----------}
        R.Copy(TabIR);
        R.Copy(TabIR);
        new(packcbs,init(r,items));
        new(packcbs,init(r,items));
@@ -598,9 +633,12 @@ program install;
        {--------- Main ---------}
        {--------- Main ---------}
        New(Tab, Init(TabR,
        New(Tab, Init(TabR,
          NewTabDef('~G~eneral',IlPath,
          NewTabDef('~G~eneral',IlPath,
+           NewTabItem(TitleText,
            NewTabItem(LabPath,
            NewTabItem(LabPath,
            NewTabItem(ILPath,
            NewTabItem(ILPath,
-           nil)),
+           NewTabItem(LabCfg,
+           NewTabItem(CfgCB,
+           nil))))),
          NewTabDef('~P~ackages',PackCbs,
          NewTabDef('~P~ackages',PackCbs,
            NewTabItem(PackCbs,
            NewTabItem(PackCbs,
            nil),
            nil),
@@ -646,6 +684,7 @@ program install;
 {$endif}
 {$endif}
     begin
     begin
       data.basepath:=cfg.basepath;
       data.basepath:=cfg.basepath;
+      data.cfgval:=0;
       data.srcmask:=0;
       data.srcmask:=0;
       data.packmask:=0;
       data.packmask:=0;
 
 
@@ -656,51 +695,55 @@ program install;
         if (c=cmok) then
         if (c=cmok) then
           begin
           begin
             if Data.BasePath = '' then
             if Data.BasePath = '' then
-              messagebox('Please, choose the directory for installation first.',nil,
-                 mferror+mfokbutton) else
+              messagebox('Please, choose the directory for installation first.',nil,mferror+mfokbutton)
+            else
              begin
              begin
-              if (data.srcmask>0) or (data.packmask>0) then
-               begin
-(* TH - check the available disk space here *)
+               if (data.srcmask>0) or (data.packmask>0) then
+                begin
 {$IFNDEF LINUX}
 {$IFNDEF LINUX}
-                DSize := 0;
-                for i:=1 to cfg.packages do
-                 begin
-                   if data.packmask and packagemask(i)<>0 then
-                    Inc (DSize, DiskSpaceN(cfg.package[i].zip));
-                 end;
-                for i:=1 to cfg.sources do
-                 begin
-                   if data.srcmask and packagemask(i)<>0 then
-                    Inc (DSize, DiskSpaceN(cfg.source[i].zip));
-                 end;
-                 if data.mask and packagemask(i)<>0 then
-                 Inc (DSize, DiskSpaceN(cfg.package[i].zip));
-                end;
-                S := FExpand (Data.BasePath);
-                if S [Length (S)] = DirSep then Dec (S [0]);
-                Space := DiskFree (byte (S [1]) - 64) shr 10;
-                if Space < DSize then S := 'is not' else S := '';
-                if Space < DSize + 500 then
-                 begin
-                  if S = '' then S := 'might not be';
-                  if messagebox('There ' + S + ' enough space on the target ' +
-                    'drive for all the selected components. Do you ' +
-                    'want to change the installation path?',nil,
-                    mferror+mfyesbutton+mfnobutton) = cmYes then Continue;
-                 end;
+                { TH - check the available disk space here }
+                  DSize := 0;
+                  for i:=1 to cfg.packages do
+                   begin
+                     if data.packmask and packagemask(i)<>0 then
+                      Inc (DSize, DiskSpaceN(cfg.package[i].zip));
+                   end;
+                  for i:=1 to cfg.sources do
+                   begin
+                     if data.srcmask and packagemask(i)<>0 then
+                      Inc (DSize, DiskSpaceN(cfg.source[i].zip));
+                   end;
+                  if data.packmask and packagemask(i)<>0 then
+                   Inc (DSize, DiskSpaceN(cfg.package[i].zip));
+                  S := FExpand (Data.BasePath);
+                  if S [Length (S)] = DirSep then
+                   Dec (S [0]);
+                  Space := DiskFree (byte (S [1]) - 64) shr 10;
+                  if Space < DSize then
+                   S := 'is not'
+                  else
+                   S := '';
+                  if Space < DSize + 500 then
+                   begin
+                     if S = '' then
+                      S := 'might not be';
+                     if messagebox('There ' + S + ' enough space on the target ' +
+                                   'drive for all the selected components. Do you ' +
+                                   'want to change the installation path?',nil,
+                                   mferror+mfyesbutton+mfnobutton) = cmYes then
+                      Continue;
+                   end;
 {$ENDIF}
 {$ENDIF}
-                if createdir(data.basepath) then
-                 break;
-              end
-             else
-              begin
-               result:=messagebox('No components selected.'#13#13'Abort installation?',nil,
-                 mferror+mfyesbutton+mfnobutton);
-               if result=cmYes then
-                exit;
-              end;
-            end;
+                  if createinstalldir(data.basepath) then
+                   break;
+                end
+               else
+                begin
+                  result:=messagebox('No components selected.'#13#13'Abort installation?',nil,mferror+mfyesbutton+mfnobutton);
+                  if result=cmYes then
+                   exit;
+                end;
+             end;
           end
           end
         else
         else
           exit;
           exit;
@@ -731,7 +774,8 @@ program install;
       dispose(p2,done);
       dispose(p2,done);
 
 
     { write config }
     { write config }
-      writedefcfg(data.basepath+cfg.binsub+DirSep+cfg.defcfgfile);
+      if (data.cfgval and 1)<>0 then
+       writedefcfg(data.basepath+cfg.binsub+DirSep+cfg.defcfgfile);
 
 
     { show end message }
     { show end message }
       p3:=new(penddialog,init);
       p3:=new(penddialog,init);
@@ -869,7 +913,7 @@ program install;
        getextent(r);
        getextent(r);
        r.b.y:=r.a.y+1;
        r.b.y:=r.a.y+1;
        menubar:=new(pmenubar,init(r,newmenu(
        menubar:=new(pmenubar,init(r,newmenu(
-          newsubmenu('~F~ree Pascal '+cfg.version,hcnocontext,newmenu(nil
+          newsubmenu('~F~ree Pascal Installer '+installerversion,hcnocontext,newmenu(nil
           ),
           ),
        nil))));
        nil))));
     end;
     end;
@@ -1000,7 +1044,12 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  1999-07-01 07:56:58  hajny
+  Revision 1.8  1999-07-17 14:24:47  peter
+    * updates for new installer
+    + checkbox if ppc386.cfg needs to be written, also createdir() is used
+      for ppc386.cfg creation
+
+  Revision 1.7  1999/07/01 07:56:58  hajny
     * installation to root fixed
     * installation to root fixed
 
 
   Revision 1.6  1999/06/29 22:20:19  peter
   Revision 1.6  1999/06/29 22:20:19  peter

+ 16 - 7
install/fpinst/install.w32

@@ -3,24 +3,33 @@
 #
 #
 # Win32 Install file
 # Win32 Install file
 #
 #
-title=Free Pascal Compiler for Win32
-version=0.99.12
+title=Free Pascal Compiler 0.99.12b for Win32
+version=0.99.12b
 
 
 basepath=c:\pp
 basepath=c:\pp
 binsub=\bin\win32
 binsub=\bin\win32
 ppc386=ppc386
 ppc386=ppc386
 
 
+#
+# Binary packages
+#
 package=basew32.zip,~B~asic system for Win32 (required)
 package=basew32.zip,~B~asic system for Win32 (required)
 package=asldw32.zip,GNU ~L~inker and GNU Assembler for Win32 (required)
 package=asldw32.zip,GNU ~L~inker and GNU Assembler for Win32 (required)
 package=gdbw32.zip,GNU ~D~ebugger for Win32
 package=gdbw32.zip,GNU ~D~ebugger for Win32
 package=utilw32.zip,GNU ~U~tilities (for makefiles)
 package=utilw32.zip,GNU ~U~tilities (for makefiles)
-package=doc-html.zip,Documentation (~H~TML)
+package=docs-pdf.zip,Documentation (~P~DF)
 package=demo.zip,D~e~mos
 package=demo.zip,D~e~mos
-package=fclw32.zip,~F~ree Component Libary
+package=fclw32.zip,~F~ree Component Libary (FCL)
 package=gtkw32.zip,~G~TK 1.2.x bindings for gtk/win32
 package=gtkw32.zip,~G~TK 1.2.x bindings for gtk/win32
-package=rl09912s.zip,~R~un time library sources
-package=pp09912s.zip,~C~ompiler sources
-package=doc160s.zip,Documentation sources (La~T~eX)
+#
+# Source packages
+#
+source=rl09912s.zip,~R~un time library sources
+source=pp09912s.zip,~C~ompiler sources
+source=fc09912s.zip,~F~ree component library (FCL) sources
+source=fv09912s.zip,Free ~V~ision (FV) and API sources
+source=gt09912s.zip,~G~TK interface sources
+source=doc160s.zip,Documentation sources (La~T~eX)
 
 
 cfgfile=ppc386.cfg
 cfgfile=ppc386.cfg
 defaultcfg=
 defaultcfg=