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:
2026-01-22 19:28:00 +09:00
parent 6a1d8bbc87
commit bd59c19301
11 changed files with 479 additions and 29 deletions

View File

@@ -7,6 +7,8 @@
#cmakedefine USE_INSTALL_PREFIX
#cmakedefine BUILD_FOR_MAC_APP_STORE
#cmakedefine HAVE_BACKTRACE
#cmakedefine HAVE_ALSA
#cmakedefine HAVE_PULSE

View File

@@ -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();

View File

@@ -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_) {