1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-06 01:10:23 +00:00

Fix .h file resolution when compiling via command line

When compiling via the command line (NoIDEMode) the `idepath$` is blank
and `path.source$` contains the path to the source file.
This commit is contained in:
Matthew Kilgore 2023-03-27 00:16:04 -04:00 committed by Matt Kilgore
parent 1f49cee3d1
commit 312e31ab0f

View file

@ -4481,11 +4481,14 @@ DO
sfheader = 1
GOTO GotHeader
END IF
' a740g: Fallback to source path
IF inclevel > 0 THEN
libpath$ = getfilepath(incname(inclevel)) + og_libpath$
ELSEIF NoIDEMode THEN
libpath$ = FixDirectoryName(path.source$) + og_libpath$
ELSE
libpath$ = FixDirectoryName(idepath$) + og_libpath$
IF LEN(ideprogname) THEN libpath$ = idepath$ + pathsep$ + og_libpath$
END IF
libpath_inline$ = GetEscapedPath(libpath$)
IF _FILEEXISTS(libpath$ + x$ + ".h") THEN
@ -4555,8 +4558,10 @@ DO
' a740g: Fallback to source path
IF inclevel > 0 THEN
libpath$ = getfilepath(incname(inclevel)) + og_libpath$
ELSEIF NoIDEMode THEN
libpath$ = FixDirectoryName(path.source$) + og_libpath$
ELSE
libpath$ = FixDirectoryName(idepath$) + og_libpath$
IF LEN(ideprogname) THEN libpath$ = idepath$ + pathsep$ + og_libpath$
END IF
libpath_inline$ = GetEscapedPath(libpath$)
IF _FILEEXISTS(libpath$ + x$ + ".h") THEN