Ejemplo n.º 1
0
 public Types.CompileTargetType DetermineTargetType(DocumentInfo Doc, Parser.ParserBase Parser)
 {
     // compile target
     Types.CompileTargetType compileTarget = RetroDevStudio.Types.CompileTargetType.NONE;
     if (Doc.Element != null)
     {
         compileTarget = Doc.Element.TargetType;
     }
     if (compileTarget == RetroDevStudio.Types.CompileTargetType.NONE)
     {
         compileTarget = Parser.CompileTarget;
     }
     return(compileTarget);
 }
Ejemplo n.º 2
0
 public string DetermineTargetFilename(DocumentInfo Doc, Parser.ParserBase Parser)
 {
     if ((String.IsNullOrEmpty(Parser.CompileTargetFile)) &&
         ((Doc.Element == null) ||
          (String.IsNullOrEmpty(Doc.Element.TargetFilename))))
     {
         // default to same name.prg and cbm
         string targetExtension = Parser.DefaultTargetExtension;
         if (Doc.Project == null)
         {
             return(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Doc.FullPath), System.IO.Path.GetFileNameWithoutExtension(Doc.FullPath)) + targetExtension);
         }
         return(System.IO.Path.Combine(Doc.Project.Settings.BasePath, System.IO.Path.GetFileNameWithoutExtension(Doc.FullPath) + targetExtension));
     }
     if ((Doc.Element != null) &&
         (!String.IsNullOrEmpty(Doc.Element.TargetFilename)))
     {
         return(GR.Path.Append(Doc.Project.Settings.BasePath, Doc.Element.TargetFilename));
     }
     return(Parser.CompileTargetFile);
 }