mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 03:39:18 +02:00
lplupdate: auto fix common mistake starting lplupdate in tools
git-svn-id: trunk@35558 -
This commit is contained in:
parent
e1ddbfcb9a
commit
358cda1e11
@ -66,13 +66,13 @@ type
|
|||||||
TLink = class
|
TLink = class
|
||||||
public
|
public
|
||||||
Filename: string;
|
Filename: string;
|
||||||
InLazarusDir: boolean; // PkgFilename starts with $(LazarusDir)
|
InLazarusDir: boolean; // true = PkgFilename starts with $(LazarusDir)
|
||||||
PkgName: string;
|
PkgName: string;
|
||||||
Major: integer;
|
Major: integer;
|
||||||
Minor: integer;
|
Minor: integer;
|
||||||
Release: integer;
|
Release: integer;
|
||||||
Build: integer;
|
Build: integer;
|
||||||
PkgFilename: string;
|
PkgFilename: string; // can have macros
|
||||||
ExpFilename: string; // full PkgFilename without macros
|
ExpFilename: string; // full PkgFilename without macros
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -449,8 +449,14 @@ function TLPLUpdate.GetDefaultLazarusDir: string;
|
|||||||
begin
|
begin
|
||||||
if GetEnvironmentVariableUTF8('LAZARUSDIR')<>'' then
|
if GetEnvironmentVariableUTF8('LAZARUSDIR')<>'' then
|
||||||
Result:=GetEnvironmentVariableUTF8('LAZARUSDIR')
|
Result:=GetEnvironmentVariableUTF8('LAZARUSDIR')
|
||||||
else
|
else begin
|
||||||
Result:=GetCurrentDirUTF8;
|
Result:=ChompPathDelim(GetCurrentDirUTF8);
|
||||||
|
if (ExtractFileName(Result)='tools')
|
||||||
|
and (DirPathExists(ExtractFilePath(Result)+'packager')) then begin
|
||||||
|
// common mistake: lplupdate started in tools
|
||||||
|
Result:=ExtractFilePath(Result)
|
||||||
|
end;
|
||||||
|
end;
|
||||||
Result:=CleanAndExpandDirectory(Result);
|
Result:=CleanAndExpandDirectory(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user