mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-25 01:10:29 +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;
|
function TLazPackageGraph.SavePackageMainSource(APackage: TLazPackage;
|
||||||
Flags: TPkgCompileFlags; ShowAbort: boolean): TModalResult;
|
Flags: TPkgCompileFlags; ShowAbort: boolean): TModalResult;
|
||||||
var
|
var
|
||||||
SrcFilename: String;
|
PkgUnitName, SrcFilename, UsedUnits, Src: String;
|
||||||
UsedUnits: String;
|
|
||||||
Src: String;
|
|
||||||
i: Integer;
|
i: Integer;
|
||||||
e: String;
|
e: String;
|
||||||
CurFile: TPkgFile;
|
CurFile: TPkgFile;
|
||||||
@ -3780,7 +3778,11 @@ begin
|
|||||||
+lisPkgMangThisFileWasAutomaticallyCreatedByLazarusDoNotEdit+e
|
+lisPkgMangThisFileWasAutomaticallyCreatedByLazarusDoNotEdit+e
|
||||||
+' '+lisPkgMangThisSourceIsOnlyUsedToCompileAndInstallThePackage+e
|
+' '+lisPkgMangThisSourceIsOnlyUsedToCompileAndInstallThePackage+e
|
||||||
+' }'+e+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
|
+e
|
||||||
+'interface'+e
|
+'interface'+e
|
||||||
+e;
|
+e;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user