From a9ec268a4fa80b4f8a8c6d9ffaefc580d0e1a584 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 3 May 2025 16:34:04 -0400 Subject: [PATCH] Add remaining necessary launcher logic to launch the game We still need some changes in LauncherTweaks to inject our custom server URLs, but it's so close now! --- resources/templates/launcher.html | 77 ++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/resources/templates/launcher.html b/resources/templates/launcher.html index 4a6abb7..7a21ff4 100644 --- a/resources/templates/launcher.html +++ b/resources/templates/launcher.html @@ -11,12 +11,13 @@ - - + + + @@ -44,6 +45,9 @@ function fromAppStartVersionCheck(thing) { document.getElementById('replace-me').innerText += "version: " + JSON.stringify(thing); + + // the official launcher does some preparation stuff here, and when it's finished it tells it the ID it just recieved + window.external.user('received=' + thing.ID); } window.fromAppStartVersionCheck = this.checkHandlerType(fromAppStartVersionCheck); @@ -59,9 +63,78 @@ function fromAppResumeInfo(thing) { document.getElementById('replace-me').innerText += "resume info: " + JSON.stringify(thing); + + // acknowledge + window.external.user('received=' + thing.ID); } window.fromAppResumeInfo = this.checkHandlerType(fromAppResumeInfo); + function fromAppLoginUrl(thing) { + document.getElementById('replace-me').innerText += "login info: " + JSON.stringify(thing); + } + window.fromAppLoginUrl = this.checkHandlerType(fromAppLoginUrl); + + function fromAppExAgree(thing) { + document.getElementById('replace-me').innerText += "ex agree: " + JSON.stringify(thing); + } + window.fromAppExAgree = this.checkHandlerType(fromAppExAgree); + + function fromAppStartDownload(thing) { + document.getElementById('replace-me').innerText += "start download: " + JSON.stringify(thing); + } + window.fromAppStartDownload = this.checkHandlerType(fromAppStartDownload); + + function fromAppDownloadProgress(thing) { + document.getElementById('replace-me').innerText += "download prog: " + JSON.stringify(thing); + } + window.fromAppDownloadProgress = this.checkHandlerType(fromAppDownloadProgress); + + function fromAppInstallProgress(thing) { + document.getElementById('replace-me').innerText += "install prog: " + JSON.stringify(thing); + } + window.fromAppInstallProgress = this.checkHandlerType(fromAppInstallProgress); + + function fromAppStartInstall(thing) { + document.getElementById('replace-me').innerText += "start install: " + JSON.stringify(thing); + } + window.fromAppStartInstall = this.checkHandlerType(fromAppStartInstall); + + function fromAppWaitPlay(thing) { + document.getElementById('replace-me').innerText += "wait play: " + JSON.stringify(thing); + + // the official launcher does some preparation stuff here, and when it's finished it tells it the ID it just recieved + window.external.user('received=' + thing.ID); + + // it requests the config again? + window.external.user('requestConfig'); + } + window.fromAppWaitPlay = this.checkHandlerType(fromAppWaitPlay); + + function fromAppStartFileCheck(thing) { + document.getElementById('replace-me').innerText += "file check: " + JSON.stringify(thing); + } + window.fromAppStartFileCheck = this.checkHandlerType(fromAppStartFileCheck); + + function fromAppFileCheckProgress(thing) { + document.getElementById('replace-me').innerText += "file check prog: " + JSON.stringify(thing); + } + window.fromAppFileCheckProgress = this.checkHandlerType(fromAppFileCheckProgress); + + function fromAppFinishedFileCheck(thing) { + document.getElementById('replace-me').innerText += "file check finished: " + JSON.stringify(thing); + } + window.fromAppFinishedFileCheck = this.checkHandlerType(fromAppFinishedFileCheck); + + function fromAppServiceAgreement(thing) { + document.getElementById('replace-me').innerText += "agreement: " + JSON.stringify(thing); + } + window.fromAppServiceAgreement = this.checkHandlerType(fromAppServiceAgreement); + + function fromAppDialog(thing) { + document.getElementById('replace-me').innerText += "dialog: " + JSON.stringify(thing); + } + window.fromAppDialog = this.checkHandlerType(fromAppDialog); + // this is what the retail launcher does window.external.user('permissionFromApp=1'); window.external.user('requestDP');