1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +01:00

First stab at notarization

The distribution will be signed and notarized during an "install" build
and is handled by mac/scripts/build_dist.sh.

The wrapper scripts, mac/Audacity.sh, is no longer needed as it's function
has been integrated into AudacityApp.cpp/main().

Initially, all "hardened entitlements" have been enabled since we don't
know which ones plug-ins will need.

On Mac and Windows, system sleep will be disabled when recording starts
and re-enabled when it ends.
This commit is contained in:
Leland Lucius
2019-12-13 23:43:01 -06:00
parent b53b5e54fe
commit 5fe89c6498
9 changed files with 371 additions and 84 deletions

View File

@@ -769,6 +769,43 @@ IMPLEMENT_WX_THEME_SUPPORT
int main(int argc, char *argv[])
{
// Give the user more control over where libraries such as FFmpeg get loaded from.
//
// Since absolute pathnames are used when loading these libraries, the normal search
// path would be DYLD_LIBRARY_PATH, absolute path, DYLD_FALLBACK_LIBRARY_PATH. This
// means that DYLD_LIBRARY_PATH can override what the user actually wants.
//
// So, we move DYLD_LIBRARY_PATH values to the beginning of DYLD_FALLBACK_LIBRARY_PATH
// and clear DYLD_LIBRARY_PATH, allowing the users choice to be the first one tried.
extern char **environ;
char *dyld_library_path = getenv("DYLD_LIBRARY_PATH");
if (dyld_library_path)
{
size_t len = strlen(dyld_library_path);
if (len)
{
std::string fallback(dyld_library_path);
char *dyld_fallback_library_path = getenv("DYLD_FALLBACK_LIBRARY_PATH");
if (dyld_fallback_library_path)
{
size_t fallback_len = strlen(dyld_fallback_library_path);
if (fallback_len)
{
fallback.push_back(':');
fallback.append(dyld_fallback_library_path);
}
}
fallback.append(":/usr/local/lib:/usr/lib");
setenv("DYLD_FALLBACK_LIBRARY_PATH", &fallback.front(), 1);
unsetenv("DYLD_LIBRARY_PATH");
execve(argv[0], argv, environ);
}
}
wxDISABLE_DEBUG_SUPPORT();
return wxEntry(argc, argv);