mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-23 20:46:20 +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;
|
||||
|
||||
LinePos := CurLine.LineNum;
|
||||
LineBSize := 0;
|
||||
FInternalIterator.Invalidate; // TODO: better notification system
|
||||
|
||||
if aLineBrkCnt > 0 then begin
|
||||
|
@ -3831,6 +3831,10 @@ resourcestring
|
||||
lisPkgMangThePackageIsMarkedForInstallationButCanNotBeFound = 'The package %'
|
||||
+'s%s%s is marked for installation, but can not be found.%sRemove '
|
||||
+'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';
|
||||
lisPkgMangUnableToCreateTargetDirectoryForLazarus = 'Unable to create '
|
||||
+'target directory for lazarus:%s%s%s%s.%sThis directory is needed for '
|
||||
|
@ -434,7 +434,7 @@ begin
|
||||
debugln(BuildLazProfiles[i].Name);
|
||||
end;
|
||||
debugln;
|
||||
exit;
|
||||
Halt(ErrorBuildFailed);
|
||||
end;
|
||||
CurProf:=BuildLazProfiles[i];
|
||||
end;
|
||||
@ -634,6 +634,7 @@ var
|
||||
TargetExeDir: String;
|
||||
NewBuildMode: TProjectBuildMode;
|
||||
CompilePolicy: TPackageUpdatePolicy;
|
||||
i: Integer;
|
||||
begin
|
||||
Result:=false;
|
||||
CloseProject(Project1);
|
||||
@ -649,7 +650,26 @@ begin
|
||||
if (BuildModeOverride<>'') then begin
|
||||
NewBuildMode:=Project1.BuildModes.Find(BuildModeOverride);
|
||||
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;
|
||||
end;
|
||||
// then override specific options
|
||||
|
Loading…
Reference in New Issue
Block a user