Quellcode durchsuchen

--- Merging r19988 into '.':
U utils/importtl/Makefile.fpc
U utils/importtl/Makefile
--- Merging r20048 into '.':
U utils/Makefile.fpc
C utils/Makefile
--- Merging r20157 into '.':
U utils/importtl/importtl.pas
U packages/winunits-base/src/typelib.pas
Summary of conflicts:
Text conflicts: 1

# revisions: 19988,20048,20157
------------------------------------------------------------------------
r19988 | joost | 2012-01-06 21:39:09 +0100 (Fri, 06 Jan 2012) | 1 line
Changed paths:
M /trunk/utils/importtl/Makefile
M /trunk/utils/importtl/Makefile.fpc

* Set fpcpackage=y, to fix 'make install' without a given prefix. In that case there wasn't any base install dir set by the Makefile.
------------------------------------------------------------------------
------------------------------------------------------------------------
r20048 | joost | 2012-01-11 14:23:21 +0100 (Wed, 11 Jan 2012) | 1 line
Changed paths:
M /trunk/utils/Makefile
M /trunk/utils/Makefile.fpc

* Do not try to compile importtl on wince, since the dependency winunits-base is not available on wince
------------------------------------------------------------------------
------------------------------------------------------------------------
r20157 | marco | 2012-01-23 15:16:03 +0100 (Mon, 23 Jan 2012) | 19 lines
Changed paths:
M /trunk/packages/winunits-base/src/typelib.pas
M /trunk/utils/importtl/importtl.pas

* Patch by Ludo:

- Added the optional creation of a lazarus design/runtime package for the activex container.
- Added full files in case diff doesn't work.

Fixes to typelib importer:
- avoid duplicate enum members (translated to const) (Office10\MSWORD.OLB)
- don't make TEventSink or TActiveXContainer descendants if interface does not descend from IDispatch (VBA6\VBE6EXT.OLB)
- add type declaration for coclass interface pointing to default interface
- fixed property setter for array properties
- added typecasting for byref interface event parameters
- typecasting workaround for pvarVal^ and pbstrVal^ "Can't take the address of constant expressions" error caused by var type mismatch OLEVariant <> Variant and POleStr<>WideString
- reverted to the use of OLEVariant. POLEVariant isn't automatable in trunk but PVariant isn't automatable in 2.6.0 neither.
- added byref VT_INT, VT_UINT, VT_DECIMAL event parameter support (Office10\MSWORD.OLB)
- replace the use of TOleEnum with LongWord. Definition in ActiveX (type TOleEnum = type LongWord;) prohibits casting of OleVariant to TOleEnum.(Office10\MSOUTL.OLB)
- disambiguate method name for INVOKE_PROPERTYPUT and INVOKE_PROPERTYPUTREF on same property (ado\msado25.tlb)
- postpone interface declaration until full declaration of ancestor class.


------------------------------------------------------------------------

git-svn-id: branches/fixes_2_6@20308 -

marco vor 13 Jahren
Ursprung
Commit
11749835f0

Datei-Diff unterdrückt, da er zu groß ist
+ 492 - 169
packages/winunits-base/src/typelib.pas


+ 2 - 4
utils/Makefile

@@ -340,7 +340,7 @@ ifeq ($(FULL_TARGET),i386-netwlibc)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg  fpcres rmwait instantfpc importtl
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg  fpcres rmwait instantfpc
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg
@@ -442,7 +442,7 @@ ifeq ($(FULL_TARGET),arm-darwin)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg  fpcres fpcreslipo instantfpc
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg  fpcres rmwait instantfpc importtl
+override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg  fpcres rmwait instantfpc
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 override TARGET_DIRS+=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg
@@ -3011,7 +3011,6 @@ TARGET_DIRS_FPCMKCFG=1
 TARGET_DIRS_FPCRES=1
 TARGET_DIRS_RMWAIT=1
 TARGET_DIRS_INSTANTFPC=1
-TARGET_DIRS_IMPORTTL=1
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 TARGET_DIRS_FPPKG=1
@@ -3398,7 +3397,6 @@ TARGET_DIRS_FPCMKCFG=1
 TARGET_DIRS_FPCRES=1
 TARGET_DIRS_RMWAIT=1
 TARGET_DIRS_INSTANTFPC=1
-TARGET_DIRS_IMPORTTL=1
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 TARGET_DIRS_FPPKG=1

+ 1 - 1
utils/Makefile.fpc

@@ -12,7 +12,7 @@ programs=ppdep ptop rstconv data2inc delp bin2obj postw32 rmcvsdir
 programs_linux=grab_vcsa
 dirs_win32=fpmc fpcres rmwait instantfpc importtl
 dirs_win64=fpmc fpcres rmwait instantfpc importtl
-dirs_wince=fpcres rmwait instantfpc importtl
+dirs_wince=fpcres rmwait instantfpc
 dirs_haiku=fpcres instantfpc
 dirs_linux=fpcres instantfpc
 dirs_freebsd=fpcres instantfpc

+ 7 - 31
utils/importtl/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/11/22]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2012/01/06]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -153,12 +153,6 @@ ifdef OS_TARGET_DEFAULT
 OS_TARGET=$(OS_TARGET_DEFAULT)
 endif
 endif
