Browse Source

* Patch by Ludo Brands to add support for ActiveX containers (bug 20991)

git-svn-id: trunk@19936 -
michael 13 years ago
parent
commit
8af2ce27ef
1 changed files with 6 additions and 2 deletions
  1. 6 2
      utils/importtl/importtl.pas

+ 6 - 2
utils/importtl/importtl.pas

@@ -11,16 +11,18 @@ var
   F:text;
   F:text;
   slDep:TStringList;
   slDep:TStringList;
   i:integer;
   i:integer;
-  bNoRecurse,bHelp:boolean;
+  bNoRecurse,bHelp, bActivex:boolean;
 
 
 begin
 begin
   slDep:=TStringList.Create;
   slDep:=TStringList.Create;
   bNoRecurse:=false;
   bNoRecurse:=false;
   bHelp:=false;
   bHelp:=false;
+  bActiveX:=false;
   i:=1;
   i:=1;
   while i<=Paramcount do
   while i<=Paramcount do
     begin
     begin
     if pos('-n',ParamStr(i))>0 then bNoRecurse:=true
     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('-h',ParamStr(i))>0 then bHelp:=true
     else if pos('-d',ParamStr(i))>0 then
     else if pos('-d',ParamStr(i))>0 then
       begin
       begin
@@ -48,6 +50,7 @@ begin
     writeln('units.');
     writeln('units.');
     writeln('Options.');
     writeln('Options.');
     writeln('  -h    : displays this text.');
     writeln('  -h    : displays this text.');
+    writeln('  -a    : create ActiveXContainer descendants');
     writeln('  -d dir: set output directory. Default: current directory.');
     writeln('  -d dir: set output directory. Default: current directory.');
     writeln('  -n    : do not recurse typelibs. Default: create bindingss for all');
     writeln('  -n    : do not recurse typelibs. Default: create bindingss for all');
     writeln('          dependencies.');
     writeln('          dependencies.');
@@ -57,7 +60,8 @@ begin
   i:=0;
   i:=0;
   repeat
   repeat
     writeln('Reading typelib from '+slDep[i]+ ' ...');
     writeln('Reading typelib from '+slDep[i]+ ' ...');
-    sTL:=ImportTypelib(slDep[i],unitname,slDep);
+    sTL:=ImportTypelib(slDep[i],unitname,slDep,bActiveX);
+    bActiveX:=false;  //don't create ActiveXContainer descendants in descendants
     unitname:=sOutDir+unitname;
     unitname:=sOutDir+unitname;
     writeln('Writing to '+unitname);
     writeln('Writing to '+unitname);
     AssignFile(F,unitname);
     AssignFile(F,unitname);