From 81a0e7a4b711449a18e36e5f1570c67eb323d040 Mon Sep 17 00:00:00 2001 From: Fellippe Heitor Date: Sat, 25 Jun 2016 22:36:36 -0300 Subject: [PATCH] Fix to relative paths for console compilation. --- source/qb64.bas | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/source/qb64.bas b/source/qb64.bas index fa9e91944..32dd6c41d 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -1156,8 +1156,20 @@ f$ = RemoveFileExtension$(f$) path.exe$ = "" IF SaveExeWithSource THEN + currentdir$ = _CWD$ path.exe$ = getfilepath$(sourcefile$) - IF RIGHT$(path.exe$, 1) <> pathsep$ THEN path.exe$ = path.exe$ + pathsep$ + IF LEN(path.exe$) THEN + IF _DIREXISTS(path.exe$) = 0 THEN + PRINT + PRINT "CANNOT LOCATE SOURCE FILE:" + sourcefile$ + IF ConsoleMode THEN SYSTEM 1 + END 1 + END IF + CHDIR path.exe$ + path.exe$ = _CWD$ + CHDIR currentdir$ + IF RIGHT$(path.exe$, 1) <> pathsep$ THEN path.exe$ = path.exe$ + pathsep$ + END IF END IF IF path.exe$ = "" THEN IF INSTR(_OS$, "WIN") THEN path.exe$ = "..\..\" ELSE path.exe$ = "../../" @@ -19847,8 +19859,8 @@ END SUB SUB reginternal reginternalsubfunc = 1 -'$INCLUDE:'subs_functions\subs_functions.bas' -'$INCLUDE:'subs_functions\extensions\extension_list.bas' + '$INCLUDE:'subs_functions\subs_functions.bas' + '$INCLUDE:'subs_functions\extensions\extension_list.bas' reginternalsubfunc = 0 END SUB