implemented loading .lpk on cmd line

git-svn-id: trunk@6612 -
This commit is contained in:
mattias 2005-01-16 13:34:55 +00:00
parent 838c199783
commit e0542e128f
2 changed files with 15 additions and 8 deletions

View File

@ -1541,16 +1541,20 @@ begin
// load the cmd line files
if CmdLineFiles<>nil then begin
OpenFlags:=[ofAddToRecent,ofRegularFile];
for i:=0 to CmdLineFiles.Count-1 do
Begin
AFilename:=CleanAndExpandFilename(CmdLineFiles.Strings[i]);
if i<CmdLineFiles.Count then
Include(OpenFlags,ofMultiOpen)
else
Exclude(OpenFlags,ofMultiOpen);
if DoOpenEditorFile(AFilename,-1,OpenFlags)=mrAbort then begin
break;
if CompareFileExt(AFilename,'.lpk',false)=0 then begin
if PkgBoss.DoOpenPackageFile(AFilename,[pofAddToRecent])=mrAbort
then
break;
end else begin
OpenFlags:=[ofAddToRecent,ofRegularFile];
if i<CmdLineFiles.Count then
Include(OpenFlags,ofMultiOpen);
if DoOpenEditorFile(AFilename,-1,OpenFlags)=mrAbort then begin
break;
end;
end;
end;
end;
@ -11375,6 +11379,9 @@ end.
{ =============================================================================
$Log$
Revision 1.834 2005/01/16 13:34:54 mattias
implemented loading .lpk on cmd line
Revision 1.833 2005/01/15 13:44:03 vincents
use xml units from fpc, if not compiling with fpc 1.0

View File

@ -32,7 +32,7 @@ type
ofRevert, // reload file if already open
ofQuiet, // less messages
ofAddToRecent, // add file to recent files
ofRegularFile, // open as regular file (e.g. do not open projects)
ofRegularFile, // open as regular file (e.g. do not open projects/packages)
ofVirtualFile, // open the virtual file
ofConvertMacros, // replace macros in filename
ofUseCache, // do not update file from disk