From 2f7b37266035a14062111be45daf63a29da7a5db Mon Sep 17 00:00:00 2001 From: Ardian Date: Mon, 17 Jun 2024 22:47:17 +0200 Subject: [PATCH] feat: single binary --- electron/install.js | 2 +- operate/services/service.py | 6 +++--- tendermint.spec | 14 ++++---------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/electron/install.js b/electron/install.js index e1953a19f..2306808f1 100644 --- a/electron/install.js +++ b/electron/install.js @@ -23,7 +23,7 @@ const TempDir = `${OperateDirectory}/temp`; const VersionFile = `${OperateDirectory}/version.txt`; const LogFile = `${OperateDirectory}/logs.txt`; const OperateInstallationLog = `${os.homedir()}/operate.log`; -const OperateCmd = `${process.cwd()}/dist/pearl/pearl`; +const OperateCmd = `${process.cwd()}/dist/pearl`; const Env = { ...process.env, PATH: `${process.env.PATH}:/opt/homebrew/bin:/usr/local/bin`, diff --git a/operate/services/service.py b/operate/services/service.py index 023e08cc6..e9cefdca6 100644 --- a/operate/services/service.py +++ b/operate/services/service.py @@ -385,7 +385,7 @@ def _setup_agent(working_dir: Path) -> None: encoding="utf-8", ) - abin = os.getcwd() + '/dist/aea_bin/aea_bin' + abin = 'aea_bin' # Fetch agent _run_cmd( args=[ @@ -430,7 +430,7 @@ def _setup_agent(working_dir: Path) -> None: def _start_agent(working_dir: Path) -> None: """Start agent process.""" env = json.loads((working_dir / "agent.json").read_text(encoding="utf-8")) - aea_bin = os.getcwd() + '/dist/aea_bin/aea_bin' + aea_bin = 'aea_bin' process = subprocess.Popen( # pylint: disable=consider-using-with # nosec args=[aea_bin, "run"], cwd=working_dir / "agent", @@ -450,7 +450,7 @@ def _start_agent(working_dir: Path) -> None: def _start_tendermint(working_dir: Path) -> None: """Start tendermint process.""" env = json.loads((working_dir / "tendermint.json").read_text(encoding="utf-8")) - tendermint_com = os.getcwd() + "/dist/tendermint/tendermint" + tendermint_com = "tendermint" process = subprocess.Popen( # pylint: disable=consider-using-with # nosec args=[tendermint_com], cwd=working_dir, diff --git a/tendermint.spec b/tendermint.spec index 5d0c2477d..ee8b870ed 100644 --- a/tendermint.spec +++ b/tendermint.spec @@ -19,13 +19,16 @@ pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, + a.binaries, + a.datas, [], - exclude_binaries=True, name='tendermint', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, + upx_exclude=[], + runtime_tmpdir=None, console=True, disable_windowed_traceback=False, argv_emulation=False, @@ -33,12 +36,3 @@ exe = EXE( codesign_identity=None, entitlements_file=None, ) -coll = COLLECT( - exe, - a.binaries, - a.datas, - strip=False, - upx=True, - upx_exclude=[], - name='tendermint', -)