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

Restore SUB Build's "count separators" method to please Windows XP.

This commit is contained in:
FellippeHeitor 2017-10-22 17:16:54 -02:00
parent 23406bc4d4
commit f223cfe028

View file

@ -23224,9 +23224,18 @@ END IF
END SUB
SUB Build (path$)
previous_dir$ = _CWD$
'Count the separators in the path
depth = 1
FOR x = 1 TO LEN(path$)
IF ASC(path$, x) = 92 OR ASC(path$, x) = 47 THEN depth = depth + 1
NEXT
CHDIR path$
return_path$ = ".."
FOR x = 2 TO depth
return_path$ = return_path$ + "\.."
NEXT
bfh = FREEFILE
OPEN "build" + BATCHFILE_EXTENSION FOR BINARY AS #bfh
DO UNTIL EOF(bfh)
@ -23240,15 +23249,15 @@ DO UNTIL EOF(bfh)
c$ = GDB_Fix$(c$)
IF use THEN
IF os$ = "WIN" THEN
SHELL _HIDE "cmd /C " + c$ + " 2>> " + previous_dir$ + "\" + compilelog$
SHELL _HIDE "cmd /C " + c$ + " 2>> " + return_path$ + "\" + compilelog$
ELSE
SHELL _HIDE c$ + " 2>> " + previous_dir$ + "/" + compilelog$
SHELL _HIDE c$ + " 2>> " + return_path$ + "/" + compilelog$
END IF
END IF
LOOP
CLOSE #bfh
CHDIR previous_dir$
CHDIR return_path$
END SUB