View Issue Details

IDProjectCategoryView StatusLast Update
0031597PatchesIDEpublic2019-12-12 11:38
ReporterCudaText manAssigned ToMattias Gaertner 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0031597: Mac app-bundle cannot run w/out debugging
DescriptionOn Mac, application bundle cannot run w/out debug.
Picture- this error shown.
Fix added.

I tried 1st to make fix inside lower block which calcs exe-name and exe-parameters, code runs Process with this exe+params.
It dont work. appbundle dont run then (no error).
So i did other way: used Process.CommandLine, and appbundle runs then.
TagsNo tags attached.
Fixed in Revision54482
LazTarget-
Widgetset
Attached Files
  • mac-err-no-debug.png (65,131 bytes)
    mac-err-no-debug.png (65,131 bytes)
  • app.diff (992 bytes)
    Index: ide/main.pp
    ===================================================================
    --- ide/main.pp	(revision 54479)
    +++ ide/main.pp	(working copy)
    @@ -7049,16 +7049,30 @@
       if Result <> mrOK then
         Exit;
     
    +  ExeCmdLine := MainBuildBoss.GetRunCommandLine;
    +  if ExeCmdLine='' then
    +  begin
    +    IDEMessageDialog(lisUnableToRun, lisLaunchingApplicationInvalid,
    +      mtError,[mbCancel]);
    +    Exit(mrNone);
    +  end;
    +
       Process := TProcessUTF8.Create(nil);
    -  try
    -    ExeCmdLine := MainBuildBoss.GetRunCommandLine;
    -    if ExeCmdLine='' then
    -    begin
    -      IDEMessageDialog(lisUnableToRun, lisLaunchingApplicationInvalid,
    -        mtError,[mbCancel]);
    -      Exit(mrNone);
    +
    +  {$ifdef darwin}
    +  if Project1.UseAppBundle then
    +  begin
    +    try
    +      Process.CommandLine := '/usr/bin/open '+ExeCmdLine;
    +      Process.Execute;
    +    finally
    +      Process.Free;
         end;
    +    Exit;
    +  end;
    +  {$endif}
     
    +  try
         if ExeCmdLine[1]='"' then
         begin
           ExeFileStart := 2;
    
    app.diff (992 bytes)

Relationships

has duplicate 0030490 closedJuha Manninen Lazarus Run without debugging: Cannot run compiled application from IDE (launching application invalid) 

Activities

CudaText man

2017-03-25 19:47

reporter  

mac-err-no-debug.png (65,131 bytes)
mac-err-no-debug.png (65,131 bytes)

CudaText man

2017-03-25 19:48

reporter  

app.diff (992 bytes)
Index: ide/main.pp
===================================================================
--- ide/main.pp	(revision 54479)
+++ ide/main.pp	(working copy)
@@ -7049,16 +7049,30 @@
   if Result <> mrOK then
     Exit;
 
+  ExeCmdLine := MainBuildBoss.GetRunCommandLine;
+  if ExeCmdLine='' then
+  begin
+    IDEMessageDialog(lisUnableToRun, lisLaunchingApplicationInvalid,
+      mtError,[mbCancel]);
+    Exit(mrNone);
+  end;
+
   Process := TProcessUTF8.Create(nil);
-  try
-    ExeCmdLine := MainBuildBoss.GetRunCommandLine;
-    if ExeCmdLine='' then
-    begin
-      IDEMessageDialog(lisUnableToRun, lisLaunchingApplicationInvalid,
-        mtError,[mbCancel]);
-      Exit(mrNone);
+
+  {$ifdef darwin}
+  if Project1.UseAppBundle then
+  begin
+    try
+      Process.CommandLine := '/usr/bin/open '+ExeCmdLine;
+      Process.Execute;
+    finally
+      Process.Free;
     end;
+    Exit;
+  end;
+  {$endif}
 
+  try
     if ExeCmdLine[1]='"' then
     begin
       ExeFileStart := 2;
app.diff (992 bytes)

Mattias Gaertner

2017-03-25 20:55

manager   ~0099222

Thanks.
I kept the working directory.

Issue History

Date Modified Username Field Change
2017-03-25 19:47 CudaText man New Issue
2017-03-25 19:47 CudaText man File Added: mac-err-no-debug.png
2017-03-25 19:48 CudaText man File Added: app.diff
2017-03-25 20:55 Mattias Gaertner Fixed in Revision => 54482
2017-03-25 20:55 Mattias Gaertner LazTarget => -
2017-03-25 20:55 Mattias Gaertner Note Added: 0099222
2017-03-25 20:55 Mattias Gaertner Status new => resolved
2017-03-25 20:55 Mattias Gaertner Resolution open => fixed
2017-03-25 20:55 Mattias Gaertner Assigned To => Mattias Gaertner
2017-04-30 16:25 Juha Manninen Relationship added has duplicate 0030490