#PB_Compiler_Executable

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

#PB_Compiler_Executable

Post by PB »

We have a constant called #PB_Compiler_File which gives us the name of
the source code we're working on, but it'd be nice to have a constant called
#PB_Compiler_Executable that gives us the name of an exe just compiled.
That way we could set an IDE tool to work on the exe after compilation. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

To know the name of the exe within the program itself, use ProgramFilename().
A compiler constant would be fairly useless, as it becomes incorrect as soon as
you move the compiled program to a new location ;)

To know the compiled executable from a tool, use the %EXECUTABLE commandline option
for the tool. Having a constant for it _inside_ the compiled program will not
help your tool anyway.
quidquid Latine dictum sit altum videtur
Post Reply