Skip to content

Commit b65f75e

Browse files
authored
feat: Initial macOS patcher (#677)
<!-- Thanks for contributing to Peacock! Here's a bit of a template to help make sure everything relevant is covered. --> ## Scope Adds a new patcher, specifically for macOS. Extracted from #676. This can be refined as we go but it's a pretty solid start. <!-- List any relevant changes you have made here. Be sure to link any issues fixed, or that are relevant to these changes. --> ## Test Plan - Confirm that the patcher succeeds on the app store build of the game - Confirm that the patcher succeeds on the steam build of the game <!-- List how you have verified these changes work as intended. --> ## Checklist <!-- Once you create the PR, the checklist will be added below this comment automatically (based on what files you've changed). It's just a few reminders to make sure everything is perfect. You can place an "X" in the boxes to tick them off. When you have completed the checklist, press the "Ready for review" button. --> -------- #### General - [x] I've run Prettier to format any changed files - [x] I've verified that my changes work, and included a test plan
2 parents 4eead64 + 92f82bd commit b65f75e

26 files changed

Lines changed: 1755 additions & 0 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Patcher (macOS)
2+
3+
on:
4+
push:
5+
branches: [ "v*", "master" ]
6+
paths: [ "patcher-darwin/**/*" ]
7+
pull_request:
8+
branches: [ "v*", "master" ]
9+
paths: [ "patcher-darwin/**/*" ]
10+
11+
jobs:
12+
build:
13+
name: Build macOS Patcher
14+
runs-on: macos-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v6.0.2
19+
20+
- name: Configure CMake
21+
run: cmake -S patcher-darwin -B patcher-darwin/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
22+
23+
- name: Build
24+
run: cmake --build patcher-darwin/build --config Release
25+
26+
- name: Upload patcher-darwin
27+
uses: actions/upload-artifact@v7
28+
with:
29+
name: patcher-darwin
30+
path: patcher-darwin/build/PeacockPatcher

patcher-darwin/.idea/.gitignore

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patcher-darwin/.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patcher-darwin/.idea/editor.xml

Lines changed: 345 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patcher-darwin/.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patcher-darwin/.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patcher-darwin/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patcher-darwin/.idea/patcher-darwin.iml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patcher-darwin/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patcher-darwin/CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
project(PeacockPatcher LANGUAGES CXX)
3+
4+
set(CMAKE_CXX_STANDARD 23)
5+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6+
set(CMAKE_OSX_ARCHITECTURES "arm64")
7+
set(CMAKE_OSX_DEPLOYMENT_TARGET "15.0")
8+
9+
add_executable(PeacockPatcher
10+
src/main.cpp
11+
src/process.cpp
12+
src/memory.cpp
13+
src/scanner.cpp
14+
src/patcher.cpp
15+
src/patches.cpp
16+
src/patch_definitions/v3_260_1.cpp
17+
src/version.cpp
18+
)
19+
20+
target_include_directories(PeacockPatcher PRIVATE src)

0 commit comments

Comments
 (0)