Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[open source] make_prepatcher
#28
whats so special about a patch maker?
Quote: private void buildmp(string patcher, string txt, string datapath, string outpath)
{
FileStream pbfs = new FileStream(patcher,FileMode.Open);
byte[] pbdata = new byte[pbfs.Length];
pbfs.Read(pbdata, 0, Convert.ToInt32(pbfs.Length));
FileStream noticefs = new FileStream(txt, FileMode.Open);
byte[] noticelen = ConvertToDword(Convert.ToInt32(noticefs.Length));
byte[] notice = new byte[noticefs.Length];
noticefs.Read(notice, 0, Convert.ToInt32(noticefs.Length));
FileStream datafs = new FileStream(datapath, FileMode.Open);
byte[] datalen = ConvertToDword(Convert.ToInt32(datafs.Length));
byte[] data = new byte[datafs.Length];
datafs.Read(data, 0, Convert.ToInt32(datafs.Length));
byte[] footer = new byte[] {0xF3,0xFB,0xF7,0xF2};
FileStream output = new FileStream(outpath, FileMode.Create);
output.Write(pbdata, 0, Convert.ToInt32(pbfs.Length));
output.Write(data, 0, Convert.ToInt32(datafs.Length));
output.Write(notice, 0, Convert.ToInt32(noticefs.Length));
output.Write(datalen, 0, 4);
output.Write(noticelen, 0, 4);
output.Write(footer, 0, 4);
pbfs.Close();
noticefs.Close();
datafs.Close();
output.Close();
}
i made one that automatically checks for new patches on the ftp and when available makes a prepatcher and post the wz extractions for my extraction bot, but didnt bother to post it as there are many free tools (maststef's patch builder is a nice one) that do it.
Reply


Messages In This Thread
[open source] make_prepatcher - by Spaz - 2008-07-12, 01:26 AM
[open source] make_prepatcher - by GIR - 2008-07-12, 01:39 AM
[open source] make_prepatcher - by Fiel - 2008-07-12, 03:06 AM
[open source] make_prepatcher - by aznegglover - 2008-07-12, 10:22 AM
[open source] make_prepatcher - by Sandthief - 2008-07-12, 10:25 AM
[open source] make_prepatcher - by Chanpz - 2008-07-12, 12:22 PM
[open source] make_prepatcher - by Germ - 2008-07-12, 01:18 PM
[open source] make_prepatcher - by Spaz - 2008-07-12, 02:03 PM
[open source] make_prepatcher - by sicnarf - 2008-07-12, 03:52 PM
[open source] make_prepatcher - by Rain - 2008-07-12, 04:20 PM
[open source] make_prepatcher - by Stereo - 2008-07-12, 04:56 PM
[open source] make_prepatcher - by Spaz - 2008-07-13, 12:32 AM
[open source] make_prepatcher - by Phoenix - 2008-07-13, 12:42 AM
[open source] make_prepatcher - by Heidi - 2008-07-13, 01:10 PM
[open source] make_prepatcher - by Manu - 2008-07-22, 02:50 PM
[open source] make_prepatcher - by Acim - 2008-07-22, 05:49 PM
[open source] make_prepatcher - by Spaz - 2008-07-22, 08:05 PM
[open source] make_prepatcher - by Spaz - 2008-08-13, 10:14 PM
[open source] make_prepatcher - by SuGaRnSp1C3 - 2008-08-13, 11:26 PM
[open source] make_prepatcher - by sicnarf - 2008-08-14, 04:00 AM
[open source] make_prepatcher - by Heidi - 2008-08-14, 06:15 PM
[open source] make_prepatcher - by Kalovale - 2009-03-05, 04:46 AM
[open source] make_prepatcher - by Spaz - 2009-03-05, 12:40 PM
[open source] make_prepatcher - by Kalovale - 2009-03-08, 04:33 AM
[open source] make_prepatcher - by haha01haha01 - 2009-03-08, 07:08 AM
[open source] make_prepatcher - by Hazzy - 2009-03-08, 01:49 PM
[open source] make_prepatcher - by Spaz - 2009-03-08, 02:49 PM
[open source] make_prepatcher - by haha01haha01 - 2009-03-08, 03:27 PM
[open source] make_prepatcher - by Nikkey - 2009-03-09, 05:48 PM
[open source] make_prepatcher - by Mopsy - 2009-05-07, 03:05 AM
[open source] make_prepatcher - by Kalovale - 2009-05-07, 03:08 AM
[open source] make_prepatcher - by Russt - 2009-05-07, 03:34 AM
[open source] make_prepatcher - by Darkfaith - 2009-05-07, 05:40 AM
[open source] make_prepatcher - by haha01haha01 - 2009-05-07, 07:38 AM
[open source] make_prepatcher - by Spaz - 2009-05-07, 09:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)