-
Manual Patcher .NET [Source Included]
Hi!
Today i want to release my manual patcher, i wrote it for myself as i was sick of importing every single file into the PK2's when testing some edits etc. But you can also use it for your Players (extremely usefull for people using the BR Files Gateway together with VSro files) or even develop your own launcher with automated patching from my source.
Basicly this patcher works like the old ZSZC patcher but without using .mdb microsoft database format. This program is open source and may be distributed in any ways. But you may not release it anywhere else without mentioning me being the original developer, thanks.
Features:
- Pack all your updated files into a single file (named Patch.pdb)
- Import all files within the Patch.pdb into the PK2's
- Support for all PK2's (means you can patch files in Media.pk2 and Data.pk2 etc together with 1 patch like in the original patcher)
How to use:
1. Put your updated files into a folder structure like this:
Quote:
..\Patch<Version>\Media\server_dep\silkroad\textdata\filename.ext
..\Patch<Version>\Media\filename.ext
..\Patch<Version>\Data\Prim\Mtrl\filename.ext
..\Patch<Version>\Data\Res\filename.ext
2. Put the PatchMaker.exe into the folder ..\Patch<Version>\
3. Run PatchMaker.exe and let it finish
4. Copy Patch.pdb and ManualPatcher.exe together with PK2Writer.dll into your Silkroad folder, run ManualPatcher.exe and klick "Start Patch"
Downloads:
- Binaries: Binaries.rar
- Manual Patcher Source: NewManualPatch.rar
- Patch Maker Source: PatchMaker.rar
Note to developers: Please excuse the messy code :D
greetz
lemoniscool
P.S.: If you like it, please show me by pressing like ^^
-
Re: Manual Patcher .NET [Source Included]
From quickly reading the source "Note: I seriously hate VB >.<", and hopefully the author will actually make some changes to this and add more information for people who want to use it like the way i am about to write: - if it is wrong, correct me author -
*) From what i have read, this patching system is not actually only limited to just ".pk2" files, if you changed your files to be example ".TEST" type of files with a different password than the default, it looks like you can actually change how the source does it.
You can do this:
Edit Lines:
Code:
Line 93: PK2Folder = CurLine(0).Replace(".pk2", "")
Line 124: PK2Folder = CurLine(0).Replace(".pk2", "")
- You can change the .pk2 to your own like ".test"
Code:
Line 119: If (PK2Writer.Open(Directory.GetCurrentDirectory & "\" & CurLine(0), "169841"
- You can change the blowfish key here from 169841 -> "whatever you want"
---------------------------------------
This is really nice, good job author!
-
Re: Manual Patcher .NET [Source Included]
regarding the blowfish key: yes you can simply do this
regarding the pk2 extensions: you would have to change it inside the PatchMaker source too
Code:
Line 49: myWriter.WriteLine(PK2Name(0) & ".pk2" & Chr(9) & FileName & Chr(9) & PK2Path & "\" & Chr(9) & FileContent.ToString)
-
Re: Manual Patcher .NET [Source Included]
oh yeah... VB!!! this site need 2x or 3x like button
-
Re: Manual Patcher .NET [Source Included]
This Manual Patch will be better than that Manual Patch
If it read the current version
Example :
My Game version is 3
So If Game Version ='1'
Print ' That manual Patch only for version 2'
-
Re: Manual Patcher .NET [Source Included]
buddy i gets an error while it almost finish and when i try to run the client it's same version (before the patching)
look here's what i did:
named folder as Patch190
made the the patched file
then copied them to the client directory
changed the client's version to the previous one 189
is there anything wrong ?the patch folder name ? if it's can you give an example for its name ?
-
Re: Manual Patcher .NET [Source Included]
thx for this cool release
-
Re: Manual Patcher .NET [Source Included]
Good Work Bro !
But i like My Manual Patch With Soruce Code Zszc Manual Patch
Show this image
http://img191.imageshack.us/img191/896/untidftled1.png
With out any Dll or Any Files Again Only This Patch
Sory For MY English
-
Re: Manual Patcher .NET [Source Included]
Quote:
Originally Posted by
karemsame
xD nice one
-
Re: Manual Patcher .NET [Source Included]
Quote:
Originally Posted by
karemsame
Without any DLL's cannot be, because Pk2Writer is created in C++ so it's unmanaged DLL & Unmanaged DLL's cannot be merged with anything, well it can, but it won't work.
So GFXFileManager, Pk2Writer both will have to be in the same folder as your program. For Patch.pdb you can Embed the files to your solution & use them.
You can change the name of Pk2Writer to anything else also you will need to change it in the source code.
-
Re: Manual Patcher .NET [Source Included]
Auto updates SV.T? Didn't find that in the source.
Well, for those who don't like VB.NET. Every code is the same once it has been compiled! I just don't like the syntax. It looks like it's made for childs. But anyway, if you like it where's the problem?
Some critics:
Why did you write down EVERYTHING in Form1? And why is its name Form1 ? Coding standard is formMain or even frmMain. Actually, you didn't rename any control. Try to use classes if you release your code.
And why did you name your variable for the Thread "_DoPatchThread"? Why that "_"? Mhh.. but okay.
I think it's great that you've released your code to public so everybody can learn from it. But next time you might try to fit the coding standards. Put in some regions or comments. I'm also not a fan of too many comments, true, but
Quote:
For Each Line As String In Lines
i = 0
CurLine = Line.Split(Chr(9))
CurFile = CurLine(3).Split(" ")
Params(0) = Label1
Params(1) = "Extracting " & CurLine(1)
Me.Invoke(New WriteLabel(AddressOf _WriteLabel), Params)
Params(0) = ProgressBar1
Params(1) = ProgressBar1.Value + ProgStep
Me.Invoke(New ChangeProgBar(AddressOf _ChangeProgBar), Params)
Dim CurFileBytes(CurFile.Length - 1) As Byte
For Each MyByte In CurFile
If MyByte = "00" Then
CurFileBytes(i) = Convert.ToByte("0", 16)
ElseIf MyByte = "01" Then
CurFileBytes(i) = Convert.ToByte("1", 16)
ElseIf MyByte = "02" Then
CurFileBytes(i) = Convert.ToByte("2", 16)
ElseIf MyByte = "03" Then
CurFileBytes(i) = Convert.ToByte("3", 16)
ElseIf MyByte = "04" Then
CurFileBytes(i) = Convert.ToByte("4", 16)
ElseIf MyByte = "05" Then
CurFileBytes(i) = Convert.ToByte("5", 16)
ElseIf MyByte = "06" Then
CurFileBytes(i) = Convert.ToByte("6", 16)
ElseIf MyByte = "07" Then
CurFileBytes(i) = Convert.ToByte("7", 16)
ElseIf MyByte = "08" Then
CurFileBytes(i) = Convert.ToByte("8", 16)
ElseIf MyByte = "09" Then
CurFileBytes(i) = Convert.ToByte("9", 16)
ElseIf MyByte = "0a" Then
CurFileBytes(i) = Convert.ToByte("a", 16)
ElseIf MyByte = "0b" Then
CurFileBytes(i) = Convert.ToByte("b", 16)
ElseIf MyByte = "0c" Then
CurFileBytes(i) = Convert.ToByte("c", 16)
ElseIf MyByte = "0d" Then
CurFileBytes(i) = Convert.ToByte("d", 16)
ElseIf MyByte = "0e" Then
CurFileBytes(i) = Convert.ToByte("e", 16)
ElseIf MyByte = "0f" Then
CurFileBytes(i) = Convert.ToByte("f", 16)
Else
CurFileBytes(i) = Convert.ToByte(MyByte, 16)
End If
i = i + 1
Next
Dafuq is this? I mean, I'm not too bad in programming. But I actually don't know what'ya doing there.
Quote:
Params(1) = "Extracting " & CurLine(1)
I guess you are extracting the files in the code above but..ehm .. Byte by Byte? Am I correct?
Strange, maybe I might be wrong but it looks a bit complicated for such a simple process.. doesn't it?
Anyway, keep sharing your code and help people to learn programming. For beginners VB.NET is okay :-)
Btw,
Quote:
Note to developers: Please excuse the messy code :D
Is no excuse, clean it up instead :P
Here is another idea of mine:
Implement a script language into that patcher. Like
Quote:
COPY <X> TO <Y> IF X.SIZE < 50
COPY <X> TO <Y> IF Y.EXSISTS = FALSE
or kinda. Just an example.
It's not difficult and brings some advantages :)
-
Re: Manual Patcher .NET [Source Included]
Quote:
Originally Posted by
NourAyman
xD nice one
Ty Bro
Quote:
Originally Posted by
Ahmed Magdy
Without any DLL's cannot be, because Pk2Writer is created in C++ so it's unmanaged DLL & Unmanaged DLL's cannot be merged with anything, well it can, but it won't work.
So GFXFileManager, Pk2Writer both will have to be in the same folder as your program. For Patch.pdb you can Embed the files to your solution & use them.
You can change the name of Pk2Writer to anything else also you will need to change it in the source code.
Bro if you know Manual Patch Silkroad Online
This with out any Dll only This Exe Manual Patch
my Manual Patch like Patch Silkroad Online
if you need Test it i will upload It And You Can Try This
-
Re: Manual Patcher .NET [Source Included]
Quote:
Originally Posted by
karemsame
Ty Bro
Bro if you know Manual Patch Silkroad Online
This with out any Dll only This Exe Manual Patch
my Manual Patch like Patch Silkroad Online
if you need Test it i will upload It And You Can Try This
I guess your program is created in .NET? isn't it? you can code a new Pk2 Writer in .NET or you can change to C++ and use drew Pk2Writer source code.
Until now there's no .NET Pk2 writer.
Both ways GFXFileManager.dll have to be in the same folder as the program or browse for it.
-
Re: Manual Patcher .NET [Source Included]
pack all the dlls in one file, in fact you can even pack all files in 1 exe (even the pdb file). is easy and works perfect
-
Re: Manual Patcher .NET [Source Included]
Tell us how & i will be grateful.
-
2 Attachment(s)
Re: Manual Patcher .NET [Source Included]
easy way, use winrar + sfx module, can pack all files inside one EXE, run manualpatcher.exe and even delete the files when is done (can easy edit manualpatcher.exe to run it when is executed, no need to press the button)
Attachment 126858Attachment 126859
other way, can use netz (is a .net compressor/packer)
or can use a lot of programs to "bind" files in 1 exe (google.com)
p.d : good thing about winrar method?
1) integrity check (check if the file is downloaded ok)
2) recovery record (MAYBE can fix itself if something goes wrong with the download)
3) compression (40 mb pdb file is only 1 mb compressed)
-
Re: Manual Patcher .NET [Source Included]
Quote:
Originally Posted by
Caosfox
easy way, use winrar + sfx module, can pack all files inside one EXE, run manualpatcher.exe and even delete the files when is done (can easy edit manualpatcher.exe to run it when is executed, no need to press the button)
Attachment 126858Attachment 126859
other way, can use netz (is a .net compressor/packer)
or can use a lot of programs to "bind" files in 1 exe (google.com)
p.d : good thing about winrar method?
1) integrity check (check if the file is downloaded ok)
2) recovery record (MAYBE can fix itself if something goes wrong with the download)
3) compression (40 mb pdb file is only 1 mb compressed)
Netz won't work with unmanaged dll's so as any other programs that bind files. (didn't try though i tried Themida, Enigma protector, A.F.7).
SFX can be extracted easily.
-
Re: Manual Patcher .NET [Source Included]
I never say cant be extracted, besides.. who cares if its extracted?
i only mean 1 file, for easy distribution
-
Re: Manual Patcher .NET [Source Included]
Quote:
Originally Posted by
Caosfox
pack all the dlls in one file, in fact you can even pack all files in 1 exe (even the pdb file). is easy and works perfect
i know bro but my Soruce Code Not like Your Soruce Code This is Soruce Code Zszc only need Data.mdb and this put with Exe
From Soruce Code
Sory for my English
Quote:
Originally Posted by
Caosfox
easy way, use winrar + sfx module, can pack all files inside one EXE, run manualpatcher.exe and even delete the files when is done (can easy edit manualpatcher.exe to run it when is executed, no need to press the button)
Attachment 126858Attachment 126859
other way, can use netz (is a .net compressor/packer)
or can use a lot of programs to "bind" files in 1 exe (google.com)
p.d : good thing about winrar method?
1) integrity check (check if the file is downloaded ok)
2) recovery record (MAYBE can fix itself if something goes wrong with the download)
3) compression (40 mb pdb file is only 1 mb compressed)
Good Work Bro
But my Manual Patch is Different
and this not need Any Winrar or another
if you need Test it i can make Simple Patch and Upload it to you
Good Luck!
-
Re: Manual Patcher .NET [Source Included]
dont worry, this one is perfect for me.
i put some catch and filexists to check if any file is missing.
and still millon things to do
-
Re: Manual Patcher .NET [Source Included]
@torstmn: i know its messy and not complying to any standards but you need to know this was a 5 minute copy&aste project, copied from my launcher
regarding the snippet you posted .. when reading the bytes of a file bytes that are below (hex)10 will be written without a leading 0. inside the patch maker i append the leading 0 to it but when writing those bytes to file again with leading 0 it'll throw an exception (cant remember which one) so im removing the leading 0 again inside the manual patcher ... yes i know it sounds silly but i dont like it when byte strings contain bytes without leading 0 :D if you want to you can put that part into a function called AppendZero/RemoveZero or sth like that .. as i said already i copied this code from my launcher and didnt put much effort into it, just wanted to release something thats using my PK2Writer.dll ^^
@karemsame: yeah i know zszc patcher been using it for myself some time ago it works fine most of the times but sometimes it doesnt work for every on .. i had it several times that the patch had an error in step 1 or step 2 of loading the gfx file manager dll on some players' computers but on others it worked just fine .. thats why ive written something similar inside my launcher
-
Re: Manual Patcher .NET [Source Included]
it works perfectly exept doesnt change client version
-
Re: Manual Patcher .NET [Source Included]
you have to put the sv.t with the new version into Media folder and include it inside the patch, automatic version update isnt implemented in this small program
-
Re: Manual Patcher .NET [Source Included]
-
Re: Manual Patcher .NET [Source Included]
@lemoniscool
Bro i wont ask you for thing if you can help me
i need When any Players open The Client Get the Msg You need install the New Manual patch Like silkroad Online
this msg on the file " textuisystem.txt " and have Code " UILM_MSG_DETECTED_PATCH_MANUAL "
if you can help me Please ask me about this
ty
Sory For My Bad English