forked from minecraft-linux/appimage-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLauncherMain.patch
More file actions
39 lines (38 loc) · 4.05 KB
/
Copy pathLauncherMain.patch
File metadata and controls
39 lines (38 loc) · 4.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- LauncherMain.qml 2023-09-01 18:12:28.495969453 +0800
+++ LauncherMain-mod.qml 2023-09-01 18:20:45.676968417 +0800
@@ -100,20 +100,17 @@
PlayButton {
id: pbutton
Layout.alignment: Qt.AlignHCenter
- text: (isVersionsInitialized && playVerChannel.licenseStatus > 1 /* Fail or Succeeded */ ) ? ((googleLoginHelper.account !== null && playVerChannel.hasVerifiedLicense || !LAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK) ? (gameLauncher.running ? qsTr("Open log") : (checkSupport() ? (needsDownload() ? (googleLoginHelper.account !== null ? (profileManager.activeProfile.versionType === ProfileInfo.LATEST_GOOGLE_PLAY && googleLoginHelper.hideLatest ? qsTr("Please sign in again") : qsTr("Download and play")) : qsTr("Sign in")) : qsTr("Play")) : qsTr("Unsupported Version"))).toUpperCase() : qsTr("Ask Google Again")) : qsTr("Please wait...")
- subText: (isVersionsInitialized && ( googleLoginHelper.account == null || playVerChannel.licenseStatus > 1 /* Fail or Succeeded */) ) ? ((googleLoginHelper.account !== null && playVerChannel.hasVerifiedLicense || !LAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK) ? (gameLauncher.running ? qsTr("Game is running") : (getDisplayedVersionName() ? ("Minecraft " + getDisplayedVersionName()).toUpperCase() : qsTr("Please wait..."))) : "Failed to obtain apk url") : "..."
+ text: isVersionsInitialized ? ((googleLoginHelper.account !== null && playVerChannel.hasVerifiedLicense || !LAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK) ? (gameLauncher.running ? qsTr("Open log") : (checkSupport() ? (needsDownload() ? (googleLoginHelper.account !== null ? (profileManager.activeProfile.versionType === ProfileInfo.LATEST_GOOGLE_PLAY && googleLoginHelper.hideLatest ? qsTr("Please sign in again") : qsTr("Download and play")) : qsTr("Sign in")) : qsTr("Play")) : qsTr("Unsupported Version"))).toUpperCase() : qsTr("Ask Google Again")) : qsTr("Please wait...")
+ subText: isVersionsInitialized ? ((googleLoginHelper.account !== null && playVerChannel.hasVerifiedLicense || !LAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK) ? (gameLauncher.running ? qsTr("Game is running") : (getDisplayedVersionName() ? ("Minecraft " + getDisplayedVersionName()).toUpperCase() : qsTr("Please wait..."))) : "Failed to obtain apk url") : "..."
Layout.fillWidth: true
Layout.preferredHeight: 70
Layout.minimumHeight: implicitHeight
- enabled: (isVersionsInitialized && playVerChannel.licenseStatus > 1 /* Fail or Succeeded */ ) && !(playDownloadTask.active || apkExtractionTask.active || updateChecker.active || !checkSupport()) && (gameLauncher.running || getDisplayedVersionName()) && (googleLoginHelper.account !== null || !LAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK)
+ enabled: isVersionsInitialized && !(playDownloadTask.active || apkExtractionTask.active || updateChecker.active || !checkSupport()) && (gameLauncher.running || getDisplayedVersionName()) && (googleLoginHelper.account !== null || !LAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK)
onClicked: {
if(gameLauncher.running) {
gameLogWindow.show();
gameLauncher.logAttached();
- } else if(googleLoginHelper.account !== null && !playVerChannel.hasVerifiedLicense || !LAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK) {
- playVerChannel.playApi = null;
- playVerChannel.playApi = playApiInstance;
} else {
if (needsDownload()) {
if (googleLoginHelper.account === null) {
@@ -133,6 +130,12 @@
playDownloadTask.start(partialDownload)
return;
}
+
+ if(googleLoginHelper.account !== null && !playVerChannel.hasVerifiedLicense || !LAUNCHER_ENABLE_GOOGLE_PLAY_LICENCE_CHECK) {
+ playVerChannel.playApi = null;
+ playVerChannel.playApi = playApiInstance;
+ }
+
launchGame()
}
}