From 28ff5a6d3349d7a95b7bad2e39cc8c7b02808bc1 Mon Sep 17 00:00:00 2001 From: jolavillette Date: Sat, 6 Jun 2026 12:34:07 +0200 Subject: [PATCH] build: move deploy scripts under build_scripts// Following the removal of the orchestrator Makefile, the canonical build is now plain CMake on the top-level CMakeLists.txt (e.g. cmake -B Build-cmake -S . -DRS_PLUGINS=ON && cmake --build Build-cmake; on Windows add -G "MSYS Makefiles" -DRS_LIBRETROSHARE_STATIC=OFF -DRS_LIBRETROSHARE_SHARED=ON). Move the packaging scripts into their matching build_scripts/ sub-directories and make them independent of the Makefile and of the invocation directory: - deploy-macos.sh -> build_scripts/OSX/deploy-macos.sh - deploy-windows.sh -> build_scripts/Windows-msys2/deploy-windows.sh Each script now cd's to the repository root from its own location and reads the build directory from BUILD_DIR (default Build-cmake) instead of assuming it. Co-Authored-By: Claude Opus 4.8 (1M context) --- deploy-macos.sh => build_scripts/OSX/deploy-macos.sh | 7 ++++++- .../Windows-msys2/deploy-windows.sh | 11 ++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) rename deploy-macos.sh => build_scripts/OSX/deploy-macos.sh (96%) rename deploy-windows.sh => build_scripts/Windows-msys2/deploy-windows.sh (97%) diff --git a/deploy-macos.sh b/build_scripts/OSX/deploy-macos.sh similarity index 96% rename from deploy-macos.sh rename to build_scripts/OSX/deploy-macos.sh index 1fec3a44c..6b44c0909 100755 --- a/deploy-macos.sh +++ b/build_scripts/OSX/deploy-macos.sh @@ -14,7 +14,12 @@ # ============================================================================== set -e -BUILD_DIR="Build-cmake" +# Always operate from the repository root, regardless of where this script lives +# (it resides under build_scripts/OSX/). All paths below are relative to the root. +cd "$(dirname "$0")/../.." || exit 1 + +# Build directory (override with: BUILD_DIR=mydir ./build_scripts/OSX/deploy-macos.sh) +BUILD_DIR="${BUILD_DIR:-Build-cmake}" APP_NAME="RetroShare" # 1. Vérifications initiales du dossier de build diff --git a/deploy-windows.sh b/build_scripts/Windows-msys2/deploy-windows.sh similarity index 97% rename from deploy-windows.sh rename to build_scripts/Windows-msys2/deploy-windows.sh index 24bc3e9da..b08494ab9 100755 --- a/deploy-windows.sh +++ b/build_scripts/Windows-msys2/deploy-windows.sh @@ -15,12 +15,13 @@ # ============================================================================== set -e -# Toujours travailler depuis la racine du dépôt (emplacement du script), -# sinon les chemins relatifs (retroshare-gui/src, libbitdht, ...) sont muets -# et produisent un paquet incomplet sans la moindre erreur. -cd "$(dirname "$0")" || exit 1 +# Toujours travailler depuis la racine du dépôt (ce script vit sous +# build_scripts/Windows-msys2/), sinon les chemins relatifs (retroshare-gui/src, +# libbitdht, ...) sont muets et produisent un paquet incomplet sans erreur. +cd "$(dirname "$0")/../.." || exit 1 -BUILD_DIR="Build-cmake" +# Build directory (override with: BUILD_DIR=mydir ./build_scripts/Windows-msys2/deploy-windows.sh) +BUILD_DIR="${BUILD_DIR:-Build-cmake}" # Préfixe de l'environnement MSYS2 utilisé pour la compilation # (mingw64 / ucrt64 / clang64). Indispensable pour retrouver le runtime