Page 1 of 1

#PB_Compiler_Project constants

Posted: Fri Feb 05, 2016 2:48 pm
by kenmo
It would be nice to have:

Code: Select all

#PB_Compiler_Project
#PB_Compiler_ProjectName
#PB_Compiler_ProjectPath
similar to #PB_Compiler_File, #PB_Compiler_Filename, #PB_Compiler_FilePath, because sometimes the main project folder (holding PBP file) is not the same as the source code folder.

The first constant would be most useful. The other two are just for convenience, could be derived like GetFilePart(#PB_Compiler_Project).
(All three would of course be "" if a file is compiled without any associated project.)


This way, if your project structure is like:
MyProject/MyProject.pbp
MyProject/Source/Main.pb
MyProject/Source/Images.pbi
MyProject/Images/Icon.png
then "Images.pbi" could reference "Icon.png" such as

Code: Select all

IncludeBinary #PB_Compiler_ProjectPath + "Images/Icon.png"

Not critical, just a request!

Re: #PB_Compiler_Project constants

Posted: Fri Feb 05, 2016 9:17 pm
by User_Russian

Re: #PB_Compiler_Project constants

Posted: Fri Feb 05, 2016 11:29 pm
by kenmo
Sorry! I did not see your post!

Re: #PB_Compiler_Project constants

Posted: Fri Feb 05, 2016 11:50 pm
by Amilcar Matos
+1