mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 12:40:36 +00:00
Improves the .command file generated to launch executables
The same improvements made to qb64_start_osx.command are now present in the .command file that is generated in OS X after a program is compiled into an executable. This way, Terminal is closed as soon as the program is launched.
This commit is contained in:
parent
32d0811632
commit
95af7ff6a6
|
@ -11989,7 +11989,13 @@ IF os$ = "LNX" THEN
|
|||
OPEN file$ + extension$ + "_start.command" FOR OUTPUT AS #ff
|
||||
PRINT #ff, "cd " + CHR$(34) + "$(dirname " + CHR$(34) + "$0" + CHR$(34) + ")" + CHR$(34);
|
||||
PRINT #ff, CHR$(10);
|
||||
PRINT #ff, "./" + file$ + extension$;
|
||||
PRINT #ff, "./" + file$ + extension$ + " &";
|
||||
PRINT #ff, CHR$(10);
|
||||
PRINT #ff, "osascript -e 'tell application " + CHR$(34) + "Terminal" + CHR$(34) + " to close (every window whose name contains " + CHR$(34) + file$ + extension$ + "_start.command" + CHR$(34) + ")' &";
|
||||
PRINT #ff, CHR$(10);
|
||||
PRINT #ff, "osascript -e 'if (count the windows of application " + CHR$(34) + "Terminal" + CHR$(34) + ") is 0 then tell application " + CHR$(34) + "Terminal" + CHR$(34) + " to quit' &";
|
||||
PRINT #ff, CHR$(10);
|
||||
PRINT #ff, "exit";
|
||||
PRINT #ff, CHR$(10);
|
||||
CLOSE #ff
|
||||
SHELL _HIDE "chmod +x " + file$ + extension$ + "_start.command"
|
||||
|
|
Loading…
Reference in a new issue