package uses clause is now created from filenames since FPC gets confused otherwise

git-svn-id: trunk@8427 -
This commit is contained in:
mattias 2006-01-03 23:34:59 +00:00
parent 3e1a27f6dc
commit 154222a21b
6 changed files with 16 additions and 32 deletions

View File

@ -7,13 +7,13 @@ unit GTKOpenGL;
interface
uses
GTKGLAreaControl, nvGL, nvGLX, LazarusPackageIntf;
gtkglareacontrol, nvgl, nvglx, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('GTKGLAreaControl', @GTKGLAreaControl.Register);
RegisterUnit('gtkglareacontrol', @gtkglareacontrol.Register);
end;
initialization

View File

@ -1,6 +1,5 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install
the package ImagesForLazarus 1.0.1.
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit ImagesForLazarus;
@ -8,17 +7,17 @@ unit ImagesForLazarus;
interface
uses
LazPNG, LazPNM, LazJPG, LazBMP, LazTGA, LazXPM, LazarusPackageIntf;
lazpng, lazpnm, lazjpg, lazbmp, laztga, lazxpm, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('LazPNM', @LazPNM.Register);
RegisterUnit('LazJPG', @LazJPG.Register);
RegisterUnit('LazTGA', @LazTGA.Register);
RegisterUnit('lazpnm', @lazpnm.Register);
RegisterUnit('lazjpg', @lazjpg.Register);
RegisterUnit('laztga', @laztga.Register);
end;
initialization
RegisterPackage('ImagesForLazarus', @Register)
RegisterPackage('ImagesForLazarus', @Register);
end.

View File

@ -7,7 +7,7 @@ unit JPEGForLazarus;
interface
uses
LazJPEG, LazarusPackageIntf;
lazjpeg, LazarusPackageIntf;
implementation

View File

@ -7,13 +7,13 @@ unit Printer4Lazarus;
interface
uses
PrintersDlgs, OSPrinters, LazarusPackageIntf;
printersdlgs, osprinters, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('PrintersDlgs', @PrintersDlgs.Register);
RegisterUnit('printersdlgs', @printersdlgs.Register);
end;
initialization

View File

@ -7,14 +7,14 @@ unit RunTimeTypeInfoControls;
interface
uses
RTTICtrls, RTTIGrids, LazarusPackageIntf;
rttictrls, rttigrids, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('RTTICtrls', @RTTICtrls.Register);
RegisterUnit('RTTIGrids', @RTTIGrids.Register);
RegisterUnit('rttictrls', @rttictrls.Register);
RegisterUnit('rttigrids', @rttigrids.Register);
end;
initialization

View File

@ -3054,22 +3054,7 @@ begin
// update unitname
if FilenameIsPascalUnit(CurFile.Filename)
and (CurFile.FileType in PkgFileUnitTypes) then begin
CodeBuffer:=CodeToolBoss.LoadFile(CurFile.Filename,false,false);
if CodeBuffer<>nil then begin
// if the unit is edited, the unitname is probably already cached
CurUnitName:=CodeToolBoss.GetCachedSourceName(CodeBuffer);
// if not then parse it
if AnsiCompareText(CurUnitName,CurFile.UnitName)<>0 then
CurUnitName:=CodeToolBoss.GetSourceName(CodeBuffer,false);
// if it makes sense, update unitname
if AnsiCompareText(CurUnitName,CurFile.UnitName)=0 then
CurFile.UnitName:=CurUnitName;
end;
CurUnitName:=CurFile.UnitName;
// make sure the unitname makes sense
CaseInsensitiveUnitName:=ExtractFileNameOnly(CurFile.Filename);
if SysUtils.CompareText(CurUnitName,CaseInsensitiveUnitName)<>0 then
CurUnitName:=CaseInsensitiveUnitName;
CurUnitName:=ExtractFileNameOnly(CurFile.Filename);
if (CurUnitName<>'') and IsValidIdent(CurUnitName) then begin
NeedsRegisterProcCall:=CurFile.HasRegisterProc
and (APackage.PackageType in [lptDesignTime,lptRunAndDesignTime]);