From 6923fa271fb7bb475856e57b1fcdc13131ce0e5a Mon Sep 17 00:00:00 2001 From: doylet Date: Wed, 10 Jan 2024 11:03:30 +1100 Subject: [PATCH] Add python on Linux by mandating zstd --- app_manifest_dev.py | 45 ++++++++++++++++++------------------- devenver.py | 6 ++++- neovide_backtraces.log.rsls | 0 3 files changed, 27 insertions(+), 24 deletions(-) delete mode 100644 neovide_backtraces.log.rsls diff --git a/app_manifest_dev.py b/app_manifest_dev.py index 17b3db0..8417950 100644 --- a/app_manifest_dev.py +++ b/app_manifest_dev.py @@ -888,31 +888,30 @@ def get_manifest(is_windows): else: download_url = f"https://github.com/indygreg/python-build-standalone/releases/download/{date}/cpython-{version}-x86_64_v2-unknown-linux-gnu-pgo+lto-full.tar.zst" download_checksum = "49f4a8c02efff2debbb258973b1f6efbd568e4be2e5dca07c7dcd754a7bff9cf" - checksum = "none" - exe_path = "bin/python" + checksum = "ee96234460ff4c5163dc0681dbfaf8cf5f4e65972fde796da7b0ee0d5ce077d5" + exe_path = "install/bin/python3" # TODO: Get ZST somehow on linux - if is_windows: - result.append({ - "label": label, - "manifests": [ - { - "download_checksum": download_checksum, - "download_url": download_url, - "version": version, - "unzip_method": 'default', - "executables": [ - { - "path": exe_path, - "symlink": [], - "add_to_devenv_path": True, - "checksum": checksum, - } - ], - "add_to_devenv_script": add_to_devenv_script, - } - ], - }) + result.append({ + "label": label, + "manifests": [ + { + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, + "unzip_method": 'default', + "executables": [ + { + "path": exe_path, + "symlink": [], + "add_to_devenv_path": True, + "checksum": checksum, + } + ], + "add_to_devenv_script": add_to_devenv_script, + } + ], + }) # -------------------------------------------------------------------------- diff --git a/devenver.py b/devenver.py index a9122b9..53b87f9 100644 --- a/devenver.py +++ b/devenver.py @@ -520,6 +520,10 @@ def install_app_list(app_list, download_dir, install_dir, is_windows): validate_app_list_result = validate_app_list(app_list) app_index = 0 + global zstd_exe + if not is_windows: + zstd_exe = "/usr/bin/zstd" + for app in app_list: manifest_list = app['manifests'] for manifest in manifest_list: @@ -552,7 +556,6 @@ def install_app_list(app_list, download_dir, install_dir, is_windows): if app_list is internal_app_list: global zip7_exe global zip7_bootstrap_exe - global zstd_exe exe_path = get_exe_install_path(install_dir, label, version, manifest['executables'][0]['path']) if label == '7zip': if is_windows or os.name == 'nt': @@ -804,6 +807,7 @@ def run(user_app_list, devenv_script_buffer += f"export devenver_root=\"$( cd -- $( dirname -- \"${{BASH_SOURCE[0]}}\" ) &> /dev/null && pwd )\"\n" devenv_script_buffer += f"PATH=\"$( cd -- $( dirname -- \"${{BASH_SOURCE[0]}}\" ) &> /dev/null && pwd )/Scripts\":$PATH\n" devenv_script_buffer += f"PATH=\"$( cd -- $( dirname -- \"${{BASH_SOURCE[0]}}\" ) &> /dev/null && pwd )/Symlinks\":$PATH\n" + devenv_script_buffer += f"PATH=$(echo $PATH | awk -v RS=: -v ORS=: '/^\/mnt\/c/ {{next}} {{print}}')" devenv_script_name = f"{devenv_script_name}.bat" if is_windows else f"{devenv_script_name}.sh" devenv_script_path = pathlib.Path(install_dir, devenv_script_name) diff --git a/neovide_backtraces.log.rsls b/neovide_backtraces.log.rsls deleted file mode 100644 index e69de29..0000000