v1.4.1 - Forge 1.12.2 (4/10) + requires absolute: prefix.

This commit is contained in:
Daniel Scalzi 2018-12-31 11:27:40 -05:00
parent d7fe519923
commit d2982ca387
No known key found for this signature in database
GPG Key ID: 5CA2F145B63535F9
3 changed files with 42 additions and 16 deletions

View File

@ -174,6 +174,32 @@ class ProcessBuilder {
} }
} }
/**
* Test to see if this version of forge requires the absolute: prefix
* on the modListFile repository field.
*/
_requiresAbsolute(){
try {
const ver = this.forgeData.id.split('-')[2]
const pts = ver.split('.')
const min = [14, 23, 3, 2655]
for(let i=0; i<pts.length; i++){
const parsed = Number.parseInt(pts[i])
if(parsed < min[i]){
return false
} else if(parsed > min[i]){
return true
}
}
} catch (err) {
// We know old forge versions follow this format.
// Error must be caused by newer version.
}
// Equal or errored
return true
}
/** /**
* Construct a mod list json object. * Construct a mod list json object.
* *
@ -183,7 +209,7 @@ class ProcessBuilder {
*/ */
constructModList(type, mods, save = false){ constructModList(type, mods, save = false){
const modList = { const modList = {
repositoryRoot: path.join(this.commonDir, 'modstore') repositoryRoot: ((type === 'forge' && this._requiresAbsolute()) ? 'absolute:' : '') + path.join(this.commonDir, 'modstore')
} }
const ids = [] const ids = []

26
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "westeroscraftlauncher", "name": "westeroscraftlauncher",
"version": "1.4.0", "version": "1.4.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -1069,9 +1069,9 @@
"dev": true "dev": true
}, },
"eslint": { "eslint": {
"version": "5.10.0", "version": "5.11.1",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-5.10.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.11.1.tgz",
"integrity": "sha512-HpqzC+BHULKlnPwWae9MaVZ5AXJKpkxCVXQHrFaRw3hbDj26V/9ArYM4Rr/SQ8pi6qUPLXSSXC4RBJlyq2Z2OQ==", "integrity": "sha512-gOKhM8JwlFOc2acbOrkYR05NW8M6DCMSvfcJiBB5NDxRE1gv8kbvxKaC9u69e6ZGEMWXcswA/7eKR229cEIpvg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0", "@babel/code-frame": "^7.0.0",
@ -1114,9 +1114,9 @@
}, },
"dependencies": { "dependencies": {
"ajv": { "ajv": {
"version": "6.6.1", "version": "6.6.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz",
"integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", "integrity": "sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==",
"dev": true, "dev": true,
"requires": { "requires": {
"fast-deep-equal": "^2.0.1", "fast-deep-equal": "^2.0.1",
@ -1145,9 +1145,9 @@
} }
}, },
"debug": { "debug": {
"version": "4.1.0", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"dev": true, "dev": true,
"requires": { "requires": {
"ms": "^2.1.1" "ms": "^2.1.1"
@ -3046,9 +3046,9 @@
}, },
"dependencies": { "dependencies": {
"ajv": { "ajv": {
"version": "6.6.1", "version": "6.6.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz",
"integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", "integrity": "sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==",
"dev": true, "dev": true,
"requires": { "requires": {
"fast-deep-equal": "^2.0.1", "fast-deep-equal": "^2.0.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "westeroscraftlauncher", "name": "westeroscraftlauncher",
"version": "1.4.0", "version": "1.4.1",
"productName": "WesterosCraft Launcher", "productName": "WesterosCraft Launcher",
"description": "Modded Minecraft Launcher", "description": "Modded Minecraft Launcher",
"author": "Daniel Scalzi (https://github.com/dscalzi/)", "author": "Daniel Scalzi (https://github.com/dscalzi/)",
@ -43,7 +43,7 @@
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"electron": "^4.0.0", "electron": "^4.0.0",
"electron-builder": "^20.38.4", "electron-builder": "^20.38.4",
"eslint": "^5.10.0" "eslint": "^5.11.1"
}, },
"repository": { "repository": {
"type": "git", "type": "git",