mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 01:36:16 +02:00
IDE: Support dot (".") in project name. Issue #29854.
git-svn-id: trunk@59005 -
This commit is contained in:
parent
bae00a04b3
commit
a10d4dadc6
@ -59,7 +59,6 @@ type
|
||||
function GetIsEmpry: Boolean;
|
||||
procedure SetIcoFileName(AValue: String);
|
||||
procedure SetIconData(const AValue: TIconData);
|
||||
procedure SetFileNames(const MainFilename: string);
|
||||
procedure SetIsEmpty(const AValue: Boolean);
|
||||
public
|
||||
constructor Create; override;
|
||||
@ -135,11 +134,10 @@ var
|
||||
ItemStream: TStream;
|
||||
begin
|
||||
Result := True;
|
||||
|
||||
if FData = nil then
|
||||
Exit;
|
||||
|
||||
SetFileNames(MainFilename);
|
||||
IcoFileName := ExtractFilePath(MainFilename)+ExtractFileNameOnly(MainFileName)+'.ico';
|
||||
if FilenameIsAbsolute(FIcoFileName) then
|
||||
if not SaveIconFile then begin
|
||||
debugln(['TProjectIcon.UpdateResources CreateIconFile "'+FIcoFileName+'" failed']);
|
||||
@ -214,15 +212,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{-----------------------------------------------------------------------------
|
||||
TProjectIcon SetFileNames
|
||||
-----------------------------------------------------------------------------}
|
||||
procedure TProjectIcon.SetFileNames(const MainFilename: string);
|
||||
begin
|
||||
IcoFileName := ExtractFilePath(MainFilename) +
|
||||
ExtractFileNameWithoutExt(ExtractFileName(MainFileName)) + '.ico';
|
||||
end;
|
||||
|
||||
procedure TProjectIcon.SetIsEmpty(const AValue: Boolean);
|
||||
var
|
||||
NewData: TIconData;
|
||||
|
@ -7542,7 +7542,7 @@ begin
|
||||
// Note: add *.* filter, so users can see the files in the target directory
|
||||
SaveDialog.Filter := '*' + Ext + '|' + '*' + Ext
|
||||
+ '|' + dlgFilterAll + ' (' + GetAllFilesMask + ')|' + GetAllFilesMask;
|
||||
SaveDialog.DefaultExt := ExtractFileExt(AFilename);
|
||||
SaveDialog.DefaultExt := Ext;
|
||||
if not Project1.IsVirtual then
|
||||
SaveDialog.InitialDir := Project1.Directory;
|
||||
|
||||
@ -7592,7 +7592,7 @@ begin
|
||||
if UseMainSourceFile then
|
||||
NewProgramFN := ExtractFileName(AFilename)
|
||||
else
|
||||
NewProgramFN := ExtractFileNameWithoutExt(NewProgramName) + Ext;
|
||||
NewProgramFN := NewProgramName + Ext;
|
||||
NewProgramFN := ExtractFilePath(NewLPIFilename) + NewProgramFN;
|
||||
if (CompareFilenames(NewLPIFilename, NewProgramFN) = 0) then
|
||||
begin
|
||||
@ -7671,7 +7671,6 @@ begin
|
||||
if (Project1.MainUnitID >= 0) then
|
||||
begin
|
||||
GetMainUnit(MainUnitInfo, MainUnitSrcEdit, true);
|
||||
|
||||
if not Project1.ProjResources.RenameDirectives(MainUnitInfo.Filename,NewProgramFN)
|
||||
then begin
|
||||
DebugLn(['ShowSaveProjectAsDialog failed renaming directives Old="',MainUnitInfo.Filename,'" New="',NewProgramFN,'"']);
|
||||
|
Loading…
Reference in New Issue
Block a user