Setup
This is a guide for setting up your server for the patching process
Last updated
Was this helpful?
This is a guide for setting up your server for the patching process
Last updated
Was this helpful?
Get a "Patch Server" You will need either a webserver which you can use FTP to transfer your files to or setup Xampp on your server host machine for this example we will be using Xampp on our local machine but the steps are the same regardless, you just put the folders into your webserver instead. So our first step is to install and setup Xampp from here:
Creating patch folder We need to configure the hierarchy of our "patch server" in Xampp creating a folder called updates or patch etc. path to: (wherever you installed)\xampp\htdocs\ create a folder called "patch"
Update patcherconfig.ini Update your patcherconfig.ini in your client folder we are running the patcher from our own computer and connecting to it from our own computer so we are able to use the local IP 127.0.0.1 (also known as localhost) we would swap this for our server IP or the domain of our webserver instead when making a patcher for others to connect to. SUB_ADDRESS is the folder we are going to be putting all the patches to within xampp/webserver.
Generate "patcher.id" We should test that we are connecting to the correct location by running our patcher because we have no contents in our patch folder it should connect and return us an error. "Failed to patch" (Failed to download "patcher.id")
what is a "patcher.id"? how do we get one? It's quite simple actually, the patcher.exe itself generates a patcher.id for us when we tell it to execute a specific command and we will do this using batch script also known as a .bat file. to create a .bat file all you need to do is create a new .txt file and rename the .txt extension to .bat (file extensions must be displayed on) call your file "make_id.bat" for simplicity
the contents of the bat file are as follows:
patcher.exe -initmake=patcher.id
we can edit our .bat file using notepad or preferably notepad++, Visual Studio Code etc.
First we must specify the name of our exe (it is usually patcher.exe or launcher.exe change it to yours next we tell it the command -initmake (which generates the patcher id file and lastly we tell it what to name the file (simply patcher.id)
place your make_id.bat into a folder along with your patcher.exe (if it isn't already) and execute the .bat file patcher.id is generated for us (if not then you made a mistake)
Lastly take your new patcher.id and place it into the "patch" folder we created for Xampp Now the Patcher will correctly fetch this file.
Generate "patch.id" Not to be confused with the "patcher.id" which is specifically for the patchserver, a "patch.id" is used by both the client and the patch server to determine the current version and the version of the new patch. We create a patch.id using the MP_PACK tool for our client (If you are using files provided by us it is most likely compatible with the MP_PACK found on our website) Most likely your client will already have a patch.id you have to decide whether you want to keep it and update from the current version or start new from 0.0.0, we will explain starting fresh. Delete the current patch.id if it already exists (as well as start.id, start_new.id and patch_new.id) and open your MP_PACK tool we are going to use the option "Build Patch Version" it may be called something else in your tool but the description reads "In below version management, enter patch version, press renew version and then proceed process. It will create Patch ID with entered patch version into Result Folder."
Update the Version in the tool to 0.0.0 and hit refresh
Now in the Result Folder field we want to put the path of our client root directory in this case mine is :C:\Users\paris\Documents\Repo\PatchingExample\Client (It is simply the location of your patcher.exe or launcher.exe After that we simply hit "Run" and a patch.id is generated for is with the version 0.0.0 Take this and put it into your patchserver at the same location you put your patcher.id this will tell the patchserver that it is also on version 0.0.0
Step 6: Creating our start.id Following the last step we will run into our next issue "Failed to Download "start.id" Now the reason I run you through each step 1 by 1 and every error we face is to help you understand what these issues are and how they are resolved for your future reference. This part is really simple now that we have our patch.id = 0.0.0 we can just copy and paste it and rename the new file to start.id the start.id will identify that the patching process is starting from version 0.0.0 drop this into your patchserver in the same location as your patcher.id and your patch.id "Patching Complete" we made progress. Let's attempt an update.