From e63e2e076832ab3aafa85425b97f1ff5ecc87421 Mon Sep 17 00:00:00 2001 From: redstrate Date: Wed, 10 Nov 2021 05:18:59 -0500 Subject: [PATCH] Make built-in Wine default for macOS * Also changes macOS to force ini format due to some plist issues --- src/main.cpp | 2 +- src/xivlauncher.cpp | 9 +++++++-- src/xivlauncher.h | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2c01875..c363dc3 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,7 +5,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); QCoreApplication::setOrganizationName("redstrate"); - QCoreApplication::setOrganizationDomain("com.redstrate"); + QCoreApplication::setOrganizationDomain("redstrate.com"); #ifdef NDEBUG QCoreApplication::setApplicationName("xivlauncher"); diff --git a/src/xivlauncher.cpp b/src/xivlauncher.cpp index f913e2d..54cc0df 100755 --- a/src/xivlauncher.cpp +++ b/src/xivlauncher.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #if defined(Q_OS_MAC) #include @@ -218,7 +219,11 @@ void LauncherWindow::readInitialInformation() { profile.name = settings.value("name", "Default").toString(); +#if defined(Q_OS_MAC) + profile.wineVersion = settings.value("wineVersion", 2).toInt(); +#else profile.wineVersion = settings.value("wineVersion", 0).toInt(); +#endif readWineInfo(profile); if(settings.contains("gamePath") && settings.value("gamePath").canConvert() && !settings.value("gamePath").toString().isEmpty()) { @@ -228,7 +233,7 @@ void LauncherWindow::readInitialInformation() { profile.gamePath = "C:\\Program Files (x86)\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn"; #endif -#if defined(Q_OS_MACOS) +#if defined(Q_OS_MAC) profile.gamePath = QDir::homePath() + "/Library/Application Support/FINAL FANTASY XIV ONLINE/Bottles/published_Final_Fantasy/drive_c/Program Files (x86)/SquareEnix/FINAL FANTASY XIV - A Realm Reborn"; #endif @@ -305,7 +310,7 @@ void LauncherWindow::readGameVersion() { } LauncherWindow::LauncherWindow(QWidget* parent) : - QMainWindow(parent) { + QMainWindow(parent), settings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::applicationName()) { mgr = new QNetworkAccessManager(); sapphireLauncher = new SapphireLauncher(*this); squareLauncher = new SquareLauncher(*this); diff --git a/src/xivlauncher.h b/src/xivlauncher.h index a23e8bb..d7bf784 100755 --- a/src/xivlauncher.h +++ b/src/xivlauncher.h @@ -25,7 +25,11 @@ struct ProfileSettings { // wine // 0 = system, 1 = custom, 2 = built-in (mac only) // TODO: yes, i know this should be an enum +#if defined(Q_OS_MAC) + int wineVersion = 2; +#else int wineVersion = 0; +#endif bool useEsync = false, useGamescope = false, useGamemode = false; bool useDX9 = false; bool enableDXVKhud = false;