Progress towards final asset downloading system (assetguard).

This commit is contained in:
Daniel Scalzi
2017-05-13 04:24:15 -04:00
parent f5702f62a6
commit 0dfb26f8fa
5 changed files with 320 additions and 62 deletions

View File

@@ -1,13 +1,26 @@
var $ = require('jQuery');
const remote = require('electron').remote
const shell = require('electron').shell
const path = require('path')
/* Open web links in the user's default browser. */
$(document).on('click', 'a[href^="http"]', function(event) {
event.preventDefault();
shell.openExternal(this.href);
//testdownloads()
shell.openExternal(this.href)
});
testdownloads = async function(){
const ag = require(path.join(__dirname, 'assets', 'js', 'assetguard.js'))
const basePath = path.join(__dirname, '..', 'mcfiles')
let versionData = await ag.loadVersionData('1.11.2', basePath)
await ag.validateAssets(versionData, basePath)
console.log('assets done')
await ag.validateLibraries(versionData, basePath)
console.log('libs done')
ag.runQueue()
}
/*Opens DevTools window if you type "wcdev" in sequence.
This will crash the program if you are using multiple
DevTools, for example the chrome debugger in VS Code. */