diff --git a/app/assets/WesterosCraft-1.11.2-user.json b/app/assets/WesterosCraft-1.11.2-user.json deleted file mode 100644 index 1665e9d9..00000000 --- a/app/assets/WesterosCraft-1.11.2-user.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "repositoryRoot": "/modstore", - "modRef": [ - "my.custom:mod:1.11.2", - "another.custom:mod:1.11.2" - ], - "parentList": "/mods/WesterosCraft-1.11.2.json" -} \ No newline at end of file diff --git a/app/assets/WesterosCraft-1.11.2.json b/app/assets/WesterosCraft-1.11.2.json deleted file mode 100644 index 93cc3926..00000000 --- a/app/assets/WesterosCraft-1.11.2.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "repositoryRoot": "C:\\Users\\Asus\\Desktop\\LauncherElectron\\mcfiles\\modstore", - "modRef": [ - "com.westeroscraft:westerosblocks:3.0.0-beta-71", - "mezz:jei:1.11.2-4.3.5.277", - "net.optifine:optifine:1.11.2_HD_U_B9", - "chatbubbles:chatbubbles:1.0.1_for_1.11.2" - ] -} \ No newline at end of file diff --git a/app/assets/js/launchprocess.js b/app/assets/js/launchprocess.js deleted file mode 100644 index 11bc0497..00000000 --- a/app/assets/js/launchprocess.js +++ /dev/null @@ -1,222 +0,0 @@ -/** - * File is officially deprecated in favor of processbuilder.js, - * will be removed once the new module is 100% complete and this - * is no longer needed for reference. - */ -const mojang = require('mojang') -const uuidV4 = require('uuid/v4') -const path = require('path') -const child_process = require('child_process') -const ag = require('./assetguard.js') -const AdmZip = require('adm-zip') -const fs = require('fs') -const mkpath = require('mkdirp'); - -function launchMinecraft(versionData, forgeData, basePath){ - const authPromise = mojang.auth('email', 'pass', uuidV4(), { - name: 'Minecraft', - version: 1 - }) - authPromise.then(function(data){ - console.log(data) - const args = finalizeArgumentsForge(versionData, forgeData, data, basePath) - //BRUTEFORCE for testing - //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') - //TODO make this dynamic - const child = child_process.spawn('C:\\Program Files\\Java\\jdk1.8.0_152\\bin\\javaw.exe', args) - child.stdout.on('data', (data) => { - console.log('Minecraft:', data.toString('utf8')) - }) - child.stderr.on('data', (data) => { - console.log('Minecraft:', data.toString('utf8')) - }) - child.on('close', (code, signal) => { - console.log('Exited with code', code) - }) - }) -} - -function finalizeArgumentsForge(versionData, forgeData, authData, basePath){ - const mcArgs = forgeData['minecraftArguments'] - const gameProfile = authData['selectedProfile'] - const regex = new RegExp('\\${*(.*)}') - const argArr = mcArgs.split(' ') - const staticArgs = ['-Xmx4G', - '-XX:+UseConcMarkSweepGC', - '-XX:+CMSIncrementalMode', - '-XX:-UseAdaptiveSizePolicy', - '-Xmn128M', - '-Djava.library.path=' + path.join(basePath, 'natives'), - '-cp', - classpathArg(versionData, basePath).concat(forgeClasspathArg(forgeData, basePath)).join(';'), - forgeData.mainClass] - for(let i=0; i -1){ - shouldExclude = true - } - }) - - if(!shouldExclude){ - mkpath.sync(path.join(nativePath, fileName, '..')) - fs.writeFile(path.join(nativePath, fileName), zipEntries[i].getData()) - } - - } - - cpArgs.push(to) - } - } - }) - - //BRUTEFORCE LIB INJECTION - //FOR TESTING ONLY - cpArgs.push(path.join(libPath, 'com', 'mumfrey', 'liteloader', '1.11.2-SNAPSHOT', 'liteloader-1.11.2-SNAPSHOT.jar')) - - return cpArgs -} - -module.exports = { - launchMinecraft -} \ No newline at end of file