Wiki Home

After Build


Namespace: WIN_COM_API
#DEFINE crlf CHR(13)+CHR(10)
LOCAL ;
  lnProps,;
  lnFile, lcProps, lcProp, ;
  lcMainFile, lcMainClass
LOCAL ARRAY laProps[1]

WITH _VFP.ACTIVEPROJECT
  lcMainFile = .MAINFILE
  lcMainClass = .MAINCLASS

  IF LOWER(JUSTEXT( lcMainFile ))=[vcx]
    USE (lcMainFile)
    LOCATE FOR ObjName == lcMainClass AND [cversion =] $ LOWER( properties )
    IF FOUND()
      * if object has cVersion, set it to projects's version
      lnProps = ALINES( laProps, properties )
      lcProps = []
      FOR EACH lcProp IN laProps
        IF [cversion =] == LOWER(LEFT(lcProp,10))
          * cversion = ("2.0.1")
          * I forget why it is set as an expression and not just a string...
          lcProp = [cVersion = ("] + .VERSIONNUMBER + [")]
			? lcProp
        ENDIF
        lcProps = lcProps+lcProp+crlf
      ENDFOR
      REPLACE properties WITH lcProps
    ENDIF
    USE
  ENDIF
ENDWITH
( Topic last updated: 2005.09.01 11:10:23 PM )