From fa9703cdbb17af5f2df07e258fedf627a3fd1879 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 31 Oct 2026 13:45:23 +1100 Subject: [PATCH 1/2] Xcode: copy addon dylibs into the app's Frameworks folder and set the runpath (#320) --- commandLine/src/projects/xcodeProject.cpp | 13 +++++++++++-- commandLine/src/projects/xcodeProject.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/commandLine/src/projects/xcodeProject.cpp b/commandLine/src/projects/xcodeProject.cpp index 3a4c3daa..4a413f49 100644 --- a/commandLine/src/projects/xcodeProject.cpp +++ b/commandLine/src/projects/xcodeProject.cpp @@ -683,12 +683,21 @@ void xcodeProject::addDylib(const fs::path & path, const fs::path & folder) { // path = the full path (w name) of this framework // folder = the path in the addon (in case we want to add this to the file browser -- we don't do that for system libs); + // linked through OTHER_LDFLAGS (addLibrary), copied into the app's Frameworks folder (#320) fileProperties fp; - fp.addToBuildPhase = true; fp.codeSignOnCopy = true; fp.copyFilesBuildPhase = true; addFile(path, folder, fp); + + // @rpath/lib.dylib install names load from there + if (!bAddedDylibRunpath) { + string runpath { (target == "osx" || target == "macos") ? "@executable_path/../Frameworks" : "@executable_path/Frameworks" }; + for (auto & c : buildConfigs) { + addCommand("Add :objects:" + c + ":buildSettings:LD_RUNPATH_SEARCH_PATHS: string " + runpath); + } + bAddedDylibRunpath = true; + } } void xcodeProject::addInclude(const fs::path & includeName) { @@ -935,7 +944,7 @@ string xcodeProject::addFile(const fs::path & path, const fs::path & folder, con if (fp.copyFilesBuildPhase && !t.copyFrameworks.empty()) { // // If we are going to add xcframeworks to copy files -> destination frameworks, we should include here - if (path.extension() == ".framework") { + if (path.extension() == ".framework" || path.extension() == ".dylib") { addCommand("# ---- copyPhase Frameworks " + buildUUID); addCommand("Add :objects:" + t.copyFrameworks + ":files: string " + buildUUID); } diff --git a/commandLine/src/projects/xcodeProject.h b/commandLine/src/projects/xcodeProject.h index fb9d78eb..1ac1988a 100644 --- a/commandLine/src/projects/xcodeProject.h +++ b/commandLine/src/projects/xcodeProject.h @@ -19,6 +19,7 @@ class xcodeProject : public baseProject { bool saveProjectFile() override; void saveMakefile(); bool debugCommands = false; + bool bAddedDylibRunpath = false; static std::string LOG_NAME; From 1e62d4992a3a3a4ae51937a109a07ae6238d3afa Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 31 Oct 2026 13:45:23 +1100 Subject: [PATCH 2/2] Updated cmdLine from 0.118.0 to 0.119.0 and PG GUI from 0.112.0 to 0.113.0 --- commandLine/src/defines.h | 2 +- frontend/npm-shrinkwrap.json | 4 ++-- frontend/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commandLine/src/defines.h b/commandLine/src/defines.h index c19a0a2b..0914405f 100644 --- a/commandLine/src/defines.h +++ b/commandLine/src/defines.h @@ -1,5 +1,5 @@ #define OFPROJECTGENERATOR_MAJOR_VERSION "0" -#define OFPROJECTGENERATOR_MINOR_VERSION "118" +#define OFPROJECTGENERATOR_MINOR_VERSION "119" #define OFPROJECTGENERATOR_PATCH_VERSION "0" #define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION) diff --git a/frontend/npm-shrinkwrap.json b/frontend/npm-shrinkwrap.json index 87e10a6c..ba9313ac 100644 --- a/frontend/npm-shrinkwrap.json +++ b/frontend/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "projectGenerator", - "version": "0.112.0", + "version": "0.113.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "projectGenerator", - "version": "0.112.0", + "version": "0.113.0", "license": "MIT", "dependencies": { "@types/jquery": "^3.5.34", diff --git a/frontend/package.json b/frontend/package.json index f212fa0f..2c585b66 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "projectGenerator", "productName": "projectGenerator", - "version": "0.112.0", + "version": "0.113.0", "description": "Build electron GUI openFrameworks projectGenerator", "license": "MIT", "main": "index.js",