[solved] Compiler Directive adjust directory at compile tim
Posted: Wed Jun 25, 2008 3:11 pm
Dear Board,
is it possible a compile-time to let the compiler decide, what code to
compile...
On Mac-OS, the current directory is foreseeable different when testing
and running an Application. I'd like to add something like
So, if I use the function "Create Executable", the compiler would fill
path$ with "/here/and/there", when compiling/executing the compiler
would fill path$ with "over/there"
See http://www.purebasic.fr/english/viewtopic.php?t=32741 for a
working idea how to accomplish this at runtime.
Is that possible??
Thanks in advance for any ideas
-----
Edit:
fast answer!
Thank you very much, see my reply at the end of this thread.
is it possible a compile-time to let the compiler decide, what code to
compile...
On Mac-OS, the current directory is foreseeable different when testing
and running an Application. I'd like to add something like
Code: Select all
compilerif #compiling_an_executable
path$ = "/here/and/there"
compilerelseif #compiling_for_testing
path$ = "over/there"
compilerendifpath$ with "/here/and/there", when compiling/executing the compiler
would fill path$ with "over/there"
See http://www.purebasic.fr/english/viewtopic.php?t=32741 for a
working idea how to accomplish this at runtime.
Is that possible??
Thanks in advance for any ideas
-----
Edit:
fast answer!