Ticket #1434: terminal.patch

File terminal.patch, 737 bytes (added by bennie, 2 years ago)

Functioning patch on revision 19064. Utilizes applescript to spawn a terminal and run the program. There is a possible opportunity to hijack the perl command to use an in-DMG perl interpreter for running the application. Also, should there be a shell option to close the terminal when done? (IE: Return to close.) or a sleep as with the xterm command other OSes use.

  • lib/Padre/Wx/Main.pm

     
    29452945                    system qq(xterm -sb -e "$cmd; sleep 1000" &); 
    29462946                } 
    29472947            } 
    2948         } elsif (Padre::Constant::UNIX) { 
     2948        } elsif (Padre::Constant::MAC) { 
    29492949 
    2950             # tome 
     2950            my $pwd = $self->current->document->project_dir(); 
     2951            $cmd =~ s/"/\\"/g; 
     2952            # Applescript can throw spurious errors on STDERR: http://helpx.adobe.com/photoshop/kb/unit-type-conversion-error-applescript.html 
     2953            system qq(osascript -e 'tell app "Terminal"\n\tdo script "cd $pwd; clear; $cmd;"\nend tell'\n); 
     2954             
    29512955        } else { 
    29522956            system qq(xterm -sb -e "$cmd; sleep 1000" &); 
    29532957        }