* Made projects runnable, reduced units in unit uses clause (0019175)

git-svn-id: trunk@30310 -
This commit is contained in:
michael 2011-04-16 10:43:35 +00:00
parent 1761b4f117
commit 3f1d201b00

View File

@ -250,8 +250,6 @@ begin
AProject.MainFile.SetSourceText(NewSource); AProject.MainFile.SetSourceText(NewSource);
// add // add
AProject.AddPackageDependency('FCL');
AProject.AddPackageDependency('LCL');
AProject.AddPackageDependency('WebLaz'); AProject.AddPackageDependency('WebLaz');
// compiler options // compiler options
@ -337,7 +335,6 @@ begin
// compiler options // compiler options
AProject.LazCompilerOptions.Win32GraphicApp:=false; AProject.LazCompilerOptions.Win32GraphicApp:=false;
AProject.Flags := AProject.Flags - [pfMainUnitHasCreateFormStatements]; AProject.Flags := AProject.Flags - [pfMainUnitHasCreateFormStatements];
AProject.Flags := AProject.Flags - [pfRunnable];
Result:= mrOK; Result:= mrOK;
end; end;
@ -358,8 +355,10 @@ end;
function TFileDescWebDataModule.GetInterfaceUsesSection: string; function TFileDescWebDataModule.GetInterfaceUsesSection: string;
begin begin
Result:=inherited GetInterfaceUsesSection; Result:='SysUtils, Classes';
Result:=Result+',HTTPDefs, websession, fpHTTP,fpWeb'; if GetResourceType = rtLRS then
Result := Result+ ', LResources, ';
Result:=Result+', fpHTTP,fpWeb';
end; end;
function TFileDescWebDataModule.GetLocalizedName: string; function TFileDescWebDataModule.GetLocalizedName: string;
@ -393,7 +392,8 @@ end;
function TFileDescHTMLModule.GetInterfaceUsesSection: string; function TFileDescHTMLModule.GetInterfaceUsesSection: string;
begin begin
Result:=inherited GetInterfaceUsesSection; if (GetResourceType = rtLRS) then
Result := Result+ ', LResources, ';
Result:=Result+',HTTPDefs,websession,fpHTTP,htmlwriter,htmlelements,fphtml'; Result:=Result+',HTTPDefs,websession,fpHTTP,htmlwriter,htmlelements,fphtml';
end; end;
@ -577,7 +577,6 @@ begin
// compiler options // compiler options
AProject.LazCompilerOptions.Win32GraphicApp:=false; AProject.LazCompilerOptions.Win32GraphicApp:=false;
AProject.Flags := AProject.Flags - [pfMainUnitHasCreateFormStatements]; AProject.Flags := AProject.Flags - [pfMainUnitHasCreateFormStatements];
AProject.Flags := AProject.Flags - [pfRunnable];
Result:= mrOK; Result:= mrOK;
end; end;
@ -638,13 +637,11 @@ begin
// add // add
AProject.AddPackageDependency('FCL'); AProject.AddPackageDependency('FCL');
AProject.AddPackageDependency('LCL');
AProject.AddPackageDependency('WebLaz'); AProject.AddPackageDependency('WebLaz');
// compiler options // compiler options
AProject.LazCompilerOptions.Win32GraphicApp:=false; AProject.LazCompilerOptions.Win32GraphicApp:=false;
AProject.Flags := AProject.Flags - [pfMainUnitHasCreateFormStatements]; AProject.Flags := AProject.Flags - [pfMainUnitHasCreateFormStatements];
AProject.Flags := AProject.Flags - [pfRunnable];
Result:= mrOK; Result:= mrOK;
end; end;