Build: Improve MacOS support

This commit is contained in:
Stenzek
2023-09-10 14:14:27 +10:00
parent abb39e8a00
commit b30c86ed75
8 changed files with 108 additions and 68 deletions

View File

@@ -71,7 +71,12 @@ void QtHost::InstallTranslator()
QString::fromStdString(Host::GetBaseStringSettingValue("Main", "Language", GetDefaultLanguage())));
// install the base qt translation first
const QString base_dir(QStringLiteral("%1/translations").arg(qApp->applicationDirPath()));
#ifndef __APPLE__
const QString base_dir = QStringLiteral("%1/translations").arg(qApp->applicationDirPath());
#else
const QString base_dir = QStringLiteral("%1/../Resources/translations").arg(qApp->applicationDirPath());
#endif
QString base_path(QStringLiteral("%1/qtbase_%2.qm").arg(base_dir).arg(language));
bool has_base_ts = QFile::exists(base_path);
if (!has_base_ts)