diff options
author | azahi <azat@bahawi.net> | 2025-01-14 14:14:56 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2025-01-14 14:14:56 +0300 |
commit | 079054e7818874d6f83bc6e1333001486a6350e1 (patch) | |
tree | 1d89addffdf14647b4266da72cdb8e902f455407 | |
parent | 2025-01-14 (diff) |
2025-01-14
Diffstat (limited to '')
-rw-r--r-- | overlays.nix | 2 | ||||
-rw-r--r-- | packages/prismlauncher-no-login.patch | 65 | ||||
-rw-r--r-- | packages/prismlauncher-no-valid-account.patch | 18 |
3 files changed, 19 insertions, 66 deletions
diff --git a/overlays.nix b/overlays.nix index 893fea4..f5c3aac 100644 --- a/overlays.nix +++ b/overlays.nix @@ -58,7 +58,7 @@ nixfmt.__assign = prev.nixfmt-rfc-style; prismlauncher-unwrapped.__output.patches.__append = [ - ./packages/prismlauncher-no-login.patch + ./packages/prismlauncher-no-valid-account.patch ]; openssl_1_0_0.__assign = prev.callPackage ./packages/openssl_1_0_0.nix { }; diff --git a/packages/prismlauncher-no-login.patch b/packages/prismlauncher-no-login.patch deleted file mode 100644 index 033cb1a..0000000 --- a/packages/prismlauncher-no-login.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff --git c/launcher/Application.cpp w/launcher/Application.cpp -index b8dcc1099..29a84ba85 100644 ---- c/launcher/Application.cpp -+++ w/launcher/Application.cpp -@@ -1094,7 +1094,7 @@ bool Application::createSetupWizard() - bool pasteInterventionRequired = settings()->get("PastebinURL") != ""; - bool validWidgets = m_themeManager->isValidApplicationTheme(settings()->get("ApplicationTheme").toString()); - bool validIcons = m_themeManager->isValidIconTheme(settings()->get("IconTheme").toString()); -- bool login = !m_accounts->anyAccountIsValid() && capabilities() & Application::SupportsMSA; -+ bool login = false; - bool themeInterventionRequired = !validWidgets || !validIcons; - bool wizardRequired = javaRequired || languageRequired || pasteInterventionRequired || themeInterventionRequired || askjava || login; - if (wizardRequired) { -diff --git c/launcher/LaunchController.cpp w/launcher/LaunchController.cpp -index 687da1322..2bab547e8 100644 ---- c/launcher/LaunchController.cpp -+++ w/launcher/LaunchController.cpp -@@ -84,27 +84,8 @@ void LaunchController::decideAccount() - return; - } - -- // Find an account to use. -- auto accounts = APPLICATION->accounts(); -- if (accounts->count() <= 0 || !accounts->anyAccountIsValid()) { -- // Tell the user they need to log in at least one account in order to play. -- auto reply = CustomMessageBox::selectable(m_parentWidget, tr("No Accounts"), -- tr("In order to play Minecraft, you must have at least one Microsoft " -- "account which owns Minecraft logged in. " -- "Would you like to open the account manager to add an account now?"), -- QMessageBox::Information, QMessageBox::Yes | QMessageBox::No) -- ->exec(); -- -- if (reply == QMessageBox::Yes) { -- // Open the account manager. -- APPLICATION->ShowGlobalSettings(m_parentWidget, "accounts"); -- } else if (reply == QMessageBox::No) { -- // Do not open "profile select" dialog. -- return; -- } -- } -- - // Select the account to use. If the instance has a specific account set, that will be used. Otherwise, the default account will be used -+ auto accounts = APPLICATION->accounts(); - auto instanceAccountId = m_instance->settings()->get("InstanceAccountId").toString(); - auto instanceAccountIndex = accounts->findAccountByProfileId(instanceAccountId); - if (instanceAccountIndex == -1 || instanceAccountId.isEmpty()) { -diff --git c/launcher/ui/pages/global/AccountListPage.cpp w/launcher/ui/pages/global/AccountListPage.cpp -index 041b8faff..90eb6becf 100644 ---- c/launcher/ui/pages/global/AccountListPage.cpp -+++ w/launcher/ui/pages/global/AccountListPage.cpp -@@ -141,14 +141,6 @@ void AccountListPage::on_actionAddMicrosoft_triggered() - - void AccountListPage::on_actionAddOffline_triggered() - { -- if (!m_accounts->anyAccountIsValid()) { -- QMessageBox::warning(this, tr("Error"), -- tr("You must add a Microsoft account that owns Minecraft before you can add an offline account." -- "<br><br>" -- "If you have lost your account you can contact Microsoft for support.")); -- return; -- } -- - MinecraftAccountPtr account = - OfflineLoginDialog::newAccount(this, tr("Please enter your desired username to add your offline account.")); - diff --git a/packages/prismlauncher-no-valid-account.patch b/packages/prismlauncher-no-valid-account.patch new file mode 100644 index 0000000..9591453 --- /dev/null +++ b/packages/prismlauncher-no-valid-account.patch @@ -0,0 +1,18 @@ +diff --git c/launcher/minecraft/auth/AccountList.cpp w/launcher/minecraft/auth/AccountList.cpp +index d276d4c41..b3c70962d 100644 +--- c/launcher/minecraft/auth/AccountList.cpp ++++ w/launcher/minecraft/auth/AccountList.cpp +@@ -577,12 +577,7 @@ void AccountList::setListFilePath(QString path, bool autosave) + + bool AccountList::anyAccountIsValid() + { +- for (auto account : m_accounts) { +- if (account->ownsMinecraft()) { +- return true; +- } +- } +- return false; ++ return true; + } + + void AccountList::fillQueue() |