mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 19:52:14 -08:00
Compare commits
No commits in common. "3d8f2fe9d02e0bf9dc5b602e01d8b8f9c4e02d6e" and "26219e4c4b5953729a1bf66f0aa07f3fcd310cf9" have entirely different histories.
3d8f2fe9d0
...
26219e4c4b
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017-2024 Daniel D. Scalzi
|
Copyright (c) 2017-2022 Daniel D. Scalzi
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -84,7 +84,7 @@ This section details the setup of a basic developmentment environment.
|
|||||||
|
|
||||||
**System Requirements**
|
**System Requirements**
|
||||||
|
|
||||||
* [Node.js][nodejs] v20
|
* [Node.js][nodejs] v18
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -12,122 +12,12 @@
|
|||||||
const ConfigManager = require('./configmanager')
|
const ConfigManager = require('./configmanager')
|
||||||
const { LoggerUtil } = require('helios-core')
|
const { LoggerUtil } = require('helios-core')
|
||||||
const { RestResponseStatus } = require('helios-core/common')
|
const { RestResponseStatus } = require('helios-core/common')
|
||||||
const { MojangRestAPI, MojangErrorCode } = require('helios-core/mojang')
|
const { MojangRestAPI, mojangErrorDisplayable, MojangErrorCode } = require('helios-core/mojang')
|
||||||
const { MicrosoftAuth, MicrosoftErrorCode } = require('helios-core/microsoft')
|
const { MicrosoftAuth, microsoftErrorDisplayable, MicrosoftErrorCode } = require('helios-core/microsoft')
|
||||||
const { AZURE_CLIENT_ID } = require('./ipcconstants')
|
const { AZURE_CLIENT_ID } = require('./ipcconstants')
|
||||||
const Lang = require('./langloader')
|
|
||||||
|
|
||||||
const log = LoggerUtil.getLogger('AuthManager')
|
const log = LoggerUtil.getLogger('AuthManager')
|
||||||
|
|
||||||
// Error messages
|
|
||||||
|
|
||||||
function microsoftErrorDisplayable(errorCode) {
|
|
||||||
switch (errorCode) {
|
|
||||||
case MicrosoftErrorCode.NO_PROFILE:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.microsoft.error.noProfileTitle'),
|
|
||||||
desc: Lang.queryJS('auth.microsoft.error.noProfileDesc')
|
|
||||||
}
|
|
||||||
case MicrosoftErrorCode.NO_XBOX_ACCOUNT:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.microsoft.error.noXboxAccountTitle'),
|
|
||||||
desc: Lang.queryJS('auth.microsoft.error.noXboxAccountDesc')
|
|
||||||
}
|
|
||||||
case MicrosoftErrorCode.XBL_BANNED:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.microsoft.error.xblBannedTitle'),
|
|
||||||
desc: Lang.queryJS('auth.microsoft.error.xblBannedDesc')
|
|
||||||
}
|
|
||||||
case MicrosoftErrorCode.UNDER_18:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.microsoft.error.under18Title'),
|
|
||||||
desc: Lang.queryJS('auth.microsoft.error.under18Desc')
|
|
||||||
}
|
|
||||||
case MicrosoftErrorCode.UNKNOWN:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.microsoft.error.unknownTitle'),
|
|
||||||
desc: Lang.queryJS('auth.microsoft.error.unknownDesc')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function mojangErrorDisplayable(errorCode) {
|
|
||||||
switch(errorCode) {
|
|
||||||
case MojangErrorCode.ERROR_METHOD_NOT_ALLOWED:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.methodNotAllowedTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.methodNotAllowedDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_NOT_FOUND:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.notFoundTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.notFoundDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_USER_MIGRATED:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.accountMigratedTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.accountMigratedDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_INVALID_CREDENTIALS:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.invalidCredentialsTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.invalidCredentialsDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_RATELIMIT:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.tooManyAttemptsTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.tooManyAttemptsDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_INVALID_TOKEN:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.invalidTokenTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.invalidTokenDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_ACCESS_TOKEN_HAS_PROFILE:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.tokenHasProfileTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.tokenHasProfileDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_CREDENTIALS_MISSING:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.credentialsMissingTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.credentialsMissingDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_INVALID_SALT_VERSION:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.invalidSaltVersionTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.invalidSaltVersionDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_UNSUPPORTED_MEDIA_TYPE:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.unsupportedMediaTypeTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.unsupportedMediaTypeDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_GONE:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.accountGoneTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.accountGoneDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_UNREACHABLE:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.unreachableTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.unreachableDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.ERROR_NOT_PAID:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.gameNotPurchasedTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.gameNotPurchasedDesc')
|
|
||||||
}
|
|
||||||
case MojangErrorCode.UNKNOWN:
|
|
||||||
return {
|
|
||||||
title: Lang.queryJS('auth.mojang.error.unknownErrorTitle'),
|
|
||||||
desc: Lang.queryJS('auth.mojang.error.unknownErrorDesc')
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
throw new Error(`Unknown error code: ${errorCode}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -279,11 +279,6 @@ latestVersionTitle = "You Are Running the Latest Version"
|
|||||||
checkForUpdatesButton = "Check for Updates"
|
checkForUpdatesButton = "Check for Updates"
|
||||||
checkingForUpdatesButton = "Checking for Updates.."
|
checkingForUpdatesButton = "Checking for Updates.."
|
||||||
|
|
||||||
[js.settings.msftLogin]
|
|
||||||
errorTitle = "Microsoft Login Failed"
|
|
||||||
errorMessage = "We were unable to authenticate your Microsoft account. Please try again."
|
|
||||||
okButton = "OK"
|
|
||||||
|
|
||||||
[js.uibinder.startup]
|
[js.uibinder.startup]
|
||||||
fatalErrorTitle = "Fatal Error: Unable to Load Distribution Index"
|
fatalErrorTitle = "Fatal Error: Unable to Load Distribution Index"
|
||||||
fatalErrorMessage = "A connection could not be established to our servers to download the distribution index. No local copies were available to load. <br><br>The distribution index is an essential file which provides the latest server information. The launcher is unable to start without it. Ensure you are connected to the internet and relaunch the application."
|
fatalErrorMessage = "A connection could not be established to our servers to download the distribution index. No local copies were available to load. <br><br>The distribution index is an essential file which provides the latest server information. The launcher is unable to start without it. Ensure you are connected to the internet and relaunch the application."
|
||||||
@ -300,45 +295,3 @@ selectAnotherAccountButton = "Select Another Account"
|
|||||||
checkingForUpdateButton = "Checking for Updates..."
|
checkingForUpdateButton = "Checking for Updates..."
|
||||||
installNowButton = "Install Now"
|
installNowButton = "Install Now"
|
||||||
checkForUpdatesButton = "Check for Updates"
|
checkForUpdatesButton = "Check for Updates"
|
||||||
|
|
||||||
[js.auth.microsoft.error]
|
|
||||||
noProfileTitle = "Error During Login:<br>Profile Not Set Up"
|
|
||||||
noProfileDesc = "Your Microsoft account does not yet have a Minecraft profile set up. If you have recently purchased the game or redeemed it through Xbox Game Pass, you have to set up your profile on <a href=\"https://minecraft.net/\">Minecraft.net</a>.<br><br>If you have not yet purchased the game, you can also do that on <a href=\"https://minecraft.net/\">Minecraft.net</a>."
|
|
||||||
noXboxAccountTitle = "Error During Login:<br>No Xbox Account"
|
|
||||||
noXboxAccountDesc = "Your Microsoft account has no Xbox account associated with it."
|
|
||||||
xblBannedTitle = "Error During Login:<br>Xbox Live Unavailable"
|
|
||||||
xblBannedDesc = "Your Microsoft account is from a country where Xbox Live is not available or banned."
|
|
||||||
under18Title = "Error During Login:<br>Parental Approval Required"
|
|
||||||
under18Desc = "Accounts for users under the age of 18 must be added to a Family by an adult."
|
|
||||||
unknownTitle = "Unknown Error During Login"
|
|
||||||
unknownDesc = "An unknown error has occurred. Please see the console for details."
|
|
||||||
|
|
||||||
[js.auth.mojang.error]
|
|
||||||
methodNotAllowedTitle = "Internal Error:<br>Method Not Allowed"
|
|
||||||
methodNotAllowedDesc = "Method not allowed. Please report this error."
|
|
||||||
notFoundTitle = "Internal Error:<br>Not Found"
|
|
||||||
notFoundDesc = "The authentication endpoint was not found. Please report this issue."
|
|
||||||
accountMigratedTitle = "Error During Login:<br>Account Migrated"
|
|
||||||
accountMigratedDesc = "You've attempted to login with a migrated account. Try again using the account email as the username."
|
|
||||||
invalidCredentialsTitle = "Error During Login:<br>Invalid Credentials"
|
|
||||||
invalidCredentialsDesc = "The email or password you've entered is incorrect. Please try again."
|
|
||||||
tooManyAttemptsTitle = "Error During Login:<br>Too Many Attempts"
|
|
||||||
tooManyAttemptsDesc = "There have been too many login attempts with this account recently. Please try again later."
|
|
||||||
invalidTokenTitle = "Error During Login:<br>Invalid Token"
|
|
||||||
invalidTokenDesc = "The provided access token is invalid."
|
|
||||||
tokenHasProfileTitle = "Error During Login:<br>Token Has Profile"
|
|
||||||
tokenHasProfileDesc = "Access token already has a profile assigned. Selecting profiles is not implemented yet."
|
|
||||||
credentialsMissingTitle = "Error During Login:<br>Credentials Missing"
|
|
||||||
credentialsMissingDesc = "Username/password was not submitted or password is less than 3 characters."
|
|
||||||
invalidSaltVersionTitle = "Error During Login:<br>Invalid Salt Version"
|
|
||||||
invalidSaltVersionDesc = "Invalid salt version."
|
|
||||||
unsupportedMediaTypeTitle = "Internal Error:<br>Unsupported Media Type"
|
|
||||||
unsupportedMediaTypeDesc = "Unsupported media type. Please report this error."
|
|
||||||
accountGoneTitle = "Error During Login:<br>Account Migrated"
|
|
||||||
accountGoneDesc = "Account has been migrated to a Microsoft account. Please log in with Microsoft."
|
|
||||||
unreachableTitle = "Error During Login:<br>Unreachable"
|
|
||||||
unreachableDesc = "Unable to reach the authentication servers. Ensure that they are online and you are connected to the internet."
|
|
||||||
gameNotPurchasedTitle = "Error During Login:<br>Game Not Purchased"
|
|
||||||
gameNotPurchasedDesc = "The account you are trying to login with has not purchased a copy of Minecraft. You may purchase a copy on <a href=\"https://minecraft.net/\">Minecraft.net</a>"
|
|
||||||
unknownErrorTitle = "Unknown Error During Login"
|
|
||||||
unknownErrorDesc = "An unknown error has occurred. Please see the console for details."
|
|
||||||
|
@ -2,7 +2,7 @@ appId: 'helioslauncher'
|
|||||||
productName: 'Helios Launcher'
|
productName: 'Helios Launcher'
|
||||||
artifactName: '${productName}-setup-${version}.${ext}'
|
artifactName: '${productName}-setup-${version}.${ext}'
|
||||||
|
|
||||||
copyright: 'Copyright © 2018-2024 Daniel Scalzi'
|
copyright: 'Copyright © 2018-2022 Daniel Scalzi'
|
||||||
|
|
||||||
asar: true
|
asar: true
|
||||||
compression: 'maximum'
|
compression: 'maximum'
|
||||||
|
1001
package-lock.json
generated
1001
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "helioslauncher",
|
"name": "helioslauncher",
|
||||||
"version": "2.2.1",
|
"version": "2.1.1",
|
||||||
"productName": "Helios Launcher",
|
"productName": "Helios Launcher",
|
||||||
"description": "Modded Minecraft Launcher",
|
"description": "Modded Minecraft Launcher",
|
||||||
"author": "Daniel Scalzi (https://github.com/dscalzi/)",
|
"author": "Daniel Scalzi (https://github.com/dscalzi/)",
|
||||||
@ -20,29 +20,29 @@
|
|||||||
"lint": "eslint --config .eslintrc.json ."
|
"lint": "eslint --config .eslintrc.json ."
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "20.x.x"
|
"node": "18.x.x"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@electron/remote": "^2.1.2",
|
"@electron/remote": "^2.1.0",
|
||||||
"adm-zip": "^0.5.9",
|
"adm-zip": "^0.5.9",
|
||||||
"discord-rpc-patch": "^4.0.1",
|
"discord-rpc-patch": "^4.0.1",
|
||||||
"ejs": "^3.1.9",
|
"ejs": "^3.1.9",
|
||||||
"ejs-electron": "^3.0.0",
|
"ejs-electron": "^2.1.1",
|
||||||
"electron-updater": "^6.1.8",
|
"electron-updater": "^6.1.7",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"github-syntax-dark": "^0.5.0",
|
"github-syntax-dark": "^0.5.0",
|
||||||
"got": "^11.8.5",
|
"got": "^11.8.5",
|
||||||
"helios-core": "~2.2.0",
|
"helios-core": "~2.1.1",
|
||||||
"helios-distribution-types": "^1.3.0",
|
"helios-distribution-types": "^1.3.0",
|
||||||
"jquery": "^3.7.1",
|
"jquery": "^3.7.1",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"semver": "^7.6.0",
|
"semver": "^7.5.4",
|
||||||
"toml": "^3.0.0"
|
"toml": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^29.1.0",
|
"electron": "^27.1.3",
|
||||||
"electron-builder": "^24.13.3",
|
"electron-builder": "^24.9.1",
|
||||||
"eslint": "^8.57.0"
|
"eslint": "^8.56.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user