1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-06-08 15:07:45 +00:00

Make built-in Wine default for macOS

* Also changes macOS to force ini format due to some plist issues
This commit is contained in:
redstrate 2021-11-10 05:18:59 -05:00
parent 6a32d73301
commit e63e2e0768
3 changed files with 12 additions and 3 deletions

View file

@ -5,7 +5,7 @@ int main(int argc, char* argv[]) {
QApplication app(argc, argv); QApplication app(argc, argv);
QCoreApplication::setOrganizationName("redstrate"); QCoreApplication::setOrganizationName("redstrate");
QCoreApplication::setOrganizationDomain("com.redstrate"); QCoreApplication::setOrganizationDomain("redstrate.com");
#ifdef NDEBUG #ifdef NDEBUG
QCoreApplication::setApplicationName("xivlauncher"); QCoreApplication::setApplicationName("xivlauncher");

View file

@ -14,6 +14,7 @@
#include <keychain.h> #include <keychain.h>
#include <QMessageBox> #include <QMessageBox>
#include <QMenuBar> #include <QMenuBar>
#include <QCoreApplication>
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
#include <sys/sysctl.h> #include <sys/sysctl.h>
@ -218,7 +219,11 @@ void LauncherWindow::readInitialInformation() {
profile.name = settings.value("name", "Default").toString(); 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(); profile.wineVersion = settings.value("wineVersion", 0).toInt();
#endif
readWineInfo(profile); readWineInfo(profile);
if(settings.contains("gamePath") && settings.value("gamePath").canConvert<QString>() && !settings.value("gamePath").toString().isEmpty()) { if(settings.contains("gamePath") && settings.value("gamePath").canConvert<QString>() && !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"; profile.gamePath = "C:\\Program Files (x86)\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn";
#endif #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"; 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 #endif
@ -305,7 +310,7 @@ void LauncherWindow::readGameVersion() {
} }
LauncherWindow::LauncherWindow(QWidget* parent) : LauncherWindow::LauncherWindow(QWidget* parent) :
QMainWindow(parent) { QMainWindow(parent), settings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::applicationName()) {
mgr = new QNetworkAccessManager(); mgr = new QNetworkAccessManager();
sapphireLauncher = new SapphireLauncher(*this); sapphireLauncher = new SapphireLauncher(*this);
squareLauncher = new SquareLauncher(*this); squareLauncher = new SquareLauncher(*this);

View file

@ -25,7 +25,11 @@ struct ProfileSettings {
// wine // wine
// 0 = system, 1 = custom, 2 = built-in (mac only) // 0 = system, 1 = custom, 2 = built-in (mac only)
// TODO: yes, i know this should be an enum // TODO: yes, i know this should be an enum
#if defined(Q_OS_MAC)
int wineVersion = 2;
#else
int wineVersion = 0; int wineVersion = 0;
#endif
bool useEsync = false, useGamescope = false, useGamemode = false; bool useEsync = false, useGamescope = false, useGamemode = false;
bool useDX9 = false; bool useDX9 = false;
bool enableDXVKhud = false; bool enableDXVKhud = false;