1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 11:11:20 +00:00

Relative paths for external libraries

External libraries can now sit in the same folder as your source file without the need to specify a full path. You can use .libraryname or ./libraryname with DECLARE LIBRARY statement blocks.
This commit is contained in:
Fellippe Heitor 2016-06-21 23:53:43 -03:00
parent 5e7e37ea0b
commit b8b4b13302

View file

@ -3686,7 +3686,7 @@ DO
LOOP
END IF
'Seperate path from name
'Separate path from name
libpath$ = ""
FOR z = LEN(x$) TO 1 STEP -1
a = ASC(x$, z)
@ -3697,6 +3697,17 @@ DO
END IF
NEXT
'Accept ./ and .\ as a reference to the source file
'folder, replacing it with the actual full path, if available
IF libpath$ = "./" OR libpath$ = ".\" THEN
libpath$ = ""
IF NoIDEMode THEN
IF LEFT$(path.exe$, 2) <> ".." THEN libpath$ = path.exe$
ELSE
IF LEN(ideprogname) THEN libpath$ = idepath$ + pathsep$
END IF
END IF
'Create a path which can be used for inline code (uses \\ instead of \)
libpath_inline$ = ""
FOR z = 1 TO LEN(libpath$)