IncludePath in the file created by /PREPROCESS

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

IncludePath in the file created by /PREPROCESS

Post by ChrisR »

I have this file tree:

Code: Select all

<Images>
   | ThisImage.png
   | ThisPC.png
<Include>
   | MyInclude.pbi
MyMainFile.pb

and with inclusions such as:

Code: Select all

IncludePath  "Include"
XIncludeFile "MyInclude.pbi"
    | .....
    | DataSection ; in MyInclude.pbi
    |   ThisPC: : IncludeBinary "..\Images\ThisPC.png"
    |   ;IncludePath "..\Images"
    |   ;ThisPC: : IncludeBinary "\ThisPC.png"
    | EndDataSection
    |
DataSection ; in MyMainFile.pb
  IncludePath "Images"
  ThisImage: : IncludeBinary "ThisImage.png"
EndDataSection

It works like this at compile time
But If I use /PREPROCESS and compile the created file, it doesn't find the included file(path): "..\Images\ThisPC.png", which should be "Images\ThisPC.png" now
Is there a way to fix the path in the pre process file?