/* Copy the files over, substituting the variable settings. */
stem.usPercent = 50
stem.pszStatusText = "Copying files, with substitution."
rc = IwfUpdateConsoleProgress(stem);
rc = IwfUpdateConsoleStatus(stem);
SAY "The project source files in" Src "are being copied to" stem.pszTargetDirectory"."
stem.pszSourceFileMask = Src;
rc = IwfCopyWithSubstitution(stem);
if (rc <> RC_OK) then call Abort("Error performing copy with substitution.");
/* Renaming files */
stem.usPercent = 60
stem.pszStatusText = "Renaming files."
rc = IwfUpdateConsoleProgress(stem);
rc = IwfUpdateConsoleStatus(stem);
curdir = DIRECTORY();
newdir = DIRECTORY(stem.pszTargetDirectory);
rename 'help.* 'stem.pszVariableValue.4'.*'
if (rc <> RC_OK) then call Abort("Error renaming files. The specified file name may be invalid or the disk is full. Please delete any created files and start over.");
call DIRECTORY curdir;
/* Create the WorkFrame project */
stem.usPercent = 90;
stem.pszStatusText = "Creating the Workframe/2 project.";
rc = IwfUpdateConsoleProgress(stem);
rc = IwfUpdateConsoleStatus(stem);
SAY "The project will be created in "||stem.pszTargetFolder;
pszTarDir = stem.pszTargetDirectory;
/* Get the path of the shell projects */
ShellPath = VALUE('CPPMAIN',,env); /* on CPPMAIN variable path */
if ShellPath='' then call Abort("Error obtaining Project Smarts path.");