anchor.diff:  
       if aOptions <> '' then
         SB.Append(aOptions + ' ');   
  -
     
       Output.logformat('Running: %s', [SB.ToString]);
   
  
positive.code:   Result := File.IncludeTrailingPathDelimiter(Environment.GetEnvironmentVar('ZCODE'));
  end;
  
  function ccodegen(aProject: string; aProjectconfig: string; aVariables: string; aWorkingdirectory: string;aOptions: string): Integer;
  var
    SB: TStringBuilder;
  begin
    Result := -1;
  
    
    if not Folder.Exists(GetcodegenPath) then 
      begin
        RaiseException(erCustomError, 'CodeImatic.codegen Configured path [' + GetcodegenPath +'] cannot not be found.');
  
        Exit;
      end;
  
    try
      SB:= TStringBuilder.Create;
  
      SB.Append(GetcodegenPath + 'codeitmatic.codegen.exe ');
  
      SB.Append('-project ' + aProject + ' ');
      SB.Append('-projectconfig ' + aProjectconfig + ' ');
      SB.Append('-consoleoutputonly ');
  
      if aWorkingdirectory <> '' then 
        SB.Append('-workingdirectory '+  aWorkingdirectory+ ' ');   
  
negative.code: interface
  
  Uses cmd;
    
  function codegen(aProject: string; aProjectconfig: string; aVariables: string; aWorkingdirectory: string;aOptions: string): Integer;
  function codegenex(aProject: string; aProjectconfig: string; aVariables: string; aWorkingdirectory: string;aOptions: string; aPreCompatible: boolean): Integer;
  function GetcodegenPath: String;
  
  implementation
  
  