diff --git a/app/jinst/main.js b/app/jinst/main.js new file mode 100644 index 0000000..c782b19 --- /dev/null +++ b/app/jinst/main.js @@ -0,0 +1,232 @@ +//JINST App Installer v0.8 Alpha +//Created by computerguy. https://github.com/Ocean-OS/jinst +const { + app, + BrowserWindow, + Tray +} = require('electron'); +const fetch = require('node-fetch'); +const fs = require('fs'); +const path = require('path'); +app.setAsDefaultProtocolClient('jinst', process.execPath); +const nativeImage = require('electron').nativeImage; +let mainWindow; +function createWindow() { + const icon = nativeImage.createFromDataURL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABkAAAAZACAMAAAAW0n6VAAAACXBIWXMAAA7yAAAO8gHOFHveAAAAEXRFWHRUaXRsZQBQREYgQ3JlYXRvckFevCgAAAATdEVYdEF1dGhvcgBQREYgVG9vbHMgQUcbz3cwAAAALXpUWHREZXNjcmlwdGlvbgAACJnLKCkpsNLXLy8v1ytISdMtyc/PKdZLzs8FAG6fCPGXryy4AAAAUVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABcqRVCAAAAG3RSTlMANDtCS1RaYmlxe4aLlZujqrK6w8rQ3eHs8/4fbyNmAAAzQ0lEQVR42u3d6XYiR7aAUcQ8zyCo93/Q2227fe0qlYAgIzKGvf/3Wm0yOF+JEEeDAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzRtO5svlcj4beSkAeNZ8f/vx/+7HpYoA8NDi8uNXt40XBoDv7H78zmns1QHg5Xz813noFQLgC4v7jwe2XiQAfnH68djNdToA/za+/XjK0ksFwD/Mfjxr58UC4G+LH887erkA+Mv8xysOXjAA/jD98RqfYgHwhx+vcpMOwH9cXw7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AICgIAICICACAiAgAgIAAICgIAAICACAiAgAgK05fO836wW8/lkOp8v1tvD5S4gAgLwrftpPftygI0W24uACAjAl07Lj++n2HhzFRABAfj3jx6H6XOTbHEWEAEB+J/z7KVhdhMQAQH4j+3L42xyFBABAVp3XwUNtI+9gAgIIB9hDgIiIECzdm8NtWHdv9grIAC/cx29O9YWNX/DUEAAvnZfdjHYKr4KERCAL507mmzjan+nV0AAvrLubrbV+s1CAQH41W3c5XBbC4iAAI04dTzd6vwYS0AAfrbvfr59CoiAAPXbxhhwFX4lREAA/m0VZ8KdBERAgLrNY4246jabCAhAkn4MBrVt6BUQgPifX1X5hRABAfh/m7hTrq4/eCsgAH/bxx5zVf02r4AA/M8p/pyraTuvgAD85ZZgzs0ERECA+oxTDLqdgAgIUJt1mklXz1fSBQTgD6dUo66aaxABAfive7JRNxcQAQFqskw362r5PqGAAPzHNeWwExABAeoxSjnsNgIiIEAtdmmnXR1/oFBAABLeoNf0dUIBAYi7g7farYoCAnBPPu4mAiIggB9Amv0RREAAP4D0MO9quAUREKB52z4GXgV/GURAgOYZeAICEOLcz8QTEAEBSjfrZ+IdBURAgLLde5p4UwEREKBsh75GXvF/F0RAgMZN+hp5ewEREKBovY284r8KIiBA2479zTwBERCgZMv+Zl7pf5lQQIC2DfubeWsBERCgXPceZ17pK3kFBGjaqc+hJyACApRr3efQK3yhooAATZv1OfQK32YiIEDTDD0BASgvIIWvwxIQoGW3XofeUEAEBCjVqd+pJyACApRqLyACAhBi0+/UuwmIgACFWvU79a4CIiBAoRb9Tr2TgAgIUKh5v1Ov7G8SCgjQslm/U+8gIAICFGoqIAICICACAuAjLAERECBvPV+i+y0sAQFK1fOv8Zb9V9EFBGjZut+p54uEAgKUatvv1LsLiIAAhTpYpiggAAXOQC+egACluvc69MYCIiBAsXodenMBERCgWKM+h95GQAQEKFavXwQp+3uEAgK0bee3eAUEoLgh6LUTEKBgPc68mYAICFCwcX8zbycgAgIUbNPfzLsJiIAABbu6AhEQgCC9jbyl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ncPRSAEoyzC8jBQwEowD27fviTIABF2OcXEL/IC1CCSYYB8RkWQP4y/ARrMBh7LgDZ2+QYkMGnBwOQuyz7MVh5MACZO+cZEF8FAcjdJNOA+KMgAHn7HOTKswHI2jzbgOw8HAA/gPgRBKA2s4wDYqk7QL4ug5zdPCCAXA2zDsjEAwLI1G6Qt6NHBJCl2yB3nhFAlubZB2TpIQFk6DTInw+xAPJzG5TAb2IBZGdUREBGHhRAZlaDMrgGAcjLaVCKvYcFkJHroBwnjwsgG7dBSS4eGEAm7sOiAjK4emQAeRgNCvPpmQHkYDoojp9BAPp3nwwKdPbgAPrux3BQJEtNAPp1G5TK30gH6NN1UK6FxwfQm/2gZB9+GQugJ/NB4aw1AejDdVC++d1zBEhtO6iCH0IA0roMB5UY+VIhQDr3xaAiS59jASSyG1RmJSEACewHFVr6Y+kAkW0HlZpZjwUQz+dqULO1bxYCxHDfjwe1G639ThZAt2676aARs52IAHQUj8Ni0JjRYnuUEYBwn6fdcjxo2HA0mgDwguloNBoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABf+T8M8wwXEk1+vQAAAABJRU5ErkJggg=="); + const appIcon = new Tray(icon); + mainWindow = new BrowserWindow({ + width: 800, + height: 600, + autoHideMenuBar: true, + icon: icon, + webPreferences: { + preload: path.join(__dirname, 'preload.js'), + nodeIntegration: true, + contextIsolation: false, + } + }); + mainWindow.loadFile("index.html"); +} + +app.on('ready', function() { + createWindow(); + mainWindow.webContents.once('dom-ready', () => { + if (process.argv.length >= 2 && process.platform == "win32") { + if (fs.existsSync(process.argv[1])) { + mainWindow.loadFile(loadInstaller(process.argv[1])); + } else { + var q = path.join(app.getPath('temp'), 'jinstFiles', Date.now().toString() + '.jinst'); + async function loadFromWeb(p) { + fetch(decodeURIComponent(p.split("?url=")[1])) + .then(res=>res.text()) + .then(text => { + fs.writeFileSync(q, text); + mainWindow.loadFile(loadInstaller(q)); + }) + } + loadFromWeb(process.argv[1]); + } + } else { + mainWindow.loadFile("maker.html"); + } + }); +}); +app.on('window-all-closed', () => { + app.quit() +}); +app.on('will-finish-launching', () => { + app.on('open-file', (event, path) => { + createWindow(); + mainWindow.webContents.once('dom-ready', () => { + mainWindow.loadFile(loadInstaller(path)); + }); + }); +}); +const tempPath = path.join(app.getPath('temp').replaceAll("\\", "\\\\"), "jinst"); +var loadInstaller = function(filepath) { + var ready = false; + if (!fs.existsSync(tempPath)) { + fs.mkdirSync(tempPath); + } + var specs = { + arch: process.arch, + os: process.platform + }; + var fd = JSON.parse(fs.readFileSync(filepath, "utf8")); + var aR = fd.appResources[specs.os][specs.arch]; + if(path.parse(filepath).dir !== path.join(app.getPath('temp'), 'jinstFiles')){ + var aF = path.join(path.parse(filepath).dir, fd.appFolder).replaceAll("\\", "\\\\");} + else{ + if(fd.appFolder.includes(":")){ + var aF = fd.appFolder.replaceAll("\\", "\\\\"); + }else{ + var aF = path.join(app.getPath("downloads"), fd.appFolder).replaceAll("\\", "\\\\"); + } + } + var s = fd.appInstallerStyle; + var b = s.bg_color; + if (b.split("")[0] == "#") { + b = hexToRgb(b); + } else if ((b.split("")[0] + b.split("")[1] + b.split("")[2] + b.split("")[3]) == "rgb(") { + b.split("(")[b.split("(").length - 1].split(")")[0]; + if (b.includes(" ")) b.split(" ").join(""); + b.split(","); + b = { + r: b[0], + g: b[1], + b: b[2] + }; + }; + if (s.button_cc == "darker") { + b.r -= 20; + b.g -= 20; + b.b -= 20; + } else if (s.button_cc == "lighter") { + b.r += 20; + b.g += 20; + b.b += 20; + } + bh = rgbToHex(b.r + 5, b.g + 5, b.b + 5); + b = rgbToHex(b.r, b.g, b.b); + var style = ` + body{background-color:${s.bg_color};color:${s.color};font-family:'${s.font}';} + button{background-color:${b};color:${s.color};font-family:'${s.font}';border:none;outline:none;border-radius:5px;padding:5px;font-size:90%;} + button:hover{background-color:${bh};outline:none;} + progress::-webkit-progress-value{ + background-color: rgb(82, 183, 86); + } + progress::-webkit-progress-bar{ + background-color: ${b}; + border-radius: 0px; + } + progress{ + width: 100%; + color: white; + border-radius: 0px; + }`; + var script = ` + const fs = require('fs'); + const path = require('path'); + var state = ""; + var increase; + var progress = 0; + function setProgress(){ + document.getElementById("progressbar").value = progress; + document.getElementById("progressState").innerText = state; + } + const AdmZip = require("${path.join(path.join(__dirname, "adm-zip-0.5.10", "package"),"adm-zip.js").replaceAll("\\", "\\\\")}"); +function extractZipFile(zipFilePath, outputDir) { + var zip = new AdmZip(zipFilePath); + zip.extractAllTo(outputDir); +} + async function install(){ + if(${aR.available} == true){ + document.getElementById('install').hidden = true; + document.getElementById("progress").hidden = false; + state = "Fetching resources..."; + progress = 10; + setProgress(); + var res = await fetch('${aR.resourceUrl}'); + var file = await res.arrayBuffer(); + file = Buffer.from(file); + fs.writeFileSync('${path.join(tempPath, fd.appName,aR.resourceUrl.split("/")[aR.resourceUrl.split("/").length-1]).replaceAll("\\", "\\\\")}',file); + state = "Saving files to temporary folder..."; + progress = 30; + setProgress(); + if('${aR.fileType}' == 'jsar'){ + state = "Extracting files..."; + progress = 40; + setProgress(); + var inpt = JSON.parse(fs.readFileSync('${path.join(tempPath, fd.appFolder,aR.resourceUrl.split("/")[aR.resourceUrl.split("/").length-1]).replaceAll("\\", "\\\\")}', 'utf-8')); + var fp = '${aF}'; + if(!fs.existsSync('${aF}')){ + fs.mkdirSync('${aF}'); + }; + var files = inpt.files; + var encoder = inpt.encoder; + var d = inpt.dirs; + state = "Making folders..."; + progress = 50; + setProgress(); + increase = 30/d.length; + for(var l = 0; l< d.length; l++){ + if(!fs.existsSync(path.join(fp,d[l].name))){ + fs.mkdirSync(path.join(fp, d[l].name)); + } + for(var f = 0; f${fd.appName} Installer

Install ${fd.appName}

App Details

Author: ${fd.appAuthor}
   `; + if (!fs.existsSync(path.join(tempPath, fd.appName).replaceAll("\\", "\\\\"))) { + fs.mkdirSync(path.join(tempPath, fd.appName).replaceAll("\\", "\\\\")); + } + fs.writeFileSync(path.join(tempPath, fd.appName, "index.html"), createPage); + return ((path.join(tempPath, fd.appName, "index.html"))); +}; + +function hexToRgb(hex) { + var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null; +}; + +function rgbToHex(r, g, b) { + return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); +}; + +function componentToHex(c) { + var hex = c.toString(16); + return hex.length == 1 ? "0" + hex : hex; +};