Thanks everyone for suggestions.
I came up with this. If anyone has suggestions on the code, let me know.

Tracy

PROCEDURE PJM2Project
   *- Requires VFP 9
   *- Parameter: tcPJM - PJM file create by integrated source control

   *- The reason: Automate the project build from code downloaded from
Source Control
   *- We use source control integrated into the IDE. And want to automate
the project
   *- build for testing and production. In a clean Build folder, download
all the source
   *- and build the EXE/APP into a Distrobution folder. With integrated
source control
   *- the PJX and PJT are not stored, a PJM is. The PJM holds all the
information needed
   *- to build the PJX. I purposely avoided variables to allow each line to
be easily
   *- scripted with a tool like
   *-    Visual Build Professional http://www.kinook.com
   *-    FinalBuilder http://www.finalbuilder.com

   LPARAMETERS tcPJM
   IF NOT FILE(FORCEEXT(tcPJM, "PJM"))
      RETURN .F.
   ENDIF
   *-- Make sure project files don't exist
   ERASE (FORCEEXT(tcPJM, "PJX"))
   ERASE (FORCEEXT(tcPJM, "PJT"))
   CREATE PROJECT (FORCEEXT(tcPJM, "PJX")) NOWAIT
   _VFP.ActiveProject.Files.Add(FORCEEXT(tcPJM, "PJM"))
   RELEASE WINDOWS "Project"
   USE (FORCEEXT(tcPJM, "PJX")) IN 0 EXCLUSIVE ALIAS csrProject
   DELETE FOR RECNO() > 1 IN csrProject
   PACK IN csrProject
   CREATE CURSOR csrTemp ;
      (id c(10), type c(1), name v(254), ;
      exclude c(3), mainprog c(3), cpid i)
   APPEND FROM pc10.pjm DELIMITED WITH "," FOR NOT EMPTY(TYPE)
   INSERT INTO csrProject (id, type, name, exclude, mainprog, cpid) ;
      SELECT id, type, name, ;
      CAST(exclude as logical) as exclude, ;
      CAST(mainprog as logical) as mainprog, cpid ;
      FROM csrTemp
   USE IN csrProject
   USE IN csrTemp
ENDPROC




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to