On 05 May 2012, at 14:02, Tomas Hajny wrote: > My proposal is platform independent (i.e. it will work also under Win32, > OS/2, etc., without any changes). Your proposal probably requires starting > the compiled binary using platform specific API functions to run it with a > modified environment rather than using ExecuteProcess which results in > passing the standard parent's environment (changing the current's process > environment may not be supported on all platforms).
An alternative would be for instantfpc to create a temporary unit containing this constant, and inject it in the main program via the -Fa parameter. I don't know whether moving an instantfpc-based script also invalidates the cached compiled copy though (but I guess it does, because otherwise you wouldn't be able have two scripts with the same name in different locations). Jonas_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal