UI: Update CMakeLists.txt for main OBS app

This commit is contained in:
PatTheMav
2022-03-16 23:11:58 +01:00
parent 1fd7770548
commit 1f0f2be15e
21 changed files with 853 additions and 1020 deletions
+27 -13
View File
@@ -170,21 +170,35 @@ static void AddExtraModulePaths()
string path = base_module_dir;
#if defined(__APPLE__)
obs_add_module_path((path + "/bin").c_str(), (path + "/data").c_str());
/* System Library Search Path */
obs_add_module_path((path + ".plugin/Contents/MacOS").c_str(),
(path + ".plugin/Contents/Resources").c_str());
BPtr<char> config_bin =
os_get_config_path_ptr("obs-studio/plugins/%module%/bin");
BPtr<char> config_data =
os_get_config_path_ptr("obs-studio/plugins/%module%/data");
/* User Application Support Search Path */
BPtr<char> config_bin = os_get_config_path_ptr(
"obs-studio/plugins/%module%.plugin/Contents/MacOS");
BPtr<char> config_data = os_get_config_path_ptr(
"obs-studio/plugins/%module%.plugin/Contents/Resources");
obs_add_module_path(config_bin, config_data);
#elif ARCH_BITS == 64
/* Legacy System Library Search Path */
obs_add_module_path((path + "/bin").c_str(), (path + "/data").c_str());
/* Legacy User Application Support Search Path */
BPtr<char> config_bin_legacy =
os_get_config_path_ptr("obs-studio/plugins/%module%/bin");
BPtr<char> config_data_legacy =
os_get_config_path_ptr("obs-studio/plugins/%module%/data");
obs_add_module_path(config_bin_legacy, config_data_legacy);
#else
#if ARCH_BITS == 64
obs_add_module_path((path + "/bin/64bit").c_str(),
(path + "/data").c_str());
#else
obs_add_module_path((path + "/bin/32bit").c_str(),
(path + "/data").c_str());
#endif
#endif
}
extern obs_frontend_callbacks *InitializeAPIInterface(OBSBasic *main);
@@ -2115,7 +2129,7 @@ void OBSBasic::ReceivedIntroJson(const QString &text)
int minor = 0;
sscanf(version.c_str(), "%d.%d", &major, &minor);
#if OBS_RELEASE_CANDIDATE > 0
#if defined(OBS_RELEASE_CANDIDATE) && OBS_RELEASE_CANDIDATE > 0
if (major == OBS_RELEASE_CANDIDATE_MAJOR &&
minor == OBS_RELEASE_CANDIDATE_MINOR &&
rc == OBS_RELEASE_CANDIDATE) {
@@ -2136,7 +2150,7 @@ void OBSBasic::ReceivedIntroJson(const QString &text)
return;
}
#if OBS_RELEASE_CANDIDATE > 0
#if defined(OBS_RELEASE_CANDIDATE) && OBS_RELEASE_CANDIDATE > 0
uint32_t lastVersion = config_get_int(App()->GlobalConfig(), "General",
"LastRCVersion");
#elif OBS_BETA > 0
@@ -2149,7 +2163,7 @@ void OBSBasic::ReceivedIntroJson(const QString &text)
int current_version_increment = -1;
#if OBS_RELEASE_CANDIDATE > 0
#if defined(OBS_RELEASE_CANDIDATE) && OBS_RELEASE_CANDIDATE > 0
if (lastVersion < OBS_RELEASE_CANDIDATE_VER) {
#elif OBS_BETA > 0
if (lastVersion < OBS_BETA_VER) {
@@ -2642,7 +2656,7 @@ OBSBasic::~OBSBasic()
config_set_int(App()->GlobalConfig(), "General", "LastVersion",
LIBOBS_API_VER);
#if OBS_RELEASE_CANDIDATE > 0
#if defined(OBS_RELEASE_CANDIDATE) && OBS_RELEASE_CANDIDATE > 0
config_set_int(App()->GlobalConfig(), "General", "LastRCVersion",
OBS_RELEASE_CANDIDATE_VER);
#elif OBS_BETA > 0
@@ -3626,7 +3640,7 @@ bool OBSBasic::QueryRemoveSource(obs_source_t *source)
#define UPDATE_CHECK_INTERVAL (60 * 60 * 24 * 4) /* 4 days */
#ifdef UPDATE_SPARKLE
#if defined(ENABLE_SPARKLE_UPDATER)
void init_sparkle_updater(bool update_to_undeployed);
void trigger_sparkle_update();
#endif
@@ -3639,7 +3653,7 @@ void OBSBasic::TimedCheckForUpdates()
"EnableAutoUpdates"))
return;
#ifdef UPDATE_SPARKLE
#if defined(ENABLE_SPARKLE_UPDATER)
init_sparkle_updater(config_get_bool(App()->GlobalConfig(), "General",
"UpdateToUndeployed"));
#elif _WIN32
@@ -3664,7 +3678,7 @@ void OBSBasic::TimedCheckForUpdates()
void OBSBasic::CheckForUpdates(bool manualUpdate)
{
#ifdef UPDATE_SPARKLE
#if defined(ENABLE_SPARKLE_UPDATER)
trigger_sparkle_update();
#elif _WIN32
ui->actionCheckForUpdates->setEnabled(false);