From 9576070e1793ecf4a1ff7cdd73f09c5e5853c187 Mon Sep 17 00:00:00 2001 From: Andras Laszlo Date: Fri, 16 Oct 2026 17:52:11 +0200 Subject: [PATCH] build: apply optimization flags to existing build trees and escape Exec path --- scripts/build.sh | 4 ++-- tools/riot-desktop-entry.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 6e19ae1..4a5a35a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -14,7 +14,7 @@ python3 scripts/prepare.py # is required by objc4's debug-ness macro check. cmake -S build/darling-src -B build/darling-src/build -G 'Unix Makefiles' \ -DCMAKE_BUILD_TYPE= -DTARGET_i386=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_METAL=ON \ - -DCMAKE_C_FLAGS_INIT="-O3 -march=native -mtune=native -pipe" \ - -DCMAKE_CXX_FLAGS_INIT="-O3 -march=native -mtune=native -pipe" + -DCMAKE_C_FLAGS="-O3 -march=native -mtune=native -pipe" \ + -DCMAKE_CXX_FLAGS="-O3 -march=native -mtune=native -pipe" cmake --build build/darling-src/build --parallel "${JOBS:-$(nproc)}" echo 'Build complete. Install the base runtime with: sudo cmake --install build/darling-src/build' diff --git a/tools/riot-desktop-entry.py b/tools/riot-desktop-entry.py index 6782c31..51d6a74 100755 --- a/tools/riot-desktop-entry.py +++ b/tools/riot-desktop-entry.py @@ -141,13 +141,14 @@ def main(): # 3. Create .desktop file run_script = PROJECT_ROOT / "scripts/run.sh" + exec_path = str(run_script).replace("%", "%%") desktop_content = f"""[Desktop Entry] Version=1.0 Type=Application Name=League of Legends GenericName=MOBA Game Comment=Play League of Legends on Linux with darling-lol -Exec="{run_script}" +Exec="{exec_path}" Path={PROJECT_ROOT} Icon=league-of-legends Terminal=false