mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 06:36:48 +02:00
lazbuild: fixed error code on project/ide build failed
git-svn-id: trunk@36297 -
This commit is contained in:
parent
260c7a9537
commit
928fec26d1
@ -1052,6 +1052,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
LinePos := CurLine.LineNum;
|
LinePos := CurLine.LineNum;
|
||||||
|
LineBSize := 0;
|
||||||
FInternalIterator.Invalidate; // TODO: better notification system
|
FInternalIterator.Invalidate; // TODO: better notification system
|
||||||
|
|
||||||
if aLineBrkCnt > 0 then begin
|
if aLineBrkCnt > 0 then begin
|
||||||
|
@ -3831,6 +3831,10 @@ resourcestring
|
|||||||
lisPkgMangThePackageIsMarkedForInstallationButCanNotBeFound = 'The package %'
|
lisPkgMangThePackageIsMarkedForInstallationButCanNotBeFound = 'The package %'
|
||||||
+'s%s%s is marked for installation, but can not be found.%sRemove '
|
+'s%s%s is marked for installation, but can not be found.%sRemove '
|
||||||
+'dependency from the installation list of packages?';
|
+'dependency from the installation list of packages?';
|
||||||
|
lisERRORInvalidBuildMode = 'ERROR: invalid build mode "%s"';
|
||||||
|
lisAvailableProjectBuildModes = 'Available project build modes:';
|
||||||
|
lisThisProjectHasOnlyTheDefaultBuildMode = 'This project has only the '
|
||||||
|
+'default build mode.';
|
||||||
lisPkgMangstaticPackagesConfigFile = 'static packages config file';
|
lisPkgMangstaticPackagesConfigFile = 'static packages config file';
|
||||||
lisPkgMangUnableToCreateTargetDirectoryForLazarus = 'Unable to create '
|
lisPkgMangUnableToCreateTargetDirectoryForLazarus = 'Unable to create '
|
||||||
+'target directory for lazarus:%s%s%s%s.%sThis directory is needed for '
|
+'target directory for lazarus:%s%s%s%s.%sThis directory is needed for '
|
||||||
|
@ -434,7 +434,7 @@ begin
|
|||||||
debugln(BuildLazProfiles[i].Name);
|
debugln(BuildLazProfiles[i].Name);
|
||||||
end;
|
end;
|
||||||
debugln;
|
debugln;
|
||||||
exit;
|
Halt(ErrorBuildFailed);
|
||||||
end;
|
end;
|
||||||
CurProf:=BuildLazProfiles[i];
|
CurProf:=BuildLazProfiles[i];
|
||||||
end;
|
end;
|
||||||
@ -634,6 +634,7 @@ var
|
|||||||
TargetExeDir: String;
|
TargetExeDir: String;
|
||||||
NewBuildMode: TProjectBuildMode;
|
NewBuildMode: TProjectBuildMode;
|
||||||
CompilePolicy: TPackageUpdatePolicy;
|
CompilePolicy: TPackageUpdatePolicy;
|
||||||
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
CloseProject(Project1);
|
CloseProject(Project1);
|
||||||
@ -649,7 +650,26 @@ begin
|
|||||||
if (BuildModeOverride<>'') then begin
|
if (BuildModeOverride<>'') then begin
|
||||||
NewBuildMode:=Project1.BuildModes.Find(BuildModeOverride);
|
NewBuildMode:=Project1.BuildModes.Find(BuildModeOverride);
|
||||||
if NewBuildMode=nil then
|
if NewBuildMode=nil then
|
||||||
Error(ErrorBuildFailed,'invalid build mode '+BuildModeOverride);
|
begin
|
||||||
|
debugln([Format(lisERRORInvalidBuildMode, [BuildModeOverride])]);
|
||||||
|
debugln;
|
||||||
|
if Project1.BuildModes.Count>1 then
|
||||||
|
begin
|
||||||
|
debugln(lisAvailableProjectBuildModes);
|
||||||
|
for i:=0 to Project1.BuildModes.Count-1 do
|
||||||
|
begin
|
||||||
|
if Project1.BuildModes[i]=Project1.ActiveBuildMode then
|
||||||
|
dbgout('* ')
|
||||||
|
else
|
||||||
|
dbgout(' ');
|
||||||
|
debugln(Project1.BuildModes[i].Name);
|
||||||
|
end;
|
||||||
|
end else begin
|
||||||
|
debugln(lisThisProjectHasOnlyTheDefaultBuildMode);
|
||||||
|
end;
|
||||||
|
debugln;
|
||||||
|
Halt(ErrorBuildFailed);
|
||||||
|
end;
|
||||||
Project1.ActiveBuildMode:=NewBuildMode;
|
Project1.ActiveBuildMode:=NewBuildMode;
|
||||||
end;
|
end;
|
||||||
// then override specific options
|
// then override specific options
|
||||||
|
Loading…
Reference in New Issue
Block a user