-ifneq ($(words $(FPC_COMPILERINFO)),5)
-FPC_COMPILERINFO+=$(shell $(FPC) -iSP)
-FPC_COMPILERINFO+=$(shell $(FPC) -iTP)
-FPC_COMPILERINFO+=$(shell $(FPC) -iSO)
-FPC_COMPILERINFO+=$(shell $(FPC) -iTO)
-endif
 ifndef CPU_SOURCE
 CPU_SOURCE:=$(word 2,$(FPC_COMPILERINFO))
 endif
@@ -487,6 +481,7 @@ endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 override TARGET_PROGRAMS+=importtl
 endif
+override INSTALL_FPCPACKAGE=y
 ifdef REQUIRE_UNITSDIR
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 endif
@@ -1071,25 +1066,6 @@ DATESTR:=$(shell $(DATE) +%Y%m%d)
 else
 DATESTR=
 endif
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
 ZIPOPT=-9
 ZIPEXT=.zip
 ifeq ($(USETAR),bz2)
@@ -2050,12 +2026,16 @@ endif
 ifndef CROSSBOOTSTRAP
 ifneq ($(BINUTILSPREFIX),)
 override FPCOPT+=-XP$(BINUTILSPREFIX)
-override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
 endif
 ifneq ($(BINUTILSPREFIX),)
 override FPCOPT+=-Xr$(RLINKPATH)
 endif
 endif
+ifndef CROSSCOMPILE
+ifneq ($(BINUTILSPREFIX),)
+override FPCMAKEOPT+=-XP$(BINUTILSPREFIX)
+endif
+endif
 ifdef UNITDIR
 override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
 endif
@@ -2309,9 +2289,6 @@ endif
 fpc_install: all $(INSTALLTARGET)
 ifdef INSTALLEXEFILES
 	$(MKDIR) $(INSTALL_BINDIR)
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
 	$(INSTALLEXE) $(INSTALLEXEFILES) $(INSTALL_BINDIR)
 endif
 ifdef INSTALL_CREATEPACKAGEFPC
@@ -2484,7 +2461,6 @@ fpc_baseinfo:
 	@$(ECHO)  Date...... $(DATE)
 	@$(ECHO)  FPCMake... $(FPCMAKE)
 	@$(ECHO)  PPUMove... $(PPUMOVE)
-	@$(ECHO)  Upx....... $(UPXPROG)
 	@$(ECHO)  Zip....... $(ZIPPROG)
 	@$(ECHO)
 	@$(ECHO)  == Object info ==

+ 3 - 0
utils/importtl/Makefile.fpc

@@ -1,6 +1,9 @@
 #
 #   Makefile.fpc for h2pas
 #
+[install]
+fpcpackage=y
+
 
 [target]
 programs=importtl

+ 23 - 7
utils/importtl/importtl.pas

@@ -6,24 +6,25 @@ uses
   classes,typelib,sysutils;
 
 var
-  unitname:string;
+  unitname,sPackageSource,sPackageRegUnitSource:string;
   sTL,sOutDir:string;
   F:text;
   slDep:TStringList;
   i:integer;
-  bNoRecurse,bHelp, bActivex:boolean;
-
+  bNoRecurse,bHelp,bActiveX,bPackage:boolean;
 begin
   slDep:=TStringList.Create;
   bNoRecurse:=false;
   bHelp:=false;
   bActiveX:=false;
+  bPackage:=false;
   i:=1;
   while i<=Paramcount do
     begin
     if pos('-n',ParamStr(i))>0 then bNoRecurse:=true
     else if pos('-a',ParamStr(i))>0 then bActiveX:=true
     else if pos('-h',ParamStr(i))>0 then bHelp:=true
+    else if pos('-p',ParamStr(i))>0 then bPackage:=true
     else if pos('-d',ParamStr(i))>0 then
       begin
       sOutDir:=trim(copy(ParamStr(i), pos('-d',ParamStr(i))+2, 260));  // windows MAX_PATH
@@ -54,17 +55,32 @@ begin
     writeln('  -d dir: set output directory. Default: current directory.');
     writeln('  -n    : do not recurse typelibs. Default: create bindingss for all');
     writeln('          dependencies.');
+    writeln('  -p    : create lazarus package for ActiveXContainer descendants');
     exit;
     end;
   slDep.Add(paramstr(Paramcount));
   i:=0;
   repeat
     writeln('Reading typelib from '+slDep[i]+ ' ...');
-    sTL:=ImportTypelib(slDep[i],unitname,slDep,bActiveX);
-    bActiveX:=false;  //don't create ActiveXContainer descendants in descendants
+    sTL:=ImportTypelib(slDep[i],unitname,slDep,bActiveX,bPackage,sPackageSource,sPackageRegUnitSource);
     unitname:=sOutDir+unitname;
-    writeln('Writing to '+unitname);
-    AssignFile(F,unitname);
+    if (bPackage) and (sPackageSource<>'') then
+      begin
+      writeln('Writing package file to '+unitname+'P.lpk' );
+      AssignFile(F,unitname+'P.lpk');
+      Rewrite(F);
+      Write(F,sPackageSource);
+      CloseFile(F);
+      writeln('Writing package registration file to '+unitname+'Preg.pas');
+      AssignFile(F,unitname+'Preg.pas');
+      Rewrite(F);
+      Write(F,sPackageSource);
+      CloseFile(F);
+      end;
+    bActiveX:=false;  //don't create ActiveXContainer descendants in descendants
+    bPackage:=false;
+    writeln('Writing to '+unitname+'.pas');
+    AssignFile(F,unitname+'.pas');
     Rewrite(F);
     Write(F,sTL);
     CloseFile(F);

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.