New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-platform patcher #388
base: master
Are you sure you want to change the base?
Conversation
Updated workflow to also build smaller portable executables
Fixed wrong filenames for Linux artifacts
This is incredible! 🤩 Never thought I would see the day! |
Probably controversial idea here - we might not even need a UI. If we have a script that starts the CLI in command prompt and then once the game is patched, it can just say something like "Done! You may now close this." |
Thanks Lennard for this amazing work! |
I don't think it's a good idea to completely remove the UI option, knowing some of our users, this will create more problems than shipping a 50MB binary |
I gave this same more thought, and I might be able to turn the Core-lib into a .netstandard1 package, which would technically allow the UI to be run as good-ol' .net 4.6, but the CLI as .NET 8, while still sharing the same logic AND having the space benefit. |
Above works. However, using a native Unix process to perform patching causes all kinds of issues, since Linux doesn't have the functions Windows has to apply the patches. I'll rethink this but I see a few options: get the CLI in top shape for proton, fire and forget. Or, use a hook dll to perform the patches natively. Benefit of this is also that you could use something like ImGui as a replacement for the UI. To be continued. |
Replaced embedded resources with custom implementation for proper cross-compilation support
Build now outputs a Windows-only .NET Framework 4.6 version, exactly like the original, just through a different build system. The .NET 8 version is cross-compiled for Windows and Linux and comes in self-contained and portable versions. Should be ready for testing. |
Setup files for Steam Deck: PeacockSteamDeck.zip Installation
wget https://github.com/thepeacockproject/Peacock/files/14323372/PeacockSteamDeck.zip && unzip PeacockSteamDeck.zip && chmod +x ./start.sh && rm PeacockSteamDeck.zip
Running
The game will be patched accordingly and connect to your own Peacock server. ClosingJust close the game, switch back to Peacock and exit the application. This will take down both the server and the patcher.*
|
@LennardF1989 I was able to run the server and confirm in my browser that localhost:3000 is indeed running peacock. I had to make a slight change in
The one problem I'm running now is the Patcher is failing when launching hitman. Here are some screenshots: |
@crazytelli thanks for the heads up, I changed it from lite -> linux in the linux setup repo. Will check on the error later. |
Which version are you running @crazytelli? Steam, Epic? And if so, which version is reported in the main menu? |
I`m running the Steam version of Hitman III. The game version (if I'm understanding what you're asking correctly) - in game -> Options:
|
And is it consistently failing to patch, or occasionally? |
Consistently, never actually managed to launch peacock successfully with this method.
…-------- Mensagem original --------
Em 06/04/2024 08:44, Lennard Fonteijn escreveu:
And is it consistently failing to patch, or occasionally?
—
Reply to this email directly, [view it on GitHub](#388 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ANMDTAEVTNQ5DC2IJBIEZILY37NZLAVCNFSM6AAAAABDHN2WMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGA2TSNJXGM).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I've updated the patcher to .NET 8, as-is. I touched as little code as possible, I could even (barely) hold myself back from applying proper C# name conventions shivers.
I then split the logic into 3 components: UI, CLI and Core. UI is pretty much Windows-only (but could run under Proton), CLI is cross-platform and spits out a native executable for either Windows or Linux.
Workflow has been adjusted to spit out 6 files:
CLI is pretty small when completely standalone (12MB-ish).
UI is humongous when standalone (125MB, 50MB compressed). Not sure how I feel about that, but WinForms can't be stripped (yet). UI could potentially be replaced with a different solution.
This will bring the patcher into "modern era", as well as add support for Steam Deck (test pending).
CLI also has additional logic applied so it will respect settings from the config, as well as waiting for a HITMAN process before applying and exiting.