diff options
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r-- | src/Utils.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp index 68d23a7..564adcf 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -167,6 +167,16 @@ int systemp(std::string& cmd) return system(cmd.c_str()); } +void changeInstallName(const std::string& binary_file, const std::string& old_name, const std::string& new_name) +{ + std::string command = std::string("install_name_tool -change ") + old_name + " " + new_name + " " + binary_file; + if( systemp( command ) != 0 ) + { + std::cerr << "\n\nError: An error occured while trying to fix dependencies of " << binary_file << std::endl; + exit(1); + } +} + std::string getUserInputDirForFile(const std::string& filename) { const int searchPathAmount = Settings::searchPathAmount(); |