From f8b500678667e5930b4c54850ff4bcf7fbd241cd Mon Sep 17 00:00:00 2001 From: BrOakes Date: Sat, 21 Dec 2019 18:06:24 -0500 Subject: [PATCH] this might do something? --- util/downloadpython.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/util/downloadpython.js b/util/downloadpython.js index 85ef1b2..c4c5a3f 100644 --- a/util/downloadpython.js +++ b/util/downloadpython.js @@ -72,6 +72,39 @@ async function download() { } break; } + case 'darwin': { + try { + let installerPath = path.join(__dirname, '..', 'Python-Installer/', filename); + let tempPath = path.join(__dirname, '..', 'Temp-Python/'); + let targetPath = path.join(__dirname, '..', 'Python/'); + execSync(`${installerPath} /passive DefaultJustForMeTargetDir=${tempPath}`, { + stdio: "inherit" + }); + + console.log("Creating Portable Python Directory"); + + copydir.sync(tempPath, targetPath); + console.log("Portable Directory Created!"); + + console.log("Uninstalling Unnecessary Python Files"); + + execSync(`${installerPath} /passive /uninstall`, { + stdio: 'inherit' + }); + + fs.rmdirSync(tempPath); + + console.log("PordaPy Installed!"); + } catch (err) { + console.log(err); + } + break; + } + // case 'darwin': { + // try { + + // } + // } } } @@ -102,6 +135,7 @@ function getPythonDownloadLink() { let current_download = body.substring(current_download_start, current_download_end); let url = current_download; + console.log(url) resolve(url); });