From 0b0db2faa9d32f80ed58db5ef66d1701c40b31c3 Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Thu, 9 Feb 2023 23:23:08 -0500 Subject: [PATCH] Make docker build libryzenadj instead of including old version --- backend/Dockerfile | 2 +- backend/build-docker.sh | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index b80882d..05ca0a0 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,5 +1,5 @@ FROM ghcr.io/steamdeckhomebrew/holo-toolchain-rust:latest -RUN pacman -S --noconfirm cmake make clang +RUN pacman -S --noconfirm cmake make clang git ENTRYPOINT [ "/backend/entrypoint.sh" ] diff --git a/backend/build-docker.sh b/backend/build-docker.sh index 6871fb8..a8f84b1 100755 --- a/backend/build-docker.sh +++ b/backend/build-docker.sh @@ -5,11 +5,26 @@ rustup --version rustc --version cargo --version +mkdir -p out + +echo "--- Building ryzenadj lib ---" +git clone https://github.com/FlyGoat/RyzenAdj ryzenadj +cd ryzenadj +git checkout -q 187549bd0a92f84508161aabfd958b09540c7e56 +mkdir build && cd build +cmake -DCMAKE_BUILD_TYPE=Release .. +make +mv libryzenadj.so ../../out/libryzenadj.so +cd ../.. + echo "--- Building plugin backend ---" cargo build --profile docker mkdir -p out -cp target/release/powertools out/backend + +mv target/docker/powertools out/backend echo " --- Cleaning up ---" # remove root-owned target folder cargo clean +# remove newly-cloned git repo and artifacts +rm -rf ./ryzenadj