Updating paths broken by refactoring, added temp debug button, updated production file index.

This commit is contained in:
Daniel Scalzi 2017-08-27 03:49:03 -04:00
parent 700a5c50cf
commit 455f199457
5 changed files with 40 additions and 35 deletions

View File

@ -349,7 +349,7 @@ function _extractPackXZ(filePaths){
return new Promise(function(fulfill, reject){ return new Promise(function(fulfill, reject){
const libPath = path.join(__dirname, '..', 'libraries', 'java', 'PackXZExtract.jar') const libPath = path.join(__dirname, '..', 'libraries', 'java', 'PackXZExtract.jar')
const filePath = filePaths.join(',') const filePath = filePaths.join(',')
const child = child_process.spawn('C:\\Program Files\\Java\\jre1.8.0_131\\bin\\javaw.exe', ['-jar', libPath, '-packxz', filePath]) const child = child_process.spawn('C:\\Program Files\\Java\\jdk1.8.0_144\\bin\\javaw.exe', ['-jar', libPath, '-packxz', filePath])
child.stdout.on('data', (data) => { child.stdout.on('data', (data) => {
//console.log('PackXZExtract:', data.toString('utf8')) //console.log('PackXZExtract:', data.toString('utf8'))
}) })
@ -414,6 +414,7 @@ function startAsyncProcess(identifier, limit = 5){
let acc = 0 let acc = 0
const concurrentDlTracker = instance[identifier] const concurrentDlTracker = instance[identifier]
const concurrentDlQueue = concurrentDlTracker.dlqueue.slice(0) const concurrentDlQueue = concurrentDlTracker.dlqueue.slice(0)
console.log(concurrentDlQueue);
if(concurrentDlQueue.length === 0){ if(concurrentDlQueue.length === 0){
return false return false
} else { } else {
@ -741,7 +742,7 @@ function _chainValidateDistributionIndex(basePath){
const targetFile = path.join(basePath, 'westeroscraft.json') const targetFile = path.join(basePath, 'westeroscraft.json')
//TEMP WORKAROUND TO TEST WHILE THIS IS NOT HOSTED //TEMP WORKAROUND TO TEST WHILE THIS IS NOT HOSTED
fs.readFile(path.join(basePath, '..', 'app', 'assets', 'westeroscraft.json'), 'utf-8', (err, data) => { fs.readFile(path.join(__dirname, '..', 'westeroscraft.json'), 'utf-8', (err, data) => {
fulfill(JSON.parse(data)) fulfill(JSON.parse(data))
}) })
}) })

View File

@ -19,7 +19,7 @@ function launchMinecraft(versionData, forgeData, basePath){
//args.push('-mods modstore\\chatbubbles\\chatbubbles\\1.0.1_for_1.11.2\\mod_chatBubbles-1.0.1_for_1.11.2.litemod,modstore\\com\\westeroscraft\\westerosblocks\\3.0.0-beta-71\\westerosblocks-3.0.0-beta-71.jar,modstore\\mezz\\jei\\1.11.2-4.3.5.277\\jei-1.11.2-4.3.5.277.jar,modstore\\net\\optifine\\optifine\\1.11.2_HD_U_B9\\optifine-1.11.2_HD_U_B9.jar') //args.push('-mods modstore\\chatbubbles\\chatbubbles\\1.0.1_for_1.11.2\\mod_chatBubbles-1.0.1_for_1.11.2.litemod,modstore\\com\\westeroscraft\\westerosblocks\\3.0.0-beta-71\\westerosblocks-3.0.0-beta-71.jar,modstore\\mezz\\jei\\1.11.2-4.3.5.277\\jei-1.11.2-4.3.5.277.jar,modstore\\net\\optifine\\optifine\\1.11.2_HD_U_B9\\optifine-1.11.2_HD_U_B9.jar')
//args.push('--modListFile absolute:C:\\Users\\Asus\\Desktop\\LauncherElectron\\app\\assets\\WesterosCraft-1.11.2.json') //args.push('--modListFile absolute:C:\\Users\\Asus\\Desktop\\LauncherElectron\\app\\assets\\WesterosCraft-1.11.2.json')
//TODO make this dynamic //TODO make this dynamic
const child = child_process.spawn('C:\\Program Files\\Java\\jre1.8.0_131\\bin\\javaw.exe', args) const child = child_process.spawn('C:\\Program Files\\Java\\jdk1.8.0_144\\bin\\javaw.exe', args)
child.stdout.on('data', (data) => { child.stdout.on('data', (data) => {
console.log('Minecraft:', data.toString('utf8')) console.log('Minecraft:', data.toString('utf8'))
}) })

View File

@ -5,8 +5,6 @@ const path = require('path')
const os = require('os'); const os = require('os');
const ag = require(path.join(__dirname, 'assets', 'js', 'assetguard.js')) const ag = require(path.join(__dirname, 'assets', 'js', 'assetguard.js'))
console.log($);
$(document).on('ready', function(){ $(document).on('ready', function(){
console.log('okay'); console.log('okay');
}) })
@ -33,6 +31,11 @@ document.onreadystatechange = function () {
window.minimize() window.minimize()
}) })
document.getElementById("test_btn").addEventListener('click', function(e){
console.log('testing')
testdownloads()
})
} }
} }

