private static void Main() { Console.WriteLine("Iso2god-cli " + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion + " - " + FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).LegalCopyright); Console.WriteLine("Ported to CLI by Elie CHARRA <elie [dot] charra [at] gmail.com>"); Console.WriteLine("Usage : iso2god <source iso> <destination folder>"); Console.WriteLine(""); String[] arguments = Environment.GetCommandLineArgs(); if (arguments.Length == 3) { String isoPath = arguments[1]; String destinationPath = arguments[2]; Console.WriteLine("+ Computing ISO metadata ..."); IsoDetails iso = new IsoDetails(new IsoDetailsArgs(isoPath, Path.GetTempPath(), Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + Path.DirectorySeparatorChar + "xextool.exe")); IsoDetailsResults isoDetailsResults = iso.IsoDetails_DoWork(); IsoEntryID isoEntryID = new IsoEntryID(isoDetailsResults.TitleID, isoDetailsResults.MediaID, Convert.ToByte(isoDetailsResults.DiscNumber[0]), Convert.ToByte(isoDetailsResults.DiscCount[0]), Convert.ToByte(isoDetailsResults.Platform[0]), Convert.ToByte(isoDetailsResults.ExType[0])); IsoEntry isoEntry = new IsoEntry(IsoEntryPlatform.Xbox360, isoPath, destinationPath, new FileInfo(isoPath).Length, isoDetailsResults.Name, isoEntryID); Console.WriteLine("-----------------------------------------------------------"); Console.WriteLine("> Title : " + isoEntry.TitleName); Console.WriteLine("> Title ID : " + isoEntry.ID.TitleID); Console.WriteLine("> Disc : " + Char.ConvertFromUtf32(isoEntry.ID.DiscNumber) + " / " + Char.ConvertFromUtf32(isoEntry.ID.DiscCount)); Console.WriteLine("> Media ID : " + isoEntry.ID.MediaID); Console.WriteLine("> Platform : " + isoEntry.Platform); Console.WriteLine("> Ex : " + Char.ConvertFromUtf32(isoEntry.ID.ExType)); Console.WriteLine("-----------------------------------------------------------"); Console.WriteLine("+ Launching GOD conversion ..."); Iso2God iso2god = new Iso2God(); iso2god.Run(isoEntry); } }
private void button2_Click(object sender, EventArgs e) { if (this.checkFields()) { IsoEntryPadding padding = new IsoEntryPadding { Type = (IsoEntryPaddingRemoval)((byte)this.cmbPaddingMode.SelectedIndex), TempPath = Path.GetTempPath(), IsoPath = this.txtRebuiltIso.Text, KeepIso = this.cbSaveRebuilt.Checked }; if (!padding.TempPath.EndsWith(Path.DirectorySeparatorChar.ToString())) { padding.TempPath = padding.TempPath + Path.DirectorySeparatorChar; } if (!padding.IsoPath.EndsWith(Path.DirectorySeparatorChar.ToString())) { padding.IsoPath = padding.IsoPath + Path.DirectorySeparatorChar; } IsoEntryID iD = new IsoEntryID(this.txtTitleID.Text, this.txtMediaID.Text, byte.Parse(this.txtDiscNum.Text), byte.Parse(this.txtDiscCount.Text), byte.Parse(this.txtPlatform.Text), byte.Parse(this.txtExType.Text)); FileInfo info = new FileInfo(this.txtISO.Text); IsoEntry entry = new IsoEntry(this.platform, this.txtISO.Text, this.txtDest.Text, info.Length, this.txtName.Text, iD, (byte[])this.pbThumb.Tag, padding); if (this.edit) { (base.Owner as Main).UpdateISOEntry(this.entryIndex, entry); } else { (base.Owner as Main).AddISOEntry(entry); } GC.Collect(); base.Close(); } }
public IsoEntry(IsoEntryPlatform Platform, string Path, string Destination, long Size, string TitleName, IsoEntryID ID) { this.Platform = Platform; this.Path = Path; this.Destination = Destination; this.Size = Size; this.TitleName = TitleName; Parts = 0; this.ID = ID; }
public IsoEntry(IsoEntryPlatform Platform, string Path, string Destination, long Size, string TitleName, IsoEntryID ID, byte[] Thumb, IsoEntryPadding Padding) { this.Platform = Platform; this.Path = Path; this.Destination = Destination; this.Size = Size; this.TitleName = TitleName; this.Parts = 0; this.ID = ID; this.Status = IsoEntryStatus.Idle; this.Thumb = Thumb; this.Padding = Padding; }
private void button2_Click(object sender, EventArgs e) { if (this.checkFields()) { IsoEntryPadding padding = new IsoEntryPadding { Type = (IsoEntryPaddingRemoval) ((byte) this.cmbPaddingMode.SelectedIndex), TempPath = Path.GetTempPath(), IsoPath = this.txtRebuiltIso.Text, KeepIso = this.cbSaveRebuilt.Checked }; if (!padding.TempPath.EndsWith(Path.DirectorySeparatorChar.ToString())) { padding.TempPath = padding.TempPath + Path.DirectorySeparatorChar; } if (!padding.IsoPath.EndsWith(Path.DirectorySeparatorChar.ToString())) { padding.IsoPath = padding.IsoPath + Path.DirectorySeparatorChar; } IsoEntryID iD = new IsoEntryID(this.txtTitleID.Text, this.txtMediaID.Text, byte.Parse(this.txtDiscNum.Text), byte.Parse(this.txtDiscCount.Text), byte.Parse(this.txtPlatform.Text), byte.Parse(this.txtExType.Text)); FileInfo info = new FileInfo(this.txtISO.Text); IsoEntry entry = new IsoEntry(this.platform, this.txtISO.Text, this.txtDest.Text, info.Length, this.txtName.Text, iD, (byte[]) this.pbThumb.Tag, padding); if (this.edit) { (base.Owner as Main).UpdateISOEntry(this.entryIndex, entry); } else { (base.Owner as Main).AddISOEntry(entry); } GC.Collect(); base.Close(); } }