From bbc2f46ef3e900f26402c86d1a16c70e8be3a269 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 16 Oct 2025 21:40:25 +1100 Subject: [PATCH] Linux pG downloader --- scripts/dev/download_pg.sh | 16 +++-- scripts/dev/downloader.sh | 76 ++++++++++++-------- scripts/linux/debian/install_dependencies.sh | 16 +---- scripts/linux/download_projectGenerator.sh | 8 +++ scripts/linux/fedora/install_dependencies.sh | 7 +- 5 files changed, 72 insertions(+), 51 deletions(-) create mode 100644 scripts/linux/download_projectGenerator.sh diff --git a/scripts/dev/download_pg.sh b/scripts/dev/download_pg.sh index 9bdea2851ad..f7cd4dc4950 100755 --- a/scripts/dev/download_pg.sh +++ b/scripts/dev/download_pg.sh @@ -161,6 +161,7 @@ cd "$SCRIPT_DIR" OUTDIR=../../ +ZIP="zip" if [[ $BLEEDING_EDGE = 1 ]] ; then VER=latest fi @@ -169,19 +170,22 @@ if [[ $TAG != "" ]] ; then VER="$TAG" fi +if [ "$PLATFORM" == "linux" ]; then + ZIP="tar.bz2" +fi if [ "$PLATFORM" == "vs" ]; then EXT=".exe" else EXT=".app" fi + OUTPUT=projectGenerator if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then GUI="-gui" else GUI="" fi -PKG="projectGenerator-${PLATFORM}${GUI}.zip" - +PKG="projectGenerator-${PLATFORM}${GUI}.${ZIP}" echo " openFrameworks download_pg.sh" cd ../../ @@ -204,8 +208,10 @@ if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then else mkdir -p "${OUTDIR}${OUTPUT}" tar xjf "$PKG" -C "${OUTDIR}${OUTPUT}" - mv "${OUTDIR}/${OUTPUT}/projectGenerator-osx/projectGenerator$EXT" "${OUTDIR}/${OUTPUT}/projectGenerator$EXT" - rm -rf "${OUTDIR}/${OUTPUT}/projectGenerator-osx/" + if [ "$PLATFORM" == "osx" ]; then + mv "${OUTDIR}/${OUTPUT}/projectGenerator-osx/projectGenerator$EXT" "${OUTDIR}/${OUTPUT}/projectGenerator$EXT" + rm -rf "${OUTDIR}/${OUTPUT}/projectGenerator-osx/" + fi fi if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then @@ -220,6 +226,8 @@ if [ "$PLATFORM" == "msys2" ] || [ "$PLATFORM" == "vs" ]; then # else # echo "Warning: chmod command not found, skipping permission adjustment." # fi +elif [ "$PLATFORM" == "linux" ]; then + chmod +x "${OUTDIR}/${OUTPUT}/projectGenerator" else if ! command -v rsync &> /dev/null; then cp -arX "${OUTDIR}/${OUTPUT}/projectGenerator$EXT/Contents/Resources/app/app/projectGenerator" "${OUTDIR}/${OUTPUT}/projectGenerator" diff --git a/scripts/dev/downloader.sh b/scripts/dev/downloader.sh index b31f1f8c205..374cbdb0c14 100755 --- a/scripts/dev/downloader.sh +++ b/scripts/dev/downloader.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION=4.5.0 +VERSION=4.6.0 printDownloaderHelp() { cat <