The Game Launcher Creator V3 Patch System Runtime has its own set of dependencies loaded at runtime.
These are already packed into the patch.exe executable. These are extracted at the launch and then loaded into the process at runtime.
However, this comes with a warning. If you have any DLL files in the ROOT folder that you will be patching, you will need to rename them before scanning them with your patch, or you may get patch errors with something along the lines of ‘Cannot Delete File’ or ‘Cannot Remove File’ and then the patch system bombs.
What’s the Script?
Our patch runtime, even though dependency-free (ie: your users don’t need to download any third party dependencies to run the patch system), it still has its own dependencies packed into its own executable.
The patch system requires these dependencies and we extract them to a temporary folder before the patch system runs. However, if your game or application also has these dependencies and they are being patched to the same folder as the patch.exe, then you may have a problem patching the files. This is due to the fact that the patch.exe executable loads the local dependency before it loads the one from the temporary folder, thus they clash.
How do I solve it?
The way to solve it is, in your game/app file folder that you scan over, if you have any dll files in the root folder, rename them BEFORE YOU SCAN, and maybe put an additional L on the end. Like so…
rename any DLL files in the root folder with an additional L before you scan over, like so…
Notice it now has 3 L’s?
Now do your patch file scan and upload your files.
In order to rename your dll files back AFTER the patch process has completed, you will need to create a batch file and ship it with your launcher/patch.exe in the root folder.
We have written this batch file code for you. Make sure you run this batch file as a post-requisite.
Here is the command for the post-requisite run:
Check Local File Exists:rename_files.bat|Execute the File:rename_files.bat
Here is the batch file script. Just paste this into notepad and save the file as rename_files.bat
@echo off setlocal enabledelayedexpansion :: Loop through all .dlll files in the current directory FOR %%G IN (*.dlll) DO ( :: Remove the last character 'l' from the extension set "newName=%%~nG" set "newName=!newName:.dlll=.dll!" :: Rename the file RENAME "%%G" "!newName!" echo Renamed %%G to !newName! ) endlocal
How do I stop the launcher loading them when they already exist?
You can’t. If the dll files need to be in the root folder, then the launcher and patch system should not be in the same root folder.
You should move your game to a sub-folder of the launcher.