mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 01:00:34 +01:00
packager: use the case of package name instead of file name for auto generated package units by Flávio Etrusco (issue #0016211)
git-svn-id: trunk@26611 -
This commit is contained in:
parent
38555de5d8
commit
d1c36edfd4
@ -3667,9 +3667,7 @@ end;
|
||||
function TLazPackageGraph.SavePackageMainSource(APackage: TLazPackage;
|
||||
Flags: TPkgCompileFlags; ShowAbort: boolean): TModalResult;
|
||||
var
|
||||
SrcFilename: String;
|
||||
UsedUnits: String;
|
||||
Src: String;
|
||||
PkgUnitName, SrcFilename, UsedUnits, Src: String;
|
||||
i: Integer;
|
||||
e: String;
|
||||
CurFile: TPkgFile;
|
||||
@ -3780,7 +3778,11 @@ begin
|
||||
+lisPkgMangThisFileWasAutomaticallyCreatedByLazarusDoNotEdit+e
|
||||
+' '+lisPkgMangThisSourceIsOnlyUsedToCompileAndInstallThePackage+e
|
||||
+' }'+e+e;
|
||||
Src:='unit '+ExtractFileNameOnly(SrcFilename)+';'+e
|
||||
// leave the unit case the same as the package name (e.g: package name LazReport, unit name lazreport)
|
||||
PkgUnitName := ExtractFileNameOnly(SrcFilename);
|
||||
if AnsiSameText(APackage.Name, PkgUnitName) then
|
||||
PkgUnitName := APackage.Name;
|
||||
Src:='unit '+ PkgUnitName +';'+e
|
||||
+e
|
||||
+'interface'+e
|
||||
+e;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user