From a8a9f7b944f09b62b7a86b492a9f69b0f3960d56 Mon Sep 17 00:00:00 2001 From: SCG82 Date: Sat, 28 Dec 2019 15:58:57 -0800 Subject: [PATCH] add argument to specify app bundle path --- src/DylibBundler.cpp | 1 - src/Settings.cpp | 29 +++++++++++++++++++++++++++-- src/Settings.h | 3 +++ src/main.cpp | 14 ++++++++++---- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/DylibBundler.cpp b/src/DylibBundler.cpp index 18f7a3e..aa10188 100644 --- a/src/DylibBundler.cpp +++ b/src/DylibBundler.cpp @@ -262,7 +262,6 @@ void doneWithDeps_go() // copy files if requested by user if (Settings::bundleLibs()) { createDestDir(); - for (size_t i=0; i files; diff --git a/src/Settings.h b/src/Settings.h index 32c0fa0..c73682c 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -25,6 +25,9 @@ void bundleLibs(bool on); bool bundleFrameworks(); void bundleFrameworks(bool status); +std::string appBundle(); +void appBundle(std::string path); + std::string destFolder(); void destFolder(std::string path); diff --git a/src/main.cpp b/src/main.cpp index fcdd2ae..cdeb241 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -24,11 +24,12 @@ void showHelp() { std::cout << "Usage: dylibbundler [options] -x file" << std::endl; std::cout << "Options:" << std::endl; - std::cout << " -x, --fix-file Object file to bundle dependencies (can enter more than one)" << std::endl; + std::cout << " -a, --app Application bundle to make self-contained" << std::endl; + std::cout << " -x, --fix-file Object file(s) to bundle dependencies (optional)" << std::endl; std::cout << " -b, --bundle-deps Copy dependencies to app bundle and fix internal names and rpaths" << std::endl; std::cout << " -f, --bundle-frameworks Copy dependencies that are frameworks (experimental)" << std::endl; - std::cout << " -d, --dest-dir Directory (relative) to copy bundled libraries (default: ../Frameworks/)" << std::endl; - std::cout << " -p, --install-path Inner path (@rpath) of bundled libraries (default: @executable_path/../Frameworks/)" << std::endl; + std::cout << " -d, --dest-dir Directory to copy dependencies, relative to /Contents (default: ./Frameworks)" << std::endl; + std::cout << " -p, --install-path Inner path (@rpath) of bundled dependencies (default: @executable_path/../Frameworks/)" << std::endl; std::cout << " -s, --search-path Directory to add to list of locations searched" << std::endl; std::cout << " -of, --overwrite-files Allow overwriting files in output directory" << std::endl; std::cout << " -od, --overwrite-dir Overwrite output directory if it exists (implies --create-dir)" << std::endl; @@ -44,7 +45,12 @@ int main (int argc, char * const argv[]) { // parse arguments for (int i=0; i