Implement Mac App Store build support by introducing the BUILD_FOR_MAC_APP_STORE option. This change disables Sparkle and localhost OAuth redirect server for MAS builds, updates CMake configuration, and modifies build scripts accordingly. Additionally, the macOS bundle identifier is now configurable via CMake.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
#cmakedefine USE_INSTALL_PREFIX
|
||||
|
||||
#cmakedefine BUILD_FOR_MAC_APP_STORE
|
||||
|
||||
#cmakedefine HAVE_BACKTRACE
|
||||
#cmakedefine HAVE_ALSA
|
||||
#cmakedefine HAVE_PULSE
|
||||
|
||||
@@ -52,6 +52,12 @@ LocalRedirectServer::~LocalRedirectServer() {
|
||||
|
||||
bool LocalRedirectServer::Listen() {
|
||||
|
||||
#ifdef BUILD_FOR_MAC_APP_STORE
|
||||
success_ = false;
|
||||
error_ = "Local redirect server is disabled in Mac App Store builds."_L1;
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if (!listen(QHostAddress::LocalHost, static_cast<quint64>(port_))) {
|
||||
success_ = false;
|
||||
error_ = errorString();
|
||||
|
||||
@@ -236,6 +236,14 @@ void OAuthenticator::Authenticate() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Mac App Store builds: do not start any localhost listening redirect server.
|
||||
#ifdef BUILD_FOR_MAC_APP_STORE
|
||||
if (use_local_redirect_server_) {
|
||||
Q_EMIT AuthenticationFinished(false, tr("This authentication flow is disabled in Mac App Store builds."));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
QUrl redirect_url(redirect_url_);
|
||||
|
||||
if (use_local_redirect_server_) {
|
||||
|
||||
Reference in New Issue
Block a user