Browse Source

* install.pas compilable by FPC again
* removed some notes from unzip.pas
* support installer creation under linux (install has name conflict)

peter 25 years ago
parent
commit
8be7c87d1d
4 changed files with 66 additions and 26 deletions
  1. 20 0
      install/fpinst/Makefile
  2. 28 19
      install/fpinst/Makefile.fpc
  3. 6 2
      install/fpinst/install.pas
  4. 12 5
      install/fpinst/unzip.pas

+ 20 - 0
install/fpinst/Makefile

@@ -183,7 +183,18 @@ endif
 
 # Targets
 
+ifeq ($(OS_TARGET),linux)
+override EXEOBJECTS+=installer
+endif
+ifeq ($(OS_TARGET),go32v2)
+override EXEOBJECTS+=install
+endif
+ifeq ($(OS_TARGET),win32)
 override EXEOBJECTS+=install
+endif
+ifeq ($(OS_TARGET),os2)
+override EXEOBJECTS+=install
+endif
 
 # Clean
 
@@ -191,6 +202,9 @@ override EXTRACLEANUNITS+=ziptypes unzip
 ifeq ($(OS_TARGET),os2)
 override EXTRACLEANUNITS+=unzipdll
 endif
+ifeq ($(OS_TARGET),linux)
+override EXTRACLEANFILES+=installer.pas
+endif
 
 # Install
 
@@ -1159,3 +1173,9 @@ ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 endif
 
+#####################################################################
+# Users rules
+#####################################################################
+
+installer.pas: install.pas
+	$(COPY) install.pas installer.pas

+ 28 - 19
install/fpinst/Makefile.fpc

@@ -1,21 +1,30 @@
-#
-#   Makefile.fpc for Free Pascal installer
-#
-
-[targets]
-programs=install
-
-[install]
+#
+#   Makefile.fpc for Free Pascal installer
+#
+
+[targets]
+programs_go32v2=install
+programs_win32=install
+programs_os2=install
+programs_linux=installer
+
+[install]
 packagename=fpinst
 sourcesubdir=fpinst
-
-[clean]
-units=ziptypes unzip
-units_os2=unzipdll
-
-[require]
-packages=api fv
-
-[dirs]
-fpcdir=..
-targetdir=.
+
+[clean]
+units=ziptypes unzip
+units_os2=unzipdll
+files_linux=installer.pas
+
+[require]
+packages=api fv
+
+[dirs]
+fpcdir=..
+targetdir=.
+
+
+[rules]
+installer.pas: install.pas
+        $(COPY) install.pas installer.pas

+ 6 - 2
install/fpinst/install.pas

@@ -1106,7 +1106,12 @@ begin
 end.
 {
   $Log$
-  Revision 1.12  2000-01-26 21:15:59  hajny
+  Revision 1.13  2000-01-26 21:49:33  peter
+    * install.pas compilable by FPC again
+    * removed some notes from unzip.pas
+    * support installer creation under linux (install has name conflict)
+
+  Revision 1.12  2000/01/26 21:15:59  hajny
     * compilable with TP again (lines < 127install.pas, ifdef around findclose)
 
   Revision 1.11  2000/01/24 22:21:48  peter
@@ -1188,4 +1193,3 @@ end.
     + version/release/patch numbers as string added
 
 }
-}

+ 12 - 5
install/fpinst/unzip.pas

@@ -386,7 +386,9 @@ TYPE
 VAR slide : pchar;            {Sliding dictionary for unzipping}
     inbuf : iobuf;            {input buffer}
     inpos, readpos : integer;  {position in input buffer, position read from file}
+{$ifdef windows}
     dlghandle : word;         {optional: handle of a cancel and "%-done"-dialog}
+{$endif}
     dlgnotify : integer;      {notification code to tell dialog how far the decompression is}
 
 VAR w : longint;                 {Current Position in slide}
@@ -397,13 +399,13 @@ VAR w : longint;                 {Current Position in slide}
     compsize,               {comressed size of file}
     reachedsize,            {number of bytes read from zipfile}
     uncompsize : longint;     {uncompressed size of file}
-    oldpercent : integer;     {last percent value shown}
     crc32val : longint;       {crc calculated from data}
     hufttype : word;          {coding type=bit_flag from header}
     totalabort,             {User pressed abort button, set in showpercent!}
     zipeof : boolean;         {read over end of zip section for this file}
     inuse : boolean;          {is unit already in use -> don't call it again!!!}
 {$ifdef windows}
+    oldpercent : integer;     {last percent value shown}
     lastusedtime : longint;   {Time of last usage in timer ticks for timeout!}
 {$endif}
 
@@ -2525,10 +2527,10 @@ BEGIN
 
   totalabort := FALSE;
   zipeof := FALSE;
-  dlghandle := hFileAction;
-  dlgnotify := cm_index;
 
   {$ifdef windows}
+  dlghandle := hFileAction;
+  dlgnotify := cm_index;
   messageloop;
   oldpercent := 0;
   {$endif}
@@ -2565,8 +2567,8 @@ BEGIN
     unzipfile := unzip_CRCErr;
     erase ( outfile );
   END ELSE BEGIN
-    oldpercent := 100;       {100 percent}
     {$ifdef windows}
+    oldpercent := 100;       {100 percent}
     IF dlghandle <> 0 THEN
       sendmessage ( dlghandle, wm_command, dlgnotify, longint ( @oldpercent ) );
     {$endif}
@@ -3328,7 +3330,12 @@ BEGIN
 END.
 {
   $Log$
-  Revision 1.3  1999-06-10 15:00:16  peter
+  Revision 1.4  2000-01-26 21:49:33  peter
+    * install.pas compilable by FPC again
+    * removed some notes from unzip.pas
+    * support installer creation under linux (install has name conflict)
+
+  Revision 1.3  1999/06/10 15:00:16  peter
     * fixed to compile for not os2
     * update install.dat