示例#1
0
 static void Main(string[] args)
 {
     if (args.Length < 3)
     {
         PrintUsage();
         return;
     }
     string data = GetSoloArgument("-data", args);
     string ipBin = GetSoloArgument("-ip", args);
     List<string> outPath = GetMultiArgument("-output", args);
     List<string> cdda = GetMultiArgument("-cdda", args);
     string gdiPath = GetSoloArgument("-gdi", args);
     string volume = GetSoloArgument("-V", args);
     bool truncate = HasArgument("-truncate", args);
     bool fileOutput = false;
     if (CheckArguments(data, ipBin, outPath, cdda, truncate, out fileOutput) == false)
     {
         return;
     }
     GDromBuilder builder = new GDromBuilder();
     builder.ReportProgress += ProgressReport;
     builder.RawMode = HasArgument("-raw", args);
     builder.TruncateData = truncate;
     if (volume != null)
     {
         builder.VolumeIdentifier = volume;
     }
     Console.Write("Writing");
     List<DiscTrack> tracks = null;
     if (fileOutput)
     {
         builder.Track03Path = Path.GetFullPath(outPath[0]);
         if (outPath.Count == 2 && (cdda.Count > 0 || builder.TruncateData))
         {
             builder.LastTrackPath = Path.GetFullPath(outPath[1]);
         }
         tracks = builder.BuildGDROM(data, ipBin, cdda);
     }
     else
     {
         tracks = builder.BuildGDROM(data, ipBin, cdda, outPath[0]);
     }
     Console.WriteLine(" Done!");
     if (gdiPath != null)
     {
         builder.UpdateGdiFile(tracks, gdiPath);
     }
     else
     {
         Console.WriteLine(builder.GetGDIText(tracks));
     }
 }
 // Shared initialization code
 void Initialize()
 {
     _tracks = new CddaTrackSource();
     _builder = new GDromBuilder ();
 }
示例#3
0
 public GDIBuilderForm()
 {
     InitializeComponent();
     _builder = new GDromBuilder();
 }