View File

@ -12,14 +12,14 @@
"autoconnect": true, "autoconnect": true,
"modules": [ "modules": [
{ {
"id": "net.minecraftforge:forge:1.11.2-13.20.0.2282", "id": "net.minecraftforge:forge:1.11.2-13.20.1.2429",
"name": "Minecraft Forge 1.11.2-13.20.0.2282", "name": "Minecraft Forge 1.11.2-13.20.1.2429",
"type": "forge-hosted", "type": "forge-hosted",
"artifact": { "artifact": {
"size": 4396371, "size": 4450992,
"MD5": "1d0f1b383ec122a993e374771c954be2", "MD5": "3fcc9b0104f0261397d3cc897e55a1c5",
"extension": ".jar", "extension": ".jar",
"url": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.11.2-13.20.0.2282/forge-1.11.2-13.20.0.2282-universal.jar" "url": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.11.2-13.20.1.2429/forge-1.11.2-13.20.1.2429-universal.jar"
}, },
"sub_modules": [ "sub_modules": [
{ {
@ -223,50 +223,50 @@
] ]
}, },
{ {
"id": "net.optifine:optifine:1.11.2_HD_U_B9", "id": "net.optifine:optifine:1.11.2_HD_U_C3",
"name": "Optifine (1.11.2_HD_U_B9)", "name": "Optifine (1.11.2_HD_U_C3)",
"type": "forgemod", "type": "forgemod",
"artifact": { "artifact": {
"size": 2056699, "size": 2106193,
"MD5": "38b4c51b9c6ebc09e7a9784accea974e", "MD5": "82f495594cd50e1fda7a8aa0246239fc",
"----path": "OptiFine-1.11.2_HD_U_B9.jar", "------path": "OptiFine-1.11.2_HD_U_C3.jar",
"extension": ".jar", "extension": ".jar",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/test-1.11.2/mods/OptiFine.jar" "url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/mods/OptiFine.jar"
} }
}, },
{ {
"id": "mezz:jei:1.11.2-4.3.5.277", "id": "mezz:jei:1.11.2-4.5.0.290",
"name": "JustEnoughItems (1.11.2-4.3.5.277)", "name": "JustEnoughItems (1.11.2-4.5.0.290)",
"type": "forgemod", "type": "forgemod",
"artifact": { "artifact": {
"size": 509450, "size": 538740,
"MD5": "ea56276646ce405bb4beeaf9064de611", "MD5": "f4d931f6db6210621a86fa1e7eae8016",
"----path": "jei.jar", "------path": "jei.jar",
"extension": ".jar", "extension": ".jar",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/test-1.11.2/mods/jei.jar" "url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/mods/jei.jar"
} }
}, },
{ {
"id": "com.westeroscraft:westerosblocks:3.0.0-beta-71", "id": "com.westeroscraft:westerosblocks:3.0.0-beta-6-133",
"name": "WesterosBlocks (3.0.0-beta-71)", "name": "WesterosBlocks (3.0.0-beta-6-133)",
"type": "forgemod", "type": "forgemod",
"artifact": { "artifact": {
"size": 16252437, "size": 16321712,
"MD5": "d868f0c0b0cabf3cee2b585503873380", "MD5": "5a89e2ab18916c18965fc93a0766cc6e",
"----path": "WesterosBlocks.jar", "----path": "WesterosBlocks.jar",
"extension": ".jar", "extension": ".jar",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/test-1.11.2/mods/WesterosBlocks.jar" "url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/mods/WesterosBlocks.jar"
} }
}, },
{ {
"id": "com.westeroscraft:westeroscraftrp:2017-05-20", "id": "com.westeroscraft:westeroscraftrp:2017-08-16",
"name": "WesterosCraft Resource Pack (2017-05-20)", "name": "WesterosCraft Resource Pack (2017-08-16)",
"type": "file", "type": "file",
"artifact": { "artifact": {
"size": 44573660, "size": 45241339,
"MD5": "b982a65e3fc6971b809f8c60ad4507af", "MD5": "ec2d9fdb14d5c2eafe5975a240202f1a",
"path": "resourcepacks/WesterosCraft.zip", "path": "resourcepacks/WesterosCraft.zip",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/test-1.11.2/resourcepacks/WesterosCraft.zip" "url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/resourcepacks/WesterosCraft.zip"
} }
}, },
{ {
@ -284,10 +284,10 @@
"name": "Saved Client Servers", "name": "Saved Client Servers",
"type": "file", "type": "file",
"artifact": { "artifact": {
"size": 87, "size": 84,
"MD5": "594de6063df993b5fde31c7290226ee4", "MD5": "71d99e229d7d2b8d2a6423e46832a4b8",
"path": "servers.dat", "path": "servers.dat",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/test-1.11.2/servers.dat" "url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/servers.dat"
} }
}, },
{ {

View File

@ -8,6 +8,7 @@
<body> <body>
<% include frame.ejs %> <% include frame.ejs %>
<div id="doc"> <div id="doc">
<button id="test_btn">Debug</button>
</div> </div>
</body> </body>
</html> </html>