mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 12:20:22 +02:00
IDE: simplified DoRunProjectWithoutDebug
git-svn-id: trunk@56792 -
This commit is contained in:
parent
b227fe293f
commit
5e9de6d214
@ -1345,6 +1345,7 @@
|
||||
<Unit233>
|
||||
<Filename Value="basedebugmanager.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="BaseDebugManager"/>
|
||||
</Unit233>
|
||||
<Unit234>
|
||||
<Filename Value="imexportcompileropts.pas"/>
|
||||
|
19
ide/main.pp
19
ide/main.pp
@ -7039,8 +7039,7 @@ end;
|
||||
function TMainIDE.DoRunProjectWithoutDebug: TModalResult;
|
||||
var
|
||||
Process: TProcessUTF8;
|
||||
ExeCmdLine, ExeWorkingDirectory: string;
|
||||
ExeFileEnd, ExeFileStart: Integer;
|
||||
ExeCmdLine, ExeWorkingDirectory, ExeFile, Params: string;
|
||||
RunAppBundle: Boolean;
|
||||
ARunMode: TRunParamsOptionsMode;
|
||||
begin
|
||||
@ -7066,20 +7065,10 @@ begin
|
||||
RunAppBundle:={$IFDEF Darwin}true{$ELSE}false{$ENDIF};
|
||||
RunAppBundle:=RunAppBundle and Project1.UseAppBundle;
|
||||
|
||||
if ExeCmdLine[1]='"' then
|
||||
begin
|
||||
ExeFileStart := 2;
|
||||
ExeFileEnd := PosEx('"', ExeCmdLine, ExeFileStart);
|
||||
end else
|
||||
begin
|
||||
ExeFileStart := 1;
|
||||
ExeFileEnd := PosEx(' ', ExeCmdLine, ExeFileStart);
|
||||
if ExeFileEnd<1 then
|
||||
ExeFileEnd := Length(ExeCmdLine)+1;
|
||||
end;
|
||||
SplitCmdLine(ExeCmdLine,ExeFile,Params);
|
||||
|
||||
Process.Executable := Copy(ExeCmdLine, ExeFileStart, ExeFileEnd-ExeFileStart);
|
||||
Process.Parameters.Text := Copy(ExeCmdLine, ExeFileEnd+ExeFileStart, High(Integer));
|
||||
Process.Executable := ExeFile;
|
||||
Process.Parameters.Text := Params;
|
||||
ARunMode := Project1.RunParameterOptions.GetActiveMode;
|
||||
|
||||
if RunAppBundle and FileExistsUTF8(Process.Executable)
|
||||
|
Loading…
Reference in New Issue
Block a user