#DEFINE precompile by custom GUI

It is possible using some kind of software to obtain that?

Yes, though not necessarily easy. Your code would have to edit the sketch, to set the values of the #define statements, then invoke the compiler, the linker, and the uploader with the correct arguments, in the correct order.

Otherwise, compiler directives are useless at run time, as they are stripped out at compile time.