mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 23:29:25 +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
|
||||
public
|
||||
Filename: string;
|
||||
InLazarusDir: boolean; // PkgFilename starts with $(LazarusDir)
|
||||
InLazarusDir: boolean; // true = PkgFilename starts with $(LazarusDir)
|
||||
PkgName: string;
|
||||
Major: integer;
|
||||
Minor: integer;
|
||||
Release: integer;
|
||||
Build: integer;
|
||||
PkgFilename: string;
|
||||
PkgFilename: string; // can have macros
|
||||
ExpFilename: string; // full PkgFilename without macros
|
||||
end;
|
||||
|
||||
@ -449,8 +449,14 @@ function TLPLUpdate.GetDefaultLazarusDir: string;
|
||||
begin
|
||||
if GetEnvironmentVariableUTF8('LAZARUSDIR')<>'' then
|
||||
Result:=GetEnvironmentVariableUTF8('LAZARUSDIR')
|
||||
else
|
||||
Result:=GetCurrentDirUTF8;
|
||||
else begin
|
||||
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);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user