-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
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. |
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: ***@***.***>
|
Updated workflow to also build smaller portable executables
Fixed wrong filenames for Linux artifacts
Replaced embedded resources with custom implementation for proper cross-compilation support
Fixed issue where legacy GUI also has a console
4768eea
to
a48831c
Compare
I've tested this on both the Steam and Epic version, with both the CLI and GUI version, with both the .NET 8 version and legacy version and I cannot reproduce this issue on Windows at least. I will deploy the latest version to my Steam Deck and perform the same tests again to confirm everything still works there, too. EDIT:
|
Found and fixed the issue on the Steam Deck. Was an absolute pain to get my local development environment running there, but I'll make a write up about it soon. Instructions of #388 (comment) still apply, however: I made a new version of the zip: This one supports updating either Peacock or Node when it's outdated. Peacock will only ever overwrite files, not delete them, so your profile data should be safe. Node is installed based on the .nvm file that comes with Peacock. New command to install:
@crazytelli Can you give it a spin? |
cli sounds like an awesome idea! i'm currently trying to use the patcher on my steam deck and the gui is a pain because i have to reenter the port every time |
@refrogerator it’s available in the current stable builds already. |
While the bundled version with the latest stable does include a CLI option, it does not have the Linux specific logic to make it work on the Steam Deck. |
I think it would be best to switch to something lighter weight than winforms before merging would be best. Either that, or we’ll need to rethink our approach of committing the latest patcher binary for convenience. |
I'd say include the self-contained Linux CLI version (12MB) and the .NET Framework* based CLI and UI exe (200kb total). The UI has no use on Unix in any shape or form because you will have to run it through Wine in the same context as the game (which I couldn't even get working), and for Windows the .NET Framework one "just works". Alternatively, we can just have the Unix installer script in a separate repository that grabs the CLI binary version whenever it's needed and keeps itself updated. Much like how installing [insert a package manager name] works on Unix. * Only thing I want to adjust in that is making WinForms for .NET Framework DPI aware, so it's no longer blurry on high DPI monitors. |
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.