FoxInCloud
Constants
Gravatar is a globally recognized avatar based on your email address. Constants
  Vincent H.
  All
  Jul 23, 2022 @ 12:01am

Hi Thierry,

I would like to introduce constants like:

#IF "XXX" $ CURDIR()
   #DEFINE Copie_Arch "customer@xxx.fr"
#ELSE
   #DEFINE Copie_Arch "customer@zzz.fr"
#ENDIF

It seems to me that in this case, when making the exe I have to recompile all the files.

Question: why did you disable the recompile option in awstart.prg, just for time considerations?

Gravatar is a globally recognized avatar based on your email address. re: Constants
  FoxInCloud Support - Thierry N.
  Vincent H.
  Jul 25, 2022 @ 01:41pm

Hi Vincent,

If you define this kind of constant in a .h file mentioned in the project, whenever this file changes, VFP automatically compiles the source code where this file is included: *.prg, *.scx, *.vcx, etc. You can just modify this file (add or erase a space) to trigger this behavior. I'm not sure recompile would have any additional effect in this case.

You can add this line at the beginning of your xxxProdUpdate.prg

=strtofile(space(1), 'your.h', 1)

Be aware that this test #IF "XXX" $ CURDIR() evaluates at compile time only, you must bet sure of the CURDIR() when compiling.
I would rather perform this kind of test at run time.

Gravatar is a globally recognized avatar based on your email address. re: Constants
  Vincent H.
  FoxInCloud Support - Thierry N.
  Jul 26, 2022 @ 10:44pm

Thanks Thierry for all these precisions

© 1996-2022