yomidseven 30 Posted December 29, 2024 Share Posted December 29, 2024 (edited) Hello, My nick is pcb.is.good! As shown before: Spoiler [ Preview ] AutoPatcher v1.0 (Python Src Fully Customizable) - Showcase - Metin2Dev | M2Dev Today I release the updated tool There are many solutions available on the forum, but in my opinion, they tend to be too complex. I also wanted to use this opportunity to practice and improve my skills. This tool isn't intended for general end-user use though with a few enhancements, it could be, but it was specifically developed for my beta testers. My goal is to make it the best free alternative out there for beta phase. Preview: Tutorial: Spoiler YouTube Server Side: Pack Folder: (with updated file ready to download) Spoiler Patcher Folder (contain patchlist.json and last version of the patcher) Patch_List.json Last_Patcher.exe Spoiler Spoiler { "patch_1.5": [ { "afterdeath_shield": { "path": "afterdeath_shield", "hash": "bb6e1278e27fb9bf1753c260b8e97f03d6ceaebcb7618515a456dd07196aefe9", "size": 1003692 }, "assets": { "path": "assets", "hash": "960fd41ad960e3a7db1d2109d50a69c5e8ed0a8bf33554027ff2a212fce00dfb", "size": 12741 }, "bgm": { "path": "bgm", "hash": "0aad38d9f89deafaf4c5fdbd5633e63d0059dc2d4bd8c357d8f5f3a254b31605", "size": 11422612 } } ], "exe": { "_TheSeed.exe": { "path": "_TheSeed.exe", "hash": "de21f5bd23bc66bad22317c7fe6dd96af0567b14d05df0d8141f0e3463b8c72a", "size": 3841024 } }, "patcher": { "name": "_TheSeedPatcher.exe", "hash": "c36552116bee1373be5e45c9e29f159f0c04c60547454df05cbcb45df145183b", "size": 115488496, "path": "C:/Users/Yomi/Desktop/System/Tool/Patcher/TheSeedPatcher/PatchList Maker/update\\patcher\\_TheSeedPatcher.exe" } } Client Side: Version.pkl (with current client version) Pack (with eix/epk*) Patcher.exe How it's work? The patcher operates by connecting to a server to download a patchlist, which contains the version numbers and file hashes of the latest updates. Then compares these details with the version numbers and hashes of the files present in the client, If discrepancies are found either in the version numbers or file hashes the patcher automatically downloads the necessary updated files from the server to ensure the client is up- to-date. The patcher has a feature to check for updates to itself, download the update, and restart with the latest version. How do I generate the patchlist? Admin Side: I also developed a script that processes the files inside the update folder. It calculates their size and hash values and then generates a JSON file, which is ready to be uploaded to the server for managing updates efficiently. PatcherMaker.py (patchlist maker) Update (folder with new file updated) --- Patcher (to contain patcher update) The project is lightweight, fast, and efficient. It has been compiled into an executable (.exe) and is fully customizable. All images/icons are in the Images folder, support png and gif. All addresses, including slide links are fully customizable in a config.py file There are definitely more professional tools, but this is simple and super fast to set up, great for beta phases or to keep the server updated for friends. ---------------------- README.txt Spoiler ### Thank you for downloading my patcher! ### ### made by pcb.is.good [25.12.2024] ??????????? ### ## I have included comments and debug prints in case anyone encounters issues # (these will not be visible once compiled into an .exe file). # The patcher uses pickle instead txt for the client version, making it harder for players to edit. # The patchlist is managed using JSON, ensuring everything is more organized. # For the background and banners, both static images and GIFs can be used. ### PATCHER ### The patcher consists of 3.py files, 1 file.exe and 1 folder: images (folder): Contains all the images that will make up the GUI. main.py: Contains the main logic of the code. gui.py: Primarily contains instructions for the graphical interface and its updates. config.py: Contains all the customizable variables within the patcher. _If you're not confident with Python, it's recommended not to modify variables that aren't found within this file_ worker.exe: Is the self check update/upgrade (nested inside the main.exe) ### PatchList.json MAKER ### Additionally, a handy patchlist maker is provided: You can select the folder containing the updated files (patcher included), The tool automatically calculates the size and hash of updated files, storing them in patchlist.json. After configuring FTP credentials in config.py (facoltative), it uploads the updated files and the patch list to the specified folder on the web server. patcherlist_maker.py: Contains the code that generates the "Patchlist.json" by calculating hashes and sizes, indicating the patch version. config.py: Contains all the customizable variables within the patcher. _If you're not confident with Python, it's recommended not to modify variables that aren't found within this file_ update (folder): Contains the updated .eix/.epk* files to build the patchlist. patchlist.json: Contains the generated patchlist. version.json: Tracks the generated versions. ### SERVERSIDE ### In the root of your webserver, you will also need to create two folders: pack (folder): This folder should contain the updated .eix/.epk* files to be downloaded. (the same files as in the "update" folder of the patcherlist maker). patcher (folder): This folder will contain the "patcherlist.json" file and, the update for the patcher itself (if is needed). ### How To Distribute ### Python is not required for the end user's PC to run the program, but it is necessary for compiling the executable (.exe) and for distribution. Therefore, we need to install the following packages within our environment: (a virtual environment is fine) PyQt5==5.15.9 urllib3==1.26.6 configparser==5.3.0 auto-py-to-exe==2.29.0 requests==2.31.0 To install these dependencies you can open the console and Run the following command to install the packages: (by holding Shift and right-clicking to open it, or by navigating to the directory using the cd command). pip install -r requirements.txt Once this is done, open the console again and run: auto-py-to-exe This will open a Chrome-like window where you need to configure a few settings: Script location: Set this to main.py. OneFile: Choose "One File" to bundle everything into a single .exe file. Console Window: Set this to "Windows Based" (to hide the console). Icon: Set the icon to images/icon.ico. Additional Files: Add the images folder by clicking "Add folder" and then selecting all the images inside using "Add File". Finally, press the button to compile the .exe. at the end of the process by clicking on "open output folder" (or entering the dist folder) the main.exe file will be present which will be the patcher ready for distribution. ### Bug ### contact me on discord #pcb.is.good LESGOSKY Size of Patcher.rar: 13.5MB Size of Autopatcher.exe: 110MB The download does not require any reactions or comments, As I want to keep it open for anyone who encounters issues or wishes to leave genuine feedback. The code is not precompiled because Python is open source, and I’ve kept it this way to allow anyone to review the code for security purposes (and also to see all the 'shitty' code I wrote :D) (Check the YouTube video or the README.txt file for instructions.) I would like to give one final thanks to Tarata for being my tester and helping me find bugs. DOWNLOAD: Spoiler This is the hidden content, please Sign In or Sign Up Alternative download links → This is the hidden content, please Sign In or Sign Up - This is the hidden content, please Sign In or Sign Up - This is the hidden content, please Sign In or Sign Up Edited December 29, 2024 by Metin2 Dev International Core X - External 2 Internal 14 2 5 Link to comment Share on other sites More sharing options...
X E N O N 11 Posted December 30, 2024 Share Posted December 30, 2024 This kind of content (and above all the commitment and spirit of sharing) are always appreciated in the development communities. The idea of making the project Open-Source, can have multiple advantages. Every kind of user can approach this tool even as a simple in-depth study on Python studies. Instead, from expert users we can expect advice/ideas to improve it further. Thank you! 1 Link to comment Share on other sites More sharing options...
yomidseven 30 Posted December 30, 2024 Author Share Posted December 30, 2024 2 hours ago, X E N O N said: This kind of content (and above all the commitment and spirit of sharing) are always appreciated in the development communities. The idea of making the project Open-Source, can have multiple advantages. Every kind of user can approach this tool even as a simple in-depth study on Python studies. Instead, from expert users we can expect advice/ideas to improve it further. Thank you! Grazie mille del commento Link to comment Share on other sites More sharing options...
Sobolanescu 7 Posted January 12 Share Posted January 12 Great idea. Congratulations. I would suggest you make a github where you can register every change and possibly those who use it and find problems to open them as "Issue". 1 Link to comment Share on other sites More sharing options...
yomidseven 30 Posted January 12 Author Share Posted January 12 41 minutes ago, Sobolanescu said: Great idea. Congratulations. I would suggest you make a github where you can register every change and possibly those who use it and find problems to open them as "Issue". I thought about this, now I'm working on another tool, when I'll be finished I think I'll upload all the works on github thanks Link to comment Share on other sites More sharing options...
Recommended Posts