Skip to content

Commit

Permalink
add linux support
Browse files Browse the repository at this point in the history
looks like Microsoft fixed `hostfxr_initialize_for_runtime_config`
  • Loading branch information
StackOverflowExcept1on committed Aug 30, 2024
1 parent 2110152 commit 6d16412
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,23 @@ on:
workflow_dispatch:

jobs:
build:
linux-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Build project
run: ./_build.sh

- name: Run project
run: ./_run.sh

windows-build:
runs-on: windows-latest

steps:
Expand Down
7 changes: 7 additions & 0 deletions Bootstrapper/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -ex

mkdir -p build && cd build

cmake ..
cmake --build . --config Release
3 changes: 3 additions & 0 deletions DemoApplication/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -ex
dotnet publish -c Release -r linux-x64 -p:PublishDir="$(pwd)/dist" --self-contained
3 changes: 3 additions & 0 deletions RuntimePatcher/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -ex
dotnet publish -c Release -p:PublishDir="$(pwd)/dist"
16 changes: 16 additions & 0 deletions _build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -ex

npm install

cd Bootstrapper
./build.sh
cd ..

cd DemoApplication
./build.sh
cd ..

cd RuntimePatcher
./build.sh
cd ..
11 changes: 11 additions & 0 deletions _run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -ex

sudo sysctl kernel.yama.ptrace_scope=0
./DemoApplication/dist/DemoApplication &
npm start -- inject \
DemoApplication \
Bootstrapper/build/libBootstrapper.so \
RuntimePatcher/dist/RuntimePatcher.runtimeconfig.json \
RuntimePatcher/dist/RuntimePatcher.dll \
"RuntimePatcher.Main, RuntimePatcher" "InitializePatches"

0 comments on commit 6d16412

Please sign in to comment.