From 17fce783b3ec5dbd52a3f0daa02709529c9adb01 Mon Sep 17 00:00:00 2001 From: Ardian Date: Tue, 18 Jun 2024 19:38:41 +0200 Subject: [PATCH] fix: add setup --- electron/install.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/electron/install.js b/electron/install.js index 5cff51cc..b2444409 100644 --- a/electron/install.js +++ b/electron/install.js @@ -336,7 +336,7 @@ function removeInstallationLogFile() { /*******************************/ async function setupDarwin(ipcChannel) { - // removeInstallationLogFile(); + removeInstallationLogFile(); // console.log(appendLog('Checking brew installation')); // if (!isBrewInstalled()) { // ipcChannel.send('response', 'Installing Pearl Daemon'); @@ -351,16 +351,16 @@ async function setupDarwin(ipcChannel) { // installPythonDarwin(); // } // - // console.log(appendLog('Creating required directories')); - // await createDirectory(`${OperateDirectory}`); - // await createDirectory(`${OperateDirectory}/temp`); - // - // console.log(appendLog('Checking tendermint installation')); - // if (!isTendermintInstalledUnix()) { - // ipcChannel.send('response', 'Installing Pearl Daemon'); - // console.log(appendLog('Installing tendermint')); - // await installTendermintUnix(); - // } + console.log(appendLog('Creating required directories')); + await createDirectory(`${OperateDirectory}`); + await createDirectory(`${OperateDirectory}/temp`); + + console.log(appendLog('Checking tendermint installation')); + if (!isTendermintInstalledUnix()) { + ipcChannel.send('response', 'Installing Pearl Daemon'); + console.log(appendLog('Installing tendermint')); + await installTendermintUnix(); + } // // if (!fs.existsSync(VenvDir)) { // ipcChannel.send('response', 'Installing Pearl Daemon'); @@ -371,15 +371,15 @@ async function setupDarwin(ipcChannel) { // installOperatePackageUnix(OperateDirectory); // } // - // console.log(appendLog('Checking if upgrade is required')); - // if (versionBumpRequired()) { - // console.log( - // appendLog(`Upgrading pearl daemon to ${OlasMiddlewareVersion}`), - // ); - // reInstallOperatePackageUnix(OperateDirectory); - // writeVersion(); - // removeLogFile(); - // } + console.log(appendLog('Checking if upgrade is required')); + if (versionBumpRequired()) { + console.log( + appendLog(`Upgrading pearl daemon to ${OlasMiddlewareVersion}`), + ); + reInstallOperatePackageUnix(OperateDirectory); + writeVersion(); + removeLogFile(); + } // // if (!fs.existsSync(`${OperateDirectory}/venv/bin/operate`)) { // reInstallOperatePackageUnix(OperateDirectory);