mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-28 11:17:46 +00:00
Detects if the last generated binary still exists at F5 or F11.
Closes #63
This commit is contained in:
parent
53d3341ec3
commit
bed68767e6
2 changed files with 20 additions and 11 deletions
|
@ -1434,7 +1434,7 @@ FUNCTION ide2 (ignore)
|
|||
|
||||
IF idecompiled THEN
|
||||
|
||||
IF iderunmode = 2 THEN
|
||||
IF iderunmode = 2 AND _FILEEXISTS(lastBinaryGenerated$) THEN
|
||||
LOCATE idewy - 3, 2
|
||||
|
||||
IF os$ = "LNX" THEN
|
||||
|
@ -1444,6 +1444,9 @@ FUNCTION ide2 (ignore)
|
|||
END IF
|
||||
|
||||
GOTO specialchar
|
||||
ELSEIF _FILEEXISTS(lastBinaryGenerated$) = 0 THEN
|
||||
idecompiled = 0
|
||||
GOTO mustGenerateExe
|
||||
END IF
|
||||
|
||||
dummy = DarkenFGBG(1)
|
||||
|
@ -1452,6 +1455,7 @@ FUNCTION ide2 (ignore)
|
|||
COLOR 15, 1
|
||||
LOCATE idewy - 3, 2: PRINT "Starting program...";
|
||||
ELSE
|
||||
mustGenerateExe:
|
||||
dummy = DarkenFGBG(1)
|
||||
BkpIdeSystem = IdeSystem: IdeSystem = 2: GOSUB UpdateTitleOfMainWindow: IdeSystem = BkpIdeSystem
|
||||
COLOR 1, 7: LOCATE idewy - 4, (idewx - 8) / 2: PRINT " Status "
|
||||
|
|
|
@ -205,7 +205,7 @@ NEXT
|
|||
|
||||
|
||||
DIM SHARED extension AS STRING
|
||||
DIM SHARED path.exe$, path.source$
|
||||
DIM SHARED path.exe$, path.source$, lastBinaryGenerated$
|
||||
extension$ = ".exe"
|
||||
IF os$ = "LNX" THEN extension$ = "" 'no extension under Linux
|
||||
|
||||
|
@ -1192,14 +1192,14 @@ IF C = 9 THEN 'run
|
|||
'execute program
|
||||
|
||||
IF iderunmode = 1 THEN
|
||||
IF os$ = "WIN" THEN SHELL _DONTWAIT QuotedFilename$(CHR$(34) + path.exe$ + file$ + extension$ + CHR$(34)) + ModifyCOMMAND$
|
||||
IF os$ = "WIN" THEN SHELL _DONTWAIT QuotedFilename$(CHR$(34) + lastBinaryGenerated$ + CHR$(34)) + ModifyCOMMAND$
|
||||
IF path.exe$ = "" THEN path.exe$ = "./"
|
||||
IF os$ = "LNX" THEN SHELL _DONTWAIT QuotedFilename$(path.exe$ + file$ + extension$) + ModifyCOMMAND$
|
||||
IF os$ = "LNX" THEN SHELL _DONTWAIT QuotedFilename$(lastBinaryGenerated$) + ModifyCOMMAND$
|
||||
IF path.exe$ = "./" THEN path.exe$ = ""
|
||||
ELSE
|
||||
IF os$ = "WIN" THEN SHELL QuotedFilename$(CHR$(34) + path.exe$ + file$ + extension$ + CHR$(34)) + ModifyCOMMAND$
|
||||
IF os$ = "WIN" THEN SHELL QuotedFilename$(CHR$(34) + lastBinaryGenerated$ + CHR$(34)) + ModifyCOMMAND$
|
||||
IF path.exe$ = "" THEN path.exe$ = "./"
|
||||
IF os$ = "LNX" THEN SHELL QuotedFilename$(path.exe$ + file$ + extension$) + ModifyCOMMAND$
|
||||
IF os$ = "LNX" THEN SHELL QuotedFilename$(lastBinaryGenerated$) + ModifyCOMMAND$
|
||||
IF path.exe$ = "./" THEN path.exe$ = ""
|
||||
DO: LOOP UNTIL INKEY$ = ""
|
||||
DO: LOOP UNTIL _KEYHIT = 0
|
||||
|
@ -12545,7 +12545,12 @@ END IF
|
|||
|
||||
IF No_C_Compile_Mode THEN compfailed = 0: GOTO No_C_Compile
|
||||
IF path.exe$ = "../../" OR path.exe$ = "..\..\" THEN path.exe$ = ""
|
||||
IF _FILEEXISTS(path.exe$ + file$ + extension$) THEN compfailed = 0 ELSE compfailed = 1 'detect compilation failure
|
||||
IF _FILEEXISTS(path.exe$ + file$ + extension$) THEN
|
||||
compfailed = 0
|
||||
lastBinaryGenerated$ = path.exe$ + file$ + extension$
|
||||
ELSE
|
||||
compfailed = 1 'detect compilation failure
|
||||
END IF
|
||||
|
||||
IF compfailed THEN
|
||||
IF idemode THEN
|
||||
|
@ -12557,7 +12562,7 @@ IF compfailed THEN
|
|||
PRINT "Check " + compilelog$ + " for details."
|
||||
END IF
|
||||
ELSE
|
||||
IF idemode = 0 THEN PRINT "OUTPUT: "; path.exe$ + file$ + extension$
|
||||
IF idemode = 0 THEN PRINT "OUTPUT: "; lastBinaryGenerated$
|
||||
END IF
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue