[fpc-pascal] InstantFPC and argv
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat May 5 14:25:17 CEST 2012
On Sat, 5 May 2012 14:08:26 +0200
Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>
> 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).
It uses only the file name, not the path to distinguish.
Having two scripts with the same name recompiles every time you
switch.
There is a note in the docs about that.
Mattias
More information about the fpc-pascal
mailing list