Changed some paths in the macOS Bundle, and added Readme
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# OSSP macOS Packaging Utilities
|
||||
|
||||
## What is ```launcher```
|
||||
Launcher is simply a tool that launches OSSP with the correct environment variables when inside a macOS bundle.<br>
|
||||
OSSP packages it's own runtime dependency tree with itself as to avoid dependency issues for the
|
||||
end user. To achieve this though, some hacks have to be made.
|
||||
OSSP needs some environment arguments to launch, such as ```DYLD_LIBRARY_PATH``` and ```LV2_PATH```
|
||||
to use the correct sysroot, and for the equalizer functionality respectively.<br>
|
||||
Normally, macOS sanitizes ```DYLD_*``` environment variables when launching a new program, so
|
||||
```launcher``` was made to create an entirely new environment pointer for execve() to use.
|
||||
|
||||
## Notice
|
||||
NOTE: This does NOT bypass and/or exploit any security features of macOS / Darwin. This is an intentional
|
||||
feature, as when running 'protected' binaries (such as the ones found in ```/usr/bin```),
|
||||
macOS goes even further to sanitize the ```DYLD_*``` environment variables even when utilizing this method.<br>
|
||||
In saying that, there is ABSOLUTELY NO WAY this would EVER pass App Store verification.
|
||||
|
||||
## How to use this?
|
||||
Firstly, build the launcher.<br>
|
||||
Then, build OSSP.<br>
|
||||
Then, copy the actual OSSP binary into the newly created bundle (Bundle/Contents/MacOS/).<br>
|
||||
Then, copy the sysroot from /opt/ossp into the bundle (Bundle/Contents/Sysroot).<br>
|
||||
Finally, make the .icns file for the app icon, and copy it into the bundle (Bundle/Contents/Resources).
|
||||
@@ -39,15 +39,15 @@ int main(int argc, char** argv) {
|
||||
removePath(bundle_path);
|
||||
printf("[OSSPL] Bundle Path: %s\n", bundle_path.c_str());
|
||||
|
||||
// Create DYLD_LIBRARY_PATH - 'Bundle/sysroot/lib'
|
||||
// Create DYLD_LIBRARY_PATH - 'Bundle/Contents/Sysroot/lib'
|
||||
std::string dyld_library_path = bundle_path;
|
||||
dyld_library_path += "/sysroot/lib";
|
||||
dyld_library_path += "/Contents/Sysroot/lib";
|
||||
dyld_library_path = "DYLD_LIBRARY_PATH=" + dyld_library_path;
|
||||
char* c_dyld_library_path = strdup(dyld_library_path.c_str());
|
||||
|
||||
// Create LV2_PATH - 'Bundle/sysroot/lib/lv2'
|
||||
// Create LV2_PATH - 'Bundle/Contents/Sysroot/lib/lv2'
|
||||
std::string lv2_path = bundle_path;
|
||||
lv2_path += "/sysroot/lib/lv2";
|
||||
lv2_path += "/Contents/Sysroot/lib/lv2";
|
||||
lv2_path = "LV2_PATH=" + lv2_path;
|
||||
char* c_lv2_path = strdup(lv2_path.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user