* Fixed compilation with latest Lazarus versions

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2619 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
loesje_ 2013-01-11 22:16:58 +00:00
parent c4969596c7
commit ec78bcaa0d
2 changed files with 10 additions and 14 deletions

View File

@ -83,7 +83,7 @@ begin
ext:=ExtractFileExt(Result); ext:=ExtractFileExt(Result);
Result:=Copy(Result, 1, length(Result)-length( ext ) ); Result:=Copy(Result, 1, length(Result)-length( ext ) );
end; end;
Project.LongenFilename(Result); Result := ResolveProjectPath(Result);
end; end;
{ TiPhoneExtension } { TiPhoneExtension }
@ -287,7 +287,7 @@ begin
Result:=false; Result:=false;
//todo: find a better way of getting the file //todo: find a better way of getting the file
icofile:=ChangeFileExt(LazarusIDE.ActiveProject.MainFile.Filename, '.ico'); icofile:=ChangeFileExt(LazarusIDE.ActiveProject.MainFile.Filename, '.ico');
LazarusIDE.ActiveProject.LongenFilename(icofile); icofile := ResolveProjectPath(icofile);
if not FileExists(icofile) then begin if not FileExists(icofile) then begin
// no icon. it should be deleted! // no icon. it should be deleted!
DeleteFile(FullName); DeleteFile(FullName);
@ -384,8 +384,7 @@ begin
build.Values['FPC_CUSTOM_OPTIONS'] :='"'+opt+'"'; build.Values['FPC_CUSTOM_OPTIONS'] :='"'+opt+'"';
dir:='xcode'; dir:=ResolveProjectPath('xcode');
LazarusIDE.ActiveProject.LongenFilename(dir);
dir:=dir+'/'; dir:=dir+'/';
name:=ExtractFileName(GetProjectExeName(LazarusIDE.ActiveProject)); name:=ExtractFileName(GetProjectExeName(LazarusIDE.ActiveProject));

View File

@ -104,8 +104,7 @@ var
tmp : AnsiString; tmp : AnsiString;
begin begin
path:=Trim(edtResDir.Text); path:=Trim(edtResDir.Text);
if (path='') or (path[1]<>PathDelim) then // project relative path path:=ResolveProjectPath(path);
LazarusIDE.ActiveProject.LongenFilename(path);
ForceDirectoriesUTF8(path); ForceDirectoriesUTF8(path);
@ -131,7 +130,7 @@ begin
if (newXibForm.Execute(FileName, SrcXib)) and (SrcXib<>'')then begin if (newXibForm.Execute(FileName, SrcXib)) and (SrcXib<>'')then begin
ResDir:=edtResDir.Text; ResDir:=edtResDir.Text;
LazarusIDE.ActiveProject.LongenFilename(ResDir); ResDir := ResolveProjectPath(ResDir);
ForceDirectoriesUTF8(ResDir); ForceDirectoriesUTF8(ResDir);
if not CopyFile(SrcXib, ChangeFileExt(IncludeTrailingPathDelimiter(ResDir)+FileName,'.xib')) then if not CopyFile(SrcXib, ChangeFileExt(IncludeTrailingPathDelimiter(ResDir)+FileName,'.xib')) then
@ -149,7 +148,7 @@ begin
if nibFilesBox.ItemIndex<0 then Exit; if nibFilesBox.ItemIndex<0 then Exit;
XibName:=edtResDir.Text; XibName:=edtResDir.Text;
LazarusIDE.ActiveProject.LongenFilename(XibName); XibName := ResolveProjectPath(XibName);
XibName:=ChangeFileExt(IncludeTrailingPathDelimiter(XibName)+nibFilesBox.Items[nibFilesBox.ItemIndex],'.xib'); XibName:=ChangeFileExt(IncludeTrailingPathDelimiter(XibName)+nibFilesBox.Items[nibFilesBox.ItemIndex],'.xib');
if FileExistsUTF8(XibName) then DeleteFileUTF8(XibName); if FileExistsUTF8(XibName) then DeleteFileUTF8(XibName);
@ -216,7 +215,7 @@ var
begin begin
if SelXibFile ='' then Exit; if SelXibFile ='' then Exit;
s:=ChangeFileExt(IncludeTrailingPathDelimiter (edtResDir.Text) + SelXibFile,'.xib'); s:=ChangeFileExt(IncludeTrailingPathDelimiter (edtResDir.Text) + SelXibFile,'.xib');
LazarusIDE.ActiveProject.LongenFilename(s); s := ResolveProjectPath(s);
DumpClasses(s, pas); DumpClasses(s, pas);
p:=Parent; p:=Parent;
@ -232,7 +231,7 @@ var
path : AnsiString; path : AnsiString;
begin begin
path:=ChangeFileExt(IncludeTrailingPathDelimiter(edtResDir.Text)+SelXibFile,'.xib'); path:=ChangeFileExt(IncludeTrailingPathDelimiter(edtResDir.Text)+SelXibFile,'.xib');
LazarusIDE.ActiveProject.LongenFilename(path); path := ResolveProjectPath(path);
ExecCmdLineNoWait('open ' + path); ExecCmdLineNoWait('open ' + path);
end; end;
@ -291,10 +290,9 @@ var
st : TStringList; st : TStringList;
i : Integer; i : Integer;
begin begin
path := edtResDir.Text; path := ResolveProjectPath(edtResDir.Text);
st:=TStringList.Create; st:=TStringList.Create;
try try
LazarusIDE.ActiveProject.LongenFilename(path);
EnumFilesAtDir(path, '*.xib', st); EnumFilesAtDir(path, '*.xib', st);
nibFilesBox.Clear; nibFilesBox.Clear;
for i:=0 to st.Count-1 do for i:=0 to st.Count-1 do
@ -459,8 +457,7 @@ begin
xibcls.Free; xibcls.Free;
unitNm:='dump'+ChangeFileExt(ExtractFileName(XibFileName),''); unitNm:='dump'+ChangeFileExt(ExtractFileName(XibFileName),'');
PascalFileName:=unitNm+'.pas'; PascalFileName:=ResolveProjectPath(unitNm+'.pas');
LazarusIDE.ActiveProject.LongenFilename(PascalFileName);
fs:=TFileStream.Create(PascalFileName, fmCreate); fs:=TFileStream.Create(PascalFileName, fmCreate);