Starting work on forge downloads

This commit is contained in:
Daniel Scalzi
2017-05-21 01:06:01 -04:00
parent bd503f71c8
commit 247f63d64d
3 changed files with 84 additions and 20 deletions

View File

@@ -39,10 +39,13 @@ $(document).on('ready', function(){
/* Open web links in the user's default browser. */
$(document).on('click', 'a[href^="http"]', function(event) {
event.preventDefault();
//testdownloads()
shell.openExternal(this.href)
testdownloads()
//console.log(os.homedir())
//shell.openExternal(this.href)
});
testdownloads = async function(){
const lp = require(path.join(__dirname, 'assets', 'js', 'launchprocess.js'))
const basePath = path.join(__dirname, '..', 'mcfiles')
@@ -53,8 +56,10 @@ testdownloads = async function(){
console.log('libs done')
await ag.validateMiscellaneous(versionData, basePath)
console.log('files done')
await ag.validateDistribution('WesterosCraft-1.11.2', basePath)
console.log('forge stuff done')
ag.instance.on('dlcomplete', function(){
lp.launchMinecraft(versionData, basePath)
//lp.launchMinecraft(versionData, basePath)
})
ag.processDlQueues()
}
@@ -78,6 +83,7 @@ document.addEventListener('keydown', function (e) {
break
case match[3]:
if(at === 3) ++at
break
case match[4]:
if(at === 4) ++at
break