From acc5d57340c4b63214703ba6f35e36b27e5230e8 Mon Sep 17 00:00:00 2001 From: doyle Date: Wed, 8 Feb 2023 00:35:07 +1100 Subject: [PATCH] Begin adding linux installation --- devenver.py | 197 ++--- win_app_manifest_dev.py | 1713 ++++++++++++++++++++++++-------------- win_app_manifest_user.py | 84 +- win_install.py | 389 +++++---- 4 files changed, 1437 insertions(+), 946 deletions(-) diff --git a/devenver.py b/devenver.py index 2106cc6..6d13879 100644 --- a/devenver.py +++ b/devenver.py @@ -24,74 +24,6 @@ from enum import Enum # Internal # ------------------------------------------------------------------------------ DOWNLOAD_CHUNK_SIZE = 1 * 1024 * 1024 # 1 megabyte -IS_WINDOWS = os.name == "nt" - -# ------------------------------------------------------------------------------ -# This app list must always be installed, they provide the tools to install all -# other archives. Upon installation, we will collect the installation executable -# path and store them in global variables for the rest of the progam to use to -# unzip the files. -internal_app_list = [] - -internal_app_list.append({ - 'label': '7zip', - 'manifests': [], -}) - -version = "920" -internal_app_list[-1]['manifests'].append({ # Download the bootstrap 7zip, this can be unzipped using shutils - 'download_checksum': '2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac', - 'download_url': f'https://www.7-zip.org/a/7za{version}.zip', - 'version': version, - 'executables': [ - { - 'path': '7za.exe', - 'symlink': [], - 'add_to_devenv_path': False, - 'checksum': 'c136b1467d669a725478a6110ebaaab3cb88a3d389dfa688e06173c066b76fcf' - } - ], - 'add_to_devenv_script': [], -}) - -version = "2201" -internal_app_list[-1]['manifests'].append({ # Download proper 7zip, extract this exe with the bootstrap 7zip - 'download_checksum': 'b055fee85472921575071464a97a79540e489c1c3a14b9bdfbdbab60e17f36e4', - 'download_url': f'https://www.7-zip.org/a/7z{version}-x64.exe', - 'version': version, - 'executables': [ - { - 'path': '7z.exe', - 'symlink': [], - 'add_to_devenv_path': True, - 'checksum': '254cf6411d38903b2440819f7e0a847f0cfee7f8096cfad9e90fea62f42b0c23' - } - ], - 'add_to_devenv_script': [], -}) - -# ------------------------------------------------------------------------------ - -version = "1.5.2" -internal_app_list.append({ - "label": "zstd", - "manifests": [ - { - "download_checksum": "68897cd037ee5e44c6d36b4dbbd04f1cc4202f9037415a3251951b953a257a09", - "download_url": f"https://github.com/facebook/zstd/releases/download/v{version}/zstd-v{version}-win64.zip", - "version": version, - "executables": [ - { - "path": "zstd.exe", - "symlink": [], - "add_to_devenv_path": True, - "checksum": "f14e78c0651851a670f508561d2c5d647da0ba08e6b73231f2e7539812bae311", - }, - ], - "add_to_devenv_script": [], - }, - ], -}) # ------------------------------------------------------------------------------ @@ -101,7 +33,6 @@ zstd_exe = "" zip7_exe = "" zip7_bootstrap_exe = "" - # Functions # ------------------------------------------------------------------------------ def print_header(title): @@ -216,7 +147,8 @@ def download_and_install_archive(download_url, label, unzip_method, download_dir, - install_dir): + install_dir, + is_windows): exe_install_dir = get_exe_install_dir(install_dir=install_dir, label=label, @@ -321,7 +253,7 @@ def download_and_install_archive(download_url, # We call this an intermediate zip file, we will extract that file # with 7zip. After we're done, we will delete that _intermediate_ # file to cleanup our install directory. - if archive_path.suffix == '.zst' or archive_path.suffix == '.xz': + if archive_path.suffix == '.zst' or archive_path.suffix == '.xz' or archive_path.suffix == '.gz': archive_without_suffix = pathlib.Path(str(archive_path)[:-len(archive_path.suffix)]).name next_archive_path = pathlib.Path(exe_install_dir, archive_without_suffix) @@ -445,7 +377,7 @@ def download_and_install_archive(download_url, if os.path.exists(symlink_dest): # Windows uses hardlinks because symlinks require you to enable "developer" mode # Everyone else uses symlinks - if (IS_WINDOWS and not os.path.isfile(symlink_dest)) or (not IS_WINDOWS and not os.path.islink(symlink_dest)): + if (is_windows and not os.path.isfile(symlink_dest)) or (not is_windows and not os.path.islink(symlink_dest)): lprint( "- Cannot create symlink! The destination file to create the symlink at.", level=1) lprint( " already exists and is *not* a link. We cannot remove this safely as we", level=1) lprint( " don't know what it is, exiting.", level=1) @@ -458,7 +390,7 @@ def download_and_install_archive(download_url, os.unlink(symlink_dest) if not skip_link: - if IS_WINDOWS == True: + if is_windows == True: os.link(src=symlink_src, dst=symlink_dest) else: os.symlink(src=symlink_src, dst=symlink_dest) @@ -471,7 +403,7 @@ def download_and_install_archive(download_url, global devenv_script_buffer for path in paths_to_add_to_devenv_script: - if IS_WINDOWS: + if is_windows: devenv_script_buffer += f"set PATH=%~dp0{path};%PATH%\n" else: devenv_script_buffer += f"PATH=$( cd -- \"$( dirname -- \"${BASH_SOURCE[0]}\" ) &> /dev/null && pwd ){path}\";%PATH%\n" @@ -547,8 +479,10 @@ def validate_app_list(app_list): return result +internal_app_list = [] devenv_script_buffer = "" -def install_app_list(app_list, download_dir, install_dir): + +def install_app_list(app_list, download_dir, install_dir, is_windows): title = "Internal Apps" if app_list is internal_app_list else "User Apps" print_header(title) result = {} @@ -573,22 +507,24 @@ def install_app_list(app_list, download_dir, install_dir): # Bootstrapping code, when installing the internal app list, we will # assign the variables to point to our unarchiving tools. # ------------------------------------------------------------------ - 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 version == '920': - unzip_method = UnzipMethod.SHUTILS - zip7_bootstrap_exe = exe_path - else: - unzip_method = UnzipMethod.ZIP7_BOOTSTRAP - zip7_exe = exe_path - - if label == 'zstd': - zstd_exe = exe_path + if 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 version == '920': + unzip_method = UnzipMethod.SHUTILS + zip7_bootstrap_exe = exe_path + else: + unzip_method = UnzipMethod.ZIP7_BOOTSTRAP + zip7_exe = exe_path + if label == 'zstd': + zstd_exe = exe_path + else: + unzip_method = UnzipMethod.SHUTILS # Download and install # ------------------------------------------------------------------ @@ -600,7 +536,8 @@ def install_app_list(app_list, download_dir, install_dir): label=label, unzip_method=unzip_method, download_dir=download_dir, - install_dir=install_dir) + install_dir=install_dir, + is_windows=is_windows) # Post-installation # ------------------------------------------------------------------ @@ -645,6 +582,7 @@ base_install_dir = default_base_install_dir def run(user_app_list, devenv_script_name, + is_windows, download_dir=base_downloads_dir, install_dir=base_install_dir): """ Download and install the given user app list at the specified @@ -668,6 +606,75 @@ def run(user_app_list, base_downloads_dir = download_dir base_install_dir = install_dir + # -------------------------------------------------------------------------- + # This app list must always be installed, they provide the tools to install all + # other archives. Upon installation, we will collect the installation executable + # path and store them in global variables for the rest of the progam to use to + # unzip the files. + global internal_app_list + internal_app_list = [] + + if is_windows: + internal_app_list.append({ + 'label': '7zip', + 'manifests': [], + }) + + version = "920" + internal_app_list[-1]['manifests'].append({ # Download the bootstrap 7zip, this can be unzipped using shutils + 'download_checksum': '2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac', + 'download_url': f'https://www.7-zip.org/a/7za{version}.zip', + 'version': version, + 'executables': [ + { + 'path': '7za.exe', + 'symlink': [], + 'add_to_devenv_path': False, + 'checksum': 'c136b1467d669a725478a6110ebaaab3cb88a3d389dfa688e06173c066b76fcf' + } + ], + 'add_to_devenv_script': [], + }) + + version = "2201" + internal_app_list[-1]['manifests'].append({ # Download proper 7zip, extract this exe with the bootstrap 7zip + 'download_checksum': 'b055fee85472921575071464a97a79540e489c1c3a14b9bdfbdbab60e17f36e4', + 'download_url': f'https://www.7-zip.org/a/7z{version}-x64.exe', + 'version': version, + 'executables': [ + { + 'path': '7z.exe', + 'symlink': [], + 'add_to_devenv_path': True, + 'checksum': '254cf6411d38903b2440819f7e0a847f0cfee7f8096cfad9e90fea62f42b0c23' + } + ], + 'add_to_devenv_script': [], + }) + + # ------------------------------------------------------------------------------ + + version = "1.5.2" + internal_app_list.append({ + "label": "zstd", + "manifests": [ + { + "download_checksum": "68897cd037ee5e44c6d36b4dbbd04f1cc4202f9037415a3251951b953a257a09", + "download_url": f"https://github.com/facebook/zstd/releases/download/v{version}/zstd-v{version}-win64.zip", + "version": version, + "executables": [ + { + "path": "zstd.exe", + "symlink": [], + "add_to_devenv_path": True, + "checksum": "f14e78c0651851a670f508561d2c5d647da0ba08e6b73231f2e7539812bae311", + }, + ], + "add_to_devenv_script": [], + }, + ], + }) + # Run # -------------------------------------------------------------------------- # Create the starting directories and install the internal app list (e.g. @@ -705,16 +712,18 @@ def run(user_app_list, # Install apps internal_apps = install_app_list(app_list=internal_app_list, download_dir=download_dir, - install_dir=install_dir) + install_dir=install_dir, + is_windows=is_windows) user_apps = install_app_list(app_list=user_app_list, download_dir=download_dir, - install_dir=install_dir) + install_dir=install_dir, + is_windows=is_windows) # Write the devenv script with environment variables devenv_script_buffer += "set PATH=%~dp0Symlinks;%PATH%\n" - devenv_script_name = f"{devenv_script_name}.bat" if IS_WINDOWS else f"{devenv_script_name}dev_env.sh" + devenv_script_name = f"{devenv_script_name}.bat" if is_windows else f"{devenv_script_name}dev_env.sh" devenv_script_path = pathlib.Path(install_dir, devenv_script_name) lprint(f"Writing script to augment the environment with installed applications: {devenv_script_path}") with open(devenv_script_path, 'w') as file: diff --git a/win_app_manifest_dev.py b/win_app_manifest_dev.py index 1d24f8a..aa7a51a 100644 --- a/win_app_manifest_dev.py +++ b/win_app_manifest_dev.py @@ -1,22 +1,39 @@ -def get_manifest(): +def get_manifest(is_windows): result = [] # -------------------------------------------------------------------------- - version = "20221119-145034-49b9839f" + version = "20221119-145034-49b9839f" + download_url = "" + exe_name = "" + download_checksum = "" + checksum = "" + symlink = [] + + if is_windows: + exe_path = f"wezterm-gui.exe" + download_url = f"https://github.com/wez/wezterm/releases/download/{version}/WezTerm-windows-{version}.zip" + download_checksum = "7041d2c02d226c0c051cc9f6373d51ac9a2de00025e18582077c76e8ad68abe1" + checksum = "e3faa247d69a8a966302a2ab4e655b08b79548707db79a7b724cf18cccf5ae35" + else: + exe_path = f"WezTerm-{version}-Ubuntu18.04.AppImage" + download_url = f"https://github.com/wez/wezterm/releases/download/{version}/{exe_path}" + download_checksum = "7041d2c02d226c0c051cc9f6373d51ac9a2de00025e18582077c76e8ad68abe1" + checksum = "none" + result.append({ "label": "WezTerm", "manifests": [ { "version": version, - "download_checksum": "7041d2c02d226c0c051cc9f6373d51ac9a2de00025e18582077c76e8ad68abe1", - "download_url": f"https://github.com/wez/wezterm/releases/download/{version}/WezTerm-windows-{version}.zip", + "download_checksum": download_checksum, + "download_url": download_url, "executables": [ { - "path": "wezterm-gui.exe", - "symlink": [], + "path": exe_path, + "symlink": symlink, "add_to_devenv_path": True, - "checksum": "e3faa247d69a8a966302a2ab4e655b08b79548707db79a7b724cf18cccf5ae35", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -54,33 +71,60 @@ def get_manifest(): "manifests": [], }) - version = "3.23.4" + version = "3.23.4" + download_url = "" + exe_path = "" + download_checksum = "" + checksum = "" + symlink = [] + + if is_windows: + exe_path = f"bin/cmake.exe" + download_url = f"https://github.com/Kitware/CMake/releases/download/v{version}/cmake-{version}-windows-x86_64.zip" + download_checksum = "df15113aaab9e5f8cac254e02cf23f70d02407c9bf2983c82a9fe0d35bd20682" + checksum = "426074cd812586551fbab2bde67377113e2085c78c2e9a887748e85b4dc3dda5" + else: + exe_path = f"bin/cmake" + download_url = f"https://github.com/Kitware/CMake/releases/download/v{version}/cmake-{version}-linux-x86_64.tar.gz", + download_checksum = "none" + checksum = "none" + result[-1]['manifests'].append({ - "download_checksum": "df15113aaab9e5f8cac254e02cf23f70d02407c9bf2983c82a9fe0d35bd20682", - "download_url": f"https://github.com/Kitware/CMake/releases/download/v{version}/cmake-{version}-windows-x86_64.zip", - "version": "3.23.4", + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, "executables": [ { - "path": "bin/cmake.exe", - "symlink": [], + "path": exe_path, + "symlink": symlink, "add_to_devenv_path": True, - "checksum": "426074cd812586551fbab2bde67377113e2085c78c2e9a887748e85b4dc3dda5", + "checksum": checksum, } ], "add_to_devenv_script": [], }) version = "3.10.3" + + if is_windows: + download_url = f"https://github.com/Kitware/CMake/releases/download/v{version}/cmake-{version}-win64-x86_64.zip" + download_checksum = "3bd57d1cfcf720a4cc72db77bda4c76a7b700fb0341821ad868963ad28856cd0" + checksum = "f2e3b486d87d2a6bc19b3a62c740028f3f8945875196ac7d3d0e69649e98730a" + else: + download_url = f"https://github.com/Kitware/CMake/releases/download/v{version}/cmake-{version}-Linux-x86_64.tar.gz", + download_checksum = "none" + checksum = "none" + result[-1]['manifests'].append({ - "download_checksum": "3bd57d1cfcf720a4cc72db77bda4c76a7b700fb0341821ad868963ad28856cd0", - "download_url": f"https://github.com/Kitware/CMake/releases/download/v{version}/cmake-{version}-win64-x64.zip", + "download_checksum": download_checksum, + "download_url": download_url, "version": version, "executables": [ { - "path": "bin/cmake.exe", - "symlink": [], + "path": exe_path, + "symlink": symlink, "add_to_devenv_path": False, - "checksum": "f2e3b486d87d2a6bc19b3a62c740028f3f8945875196ac7d3d0e69649e98730a", + "checksum": checksum } ], "add_to_devenv_script": [], @@ -88,20 +132,39 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "1.9.4" + version = "1.9.4" + download_url = "" + exe_path = "" + download_checksum = "" + checksum = "" + symlink = [] + + if is_windows: + exe_path = f"doxygen.exe" + download_url = f"https://github.com/doxygen/doxygen/releases/download/Release_{version.replace('.', '_')}/doxygen-{version}.windows.x64.bin.zip", + download_checksum = "3b34098c5fb016baa1d29aba101fe9d6843213b966b92a6b12c8856c547ee0c4" + checksum = "3cb4d89f2b3db7eec2b6797dc6b49cdfe9adda954575898895260f66f312d730" + symlink = [f"doxygen-{version}.exe"] + else: + exe_path = f"doxygen" + download_url = f"https://github.com/doxygen/doxygen/releases/download/Release_{version.replace('.', '_')}/doxygen-{version}.linux.bin.tar.gz", + download_checksum = "none" + checksum = "none" + symlink = [f"doxygen-{version}"] + result.append({ "label": "Doxygen", "manifests": [ { - "download_checksum": "3b34098c5fb016baa1d29aba101fe9d6843213b966b92a6b12c8856c547ee0c4", - "download_url": f"https://github.com/doxygen/doxygen/releases/download/Release_{version.replace('.', '_')}/doxygen-{version}.windows.x64.bin.zip", + "download_checksum": download_checksum, + "download_url": download_url, "version": version, "executables": [ { - "path": "doxygen.exe", - "symlink": [f"doxygen-{version}.exe"], + "path": exe_path, + "symlink": symlink, "add_to_devenv_path": True, - "checksum": "3cb4d89f2b3db7eec2b6797dc6b49cdfe9adda954575898895260f66f312d730", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -111,254 +174,258 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "2.39.1" - label = "Git" - result.append({ - "label": f"{label}", - "manifests": [ - { - "download_checksum": "b898306a44084b5fa13b9a52e06408d97234389d07ae41d9409bdf58cad3d227", - "download_url": f"https://github.com/git-for-windows/git/releases/download/v{version}.windows.1/PortableGit-{version}-64-bit.7z.exe", - "version": version, - "executables": [ - { - "path": "cmd/git.exe", - "symlink": [], - "add_to_devenv_path": True, - "checksum": "2fc6d5be237efb6b429d8f40975f1a1cfe3bcac863d9335e24096c8b0ec38105", - } - ], - "add_to_devenv_script": [ - f"set PATH=%~dp0{label}\\{version}\\mingw64\\bin;%PATH%", - f"set PATH=%~dp0{label}\\{version}\\usr\\bin;%PATH%", - ], - } - ], - }) + if is_windows: + label = "Git" + version = "2.39.1" + result.append({ + "label": f"{label}", + "manifests": [ + { + "download_checksum": "b898306a44084b5fa13b9a52e06408d97234389d07ae41d9409bdf58cad3d227", + "download_url": f"https://github.com/git-for-windows/git/releases/download/v{version}.windows.1/PortableGit-{version}-64-bit.7z.exe", + "version": version, + "executables": [ + { + "path": "cmd/git.exe", + "symlink": [], + "add_to_devenv_path": True, + "checksum": "2fc6d5be237efb6b429d8f40975f1a1cfe3bcac863d9335e24096c8b0ec38105", + } + ], + "add_to_devenv_script": [ + f"set PATH=%~dp0{label}\\{version}\\mingw64\\bin;%PATH%", + f"set PATH=%~dp0{label}\\{version}\\usr\\bin;%PATH%", + ], + } + ], + }) # -------------------------------------------------------------------------- - result.append({ - "label": "GCC_MinGW_AArch64", - "manifests": [], - }) + if is_windows: + result.append({ + "label": "GCC_MinGW_AArch64", + "manifests": [], + }) - arch = "aarch64-none-elf" - version = "12.2.0" + arch = "aarch64-none-elf" + version = "12.2.0" - result[-1]['manifests'].append({ - "download_checksum": "729e8af6aecd85cce63435b94c310c01983091b5db54842cd6604298f29d047f", - "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", - "version": version, - "executables": [ - { - "path": f"bin/{arch}-g++.exe", - "checksum": "a26baffa86bc3401790d682f13f9b321ea56153eae7dd4f332bde40a6b76fcb3", - "symlink": [f"{arch}-g++-{version}.exe"], - "add_to_devenv_path": True, - }, - { - "path": f"bin/{arch}-gcc.exe", - "checksum": "0f594c7e741207f1613aa958369b12fab781741718688710b7082cac172fadf5", - "symlink": [f"{arch}-gcc-{version}.exe"], - "add_to_devenv_path": True, - }, - ], - "add_to_devenv_script": [], - }) + result[-1]['manifests'].append({ + "download_checksum": "729e8af6aecd85cce63435b94c310c01983091b5db54842cd6604298f29d047f", + "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", + "version": version, + "executables": [ + { + "path": f"bin/{arch}-g++.exe", + "checksum": "a26baffa86bc3401790d682f13f9b321ea56153eae7dd4f332bde40a6b76fcb3", + "symlink": [f"{arch}-g++-{version}.exe"], + "add_to_devenv_path": True, + }, + { + "path": f"bin/{arch}-gcc.exe", + "checksum": "0f594c7e741207f1613aa958369b12fab781741718688710b7082cac172fadf5", + "symlink": [f"{arch}-gcc-{version}.exe"], + "add_to_devenv_path": True, + }, + ], + "add_to_devenv_script": [], + }) - version = "11.3.0" - result[-1]['manifests'].append({ - "download_checksum": "a000bdeeb225145a1450c1b9b1094ef71c13fc4de2ab300a65acbf51cd107c7d", - "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", - "version": version, - "executables": [ - { - "path": f"bin/{arch}-g++.exe", - "checksum": "47eaef0e603c9fcae18f2efada305888503e878053119ede3a9e0b8b8beac2ee", - "symlink": [f"{arch}-g++-{version}.exe"], - "add_to_devenv_path": False, - }, - { - "path": f"bin/{arch}-gcc.exe", - "checksum": "205d0b05d64bc80908deb5a64e5f3bf8769cfc08b272835f97aaeaec13ccd533", - "symlink": [f"{arch}-gcc-{version}.exe"], - "add_to_devenv_path": False, - }, - ], - "add_to_devenv_script": [], - }) + version = "11.3.0" + result[-1]['manifests'].append({ + "download_checksum": "a000bdeeb225145a1450c1b9b1094ef71c13fc4de2ab300a65acbf51cd107c7d", + "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", + "version": version, + "executables": [ + { + "path": f"bin/{arch}-g++.exe", + "checksum": "47eaef0e603c9fcae18f2efada305888503e878053119ede3a9e0b8b8beac2ee", + "symlink": [f"{arch}-g++-{version}.exe"], + "add_to_devenv_path": False, + }, + { + "path": f"bin/{arch}-gcc.exe", + "checksum": "205d0b05d64bc80908deb5a64e5f3bf8769cfc08b272835f97aaeaec13ccd533", + "symlink": [f"{arch}-gcc-{version}.exe"], + "add_to_devenv_path": False, + }, + ], + "add_to_devenv_script": [], + }) - version = "10.3.0" - result[-1]['manifests'].append({ - "download_checksum": "095ab5a12059fa5dc59f415c059eb577f443a766eb1dd312fbede0f59940f432", - "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", - "version": version, - "executables": [ - { - "path": f"bin/{arch}-g++.exe", - "checksum": "f2b2d3c6dab0f84a151835540f25e6d6f9442d00bf546bc4c709fad4b6fdda06", - "symlink": [f"{arch}-g++-{version}.exe"], - "add_to_devenv_path": False, - }, - { - "path": f"bin/{arch}-gcc.exe", - "checksum": "95a8478ecb5133029f3058fb0207f19ee00157a6dd81f220e8308305f0e25fe8", - "symlink": [f"{arch}-gcc-{version}.exe"], - "add_to_devenv_path": False, - }, - ], - "add_to_devenv_script": [], - }) + version = "10.3.0" + result[-1]['manifests'].append({ + "download_checksum": "095ab5a12059fa5dc59f415c059eb577f443a766eb1dd312fbede0f59940f432", + "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", + "version": version, + "executables": [ + { + "path": f"bin/{arch}-g++.exe", + "checksum": "f2b2d3c6dab0f84a151835540f25e6d6f9442d00bf546bc4c709fad4b6fdda06", + "symlink": [f"{arch}-g++-{version}.exe"], + "add_to_devenv_path": False, + }, + { + "path": f"bin/{arch}-gcc.exe", + "checksum": "95a8478ecb5133029f3058fb0207f19ee00157a6dd81f220e8308305f0e25fe8", + "symlink": [f"{arch}-gcc-{version}.exe"], + "add_to_devenv_path": False, + }, + ], + "add_to_devenv_script": [], + }) # -------------------------------------------------------------------------- - result.append({ - "label": "GCC_MinGW_ARM", - "manifests": [], - }) + if is_windows: + result.append({ + "label": "GCC_MinGW_ARM", + "manifests": [], + }) - arch = "arm-none-eabi" - version = "12.2.0" - result[-1]['manifests'].append({ - "download_checksum": "aa581b3a5d446bb2d9827f2ea1f02b066b6713d4543d24abbd3181f626036c39", - "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", - "version": version, - "executables": [ - { - "path": f"bin/{arch}-g++.exe", - "checksum": "fa48985c43cf82b426c461381e4c50d0ac3e9425f7e97bf116e1bab4b3a2a388", - "symlink": [f"{arch}-g++-{version}.exe"], - "add_to_devenv_path": True, - }, - { - "path": f"bin/{arch}-gcc.exe", - "checksum": "94a342aae99cae1a95f3636bb5c7b11f5e17015aee98b556989944ec38755be2", - "symlink": [f"{arch}-gcc-{version}.exe"], - "add_to_devenv_path": True, - }, - ], - "add_to_devenv_script": [], - }) + arch = "arm-none-eabi" + version = "12.2.0" + result[-1]['manifests'].append({ + "download_checksum": "aa581b3a5d446bb2d9827f2ea1f02b066b6713d4543d24abbd3181f626036c39", + "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", + "version": version, + "executables": [ + { + "path": f"bin/{arch}-g++.exe", + "checksum": "fa48985c43cf82b426c461381e4c50d0ac3e9425f7e97bf116e1bab4b3a2a388", + "symlink": [f"{arch}-g++-{version}.exe"], + "add_to_devenv_path": True, + }, + { + "path": f"bin/{arch}-gcc.exe", + "checksum": "94a342aae99cae1a95f3636bb5c7b11f5e17015aee98b556989944ec38755be2", + "symlink": [f"{arch}-gcc-{version}.exe"], + "add_to_devenv_path": True, + }, + ], + "add_to_devenv_script": [], + }) - version = "11.3.0" - result[-1]['manifests'].append({ - "download_checksum": "797ed71f60fae386c8875bb4e75e244afb15ded9e00ac77b6670a62be7614cc6", - "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", - "version": version, - "executables": [ - { - "path": f"bin/{arch}-g++.exe", - "checksum": "a36f2ea6846badf7c91631f118e88967f25d6e479a9beea158445ce75403a655", - "symlink": [f"{arch}-g++-{version}.exe"], - "add_to_devenv_path": False, - }, - { - "path": f"bin/{arch}-gcc.exe", - "checksum": "71158642a3d4921eda106a1b23640f1ed8bf1725ceaa98cbc8729a9a8115b09a", - "symlink": [f"{arch}-gcc-{version}.exe"], - "add_to_devenv_path": False, - }, - ], - "add_to_devenv_script": [], - }) + version = "11.3.0" + result[-1]['manifests'].append({ + "download_checksum": "797ed71f60fae386c8875bb4e75e244afb15ded9e00ac77b6670a62be7614cc6", + "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", + "version": version, + "executables": [ + { + "path": f"bin/{arch}-g++.exe", + "checksum": "a36f2ea6846badf7c91631f118e88967f25d6e479a9beea158445ce75403a655", + "symlink": [f"{arch}-g++-{version}.exe"], + "add_to_devenv_path": False, + }, + { + "path": f"bin/{arch}-gcc.exe", + "checksum": "71158642a3d4921eda106a1b23640f1ed8bf1725ceaa98cbc8729a9a8115b09a", + "symlink": [f"{arch}-gcc-{version}.exe"], + "add_to_devenv_path": False, + }, + ], + "add_to_devenv_script": [], + }) - version = "10.3.0" - result[-1]['manifests'].append({ - "download_checksum": "af0fc2da062aa6423a91213e231ecc5981136b9b0655837ebdbbc5ad879d2d9e", - "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", - "version": version, - "executables": [ - { - "path": f"bin/{arch}-g++.exe", - "checksum": "c3dc49b561d177b3586992dfea86067eb8799e1586a7f26cea5b0ea97926632e", - "symlink": [f"{arch}-g++-{version}.exe"], - "add_to_devenv_path": False, - }, - { - "path": f"bin/{arch}-gcc.exe", - "checksum": "7e680ffec593474a54193f5253b620cf59b6e3a1720dd35ab95bcb53582b7b7d", - "symlink": [f"{arch}-gcc-{version}.exe"], - "add_to_devenv_path": False, - }, - ], - "add_to_devenv_script": [], - }) + version = "10.3.0" + result[-1]['manifests'].append({ + "download_checksum": "af0fc2da062aa6423a91213e231ecc5981136b9b0655837ebdbbc5ad879d2d9e", + "download_url": f"https://github.com/mmozeiko/build-gcc-arm/releases/download/gcc-v{version}/gcc-v{version}-{arch}.7z", + "version": version, + "executables": [ + { + "path": f"bin/{arch}-g++.exe", + "checksum": "c3dc49b561d177b3586992dfea86067eb8799e1586a7f26cea5b0ea97926632e", + "symlink": [f"{arch}-g++-{version}.exe"], + "add_to_devenv_path": False, + }, + { + "path": f"bin/{arch}-gcc.exe", + "checksum": "7e680ffec593474a54193f5253b620cf59b6e3a1720dd35ab95bcb53582b7b7d", + "symlink": [f"{arch}-gcc-{version}.exe"], + "add_to_devenv_path": False, + }, + ], + "add_to_devenv_script": [], + }) # -------------------------------------------------------------------------- - result.append({ - "label": "GCC_MinGW", - "manifests": [], - }) + if is_windows: + result.append({ + "label": "GCC_MinGW", + "manifests": [], + }) - version = "12.2.0" - mingw_version = "10.0.0" - result[-1]['manifests'].append({ - "download_checksum": "5cbe5ea7533f6d24af3a57fe7022032f420b15d7c4e38c0d16534a42d33213a4", - "download_url": f"https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{version}-mingw-v{mingw_version}/gcc-v{version}-mingw-v{mingw_version}-x86_64.7z", - "version": version, - "executables": [ - { - "path": f"bin/g++.exe", - "checksum": "886b0f25256ddbd0f4ad09e6e3b81279f9a8b6a1b5c32c714c9c201d802caa39", - "symlink": [f"g++-{version}.exe"], - "add_to_devenv_path": True, - }, - { - "path": f"bin/gcc.exe", - "checksum": "91c910fa5257fdfd0291c347c81a73c7facb1f486dba941f977714672895c96e", - "symlink": [f"gcc-{version}.exe"], - "add_to_devenv_path": True, - }, - ], - "add_to_devenv_script": [], - }) + version = "12.2.0" + mingw_version = "10.0.0" + result[-1]['manifests'].append({ + "download_checksum": "5cbe5ea7533f6d24af3a57fe7022032f420b15d7c4e38c0d16534a42d33213a4", + "download_url": f"https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{version}-mingw-v{mingw_version}/gcc-v{version}-mingw-v{mingw_version}-x86_64.7z", + "version": version, + "executables": [ + { + "path": f"bin/g++.exe", + "checksum": "886b0f25256ddbd0f4ad09e6e3b81279f9a8b6a1b5c32c714c9c201d802caa39", + "symlink": [f"g++-{version}.exe"], + "add_to_devenv_path": True, + }, + { + "path": f"bin/gcc.exe", + "checksum": "91c910fa5257fdfd0291c347c81a73c7facb1f486dba941f977714672895c96e", + "symlink": [f"gcc-{version}.exe"], + "add_to_devenv_path": True, + }, + ], + "add_to_devenv_script": [], + }) - version = "11.3.0" - result[-1]['manifests'].append({ - "download_checksum": "e2c5c64659aeda77680c5eec80bbaa4db3f117b21febeb3f13fd76d580604fd0", - "download_url": f"https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{version}-mingw-v{mingw_version}/gcc-v{version}-mingw-v{mingw_version}-x86_64.7z", - "version": version, - "executables": [ - { - "path": f"bin/g++.exe", - "checksum": "e92ecfa0171f2ab0c3ca39f2121ab5e887b3a378399a4be7e056820f5841c7a5", - "symlink": [f"g++-{version}.exe"], - "add_to_devenv_path": False, - }, - { - "path": f"bin/gcc.exe", - "checksum": "f3226120196ea37ab3e450bd0f26d816ee28556d18aa0de64c3e427f31d66eeb", - "symlink": [f"gcc-{version}.exe"], - "add_to_devenv_path": False, - }, - ], - "add_to_devenv_script": [], - }) + version = "11.3.0" + result[-1]['manifests'].append({ + "download_checksum": "e2c5c64659aeda77680c5eec80bbaa4db3f117b21febeb3f13fd76d580604fd0", + "download_url": f"https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{version}-mingw-v{mingw_version}/gcc-v{version}-mingw-v{mingw_version}-x86_64.7z", + "version": version, + "executables": [ + { + "path": f"bin/g++.exe", + "checksum": "e92ecfa0171f2ab0c3ca39f2121ab5e887b3a378399a4be7e056820f5841c7a5", + "symlink": [f"g++-{version}.exe"], + "add_to_devenv_path": False, + }, + { + "path": f"bin/gcc.exe", + "checksum": "f3226120196ea37ab3e450bd0f26d816ee28556d18aa0de64c3e427f31d66eeb", + "symlink": [f"gcc-{version}.exe"], + "add_to_devenv_path": False, + }, + ], + "add_to_devenv_script": [], + }) - version = "10.3.0" - mingw_version = "8.0.0" - result[-1]['manifests'].append({ - "download_checksum": "c8f38f6b1d264d7e008009bd32a04ca71b4ee3a3113e67930ab31c2e06818317", - "download_url": f"https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{version}-mingw-v{mingw_version}/gcc-v{version}-mingw-v{mingw_version}-x86_64.7z", - "version": version, - "executables": [ - { - "path": f"bin/g++.exe", - "checksum": "5c93b6da129ea01ee5fc87d5c7db948fc3bc62bae261ded9a883f1fa543571d2", - "symlink": [f"g++-{version}.exe"], - "add_to_devenv_path": False, - }, - { - "path": f"bin/gcc.exe", - "checksum": "54a5f8d09e6741b9c94d1494f383c424c20449e3e06f36bf96603aeda9874405", - "symlink": [f"gcc-{version}.exe"], - "add_to_devenv_path": False, - }, - ], - "add_to_devenv_script": [], - }) + version = "10.3.0" + mingw_version = "8.0.0" + result[-1]['manifests'].append({ + "download_checksum": "c8f38f6b1d264d7e008009bd32a04ca71b4ee3a3113e67930ab31c2e06818317", + "download_url": f"https://github.com/mmozeiko/build-gcc/releases/download/gcc-v{version}-mingw-v{mingw_version}/gcc-v{version}-mingw-v{mingw_version}-x86_64.7z", + "version": version, + "executables": [ + { + "path": f"bin/g++.exe", + "checksum": "5c93b6da129ea01ee5fc87d5c7db948fc3bc62bae261ded9a883f1fa543571d2", + "symlink": [f"g++-{version}.exe"], + "add_to_devenv_path": False, + }, + { + "path": f"bin/gcc.exe", + "checksum": "54a5f8d09e6741b9c94d1494f383c424c20449e3e06f36bf96603aeda9874405", + "symlink": [f"gcc-{version}.exe"], + "add_to_devenv_path": False, + }, + ], + "add_to_devenv_script": [], + }) # -------------------------------------------------------------------------- @@ -367,12 +434,15 @@ def get_manifest(): "manifests": [], }) - version = "15.0.7" - result[-1]['manifests'].append({ - "download_checksum": "5428cb72acf63ce3bc4328e546a36674c9736ec040ecc176d362201c6548e6a8", - "download_url": f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/LLVM-{version}-win64.exe", - "version": version, - "executables": [ + version = "15.0.7" + download_url = "" + download_checksum = "" + executables = [] + + if is_windows: + download_url = f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/LLVM-{version}-win64.exe", + download_checksum = "7041d2c02d226c0c051cc9f6373d51ac9a2de00025e18582077c76e8ad68abe1" + executables = [ { "path": f"bin/clang++.exe", "checksum": "1f523e33de4ce9d591b4eb9bad102f086e8480488148f8db0d5c87056798ce3e", @@ -384,17 +454,38 @@ def get_manifest(): "checksum": "1f523e33de4ce9d591b4eb9bad102f086e8480488148f8db0d5c87056798ce3e", "symlink": [f"clang-{version}.exe"], "add_to_devenv_path": True, + } + ] + else: + download_url = f"" + download_checksum = "none" + executables = [ + { + "path": f"bin/clang++", + "checksum": "none", + "symlink": [f"clang++-{version}"], + "add_to_devenv_path": True, }, - ], + { + "path": f"bin/clang.exe", + "checksum": "none", + "symlink": [f"clang-{version}"], + "add_to_devenv_path": True, + } + ] + + result[-1]['manifests'].append({ + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, + "executables": executables, "add_to_devenv_script": [], }) version = "14.0.6" - result[-1]['manifests'].append({ - "download_checksum": "e8dbb2f7de8e37915273d65c1c2f2d96844b96bb8e8035f62c5182475e80b9fc", - "download_url": f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/LLVM-{version}-win64.exe", - "version": version, - "executables": [ + if is_windows: + download_checksum = "e8dbb2f7de8e37915273d65c1c2f2d96844b96bb8e8035f62c5182475e80b9fc" + executables = [ { "path": f"bin/clang++.exe", "checksum": "d557b79bc09a01141ac7d940016f52ce1db081e31d7968f0d9b6f4c192d8f8cc", @@ -406,17 +497,37 @@ def get_manifest(): "checksum": "d557b79bc09a01141ac7d940016f52ce1db081e31d7968f0d9b6f4c192d8f8cc", "symlink": [f"clang-{version}.exe"], "add_to_devenv_path": False, + } + ] + else: + download_checksum = "none" + executables = [ + { + "path": f"bin/clang++", + "checksum": "none", + "symlink": [f"clang++-{version}"], + "add_to_devenv_path": False, }, - ], + { + "path": f"bin/clang.exe", + "checksum": "none", + "symlink": [f"clang-{version}"], + "add_to_devenv_path": False, + } + ] + + result[-1]['manifests'].append({ + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, + "executables": executables, "add_to_devenv_script": [], }) version = "13.0.1" - result[-1]['manifests'].append({ - "download_checksum": "9d15be034d52ec57cfc97615634099604d88a54761649498daa7405983a7e12f", - "download_url": f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/LLVM-{version}-win64.exe", - "version": version, - "executables": [ + if is_windows: + download_checksum = "9d15be034d52ec57cfc97615634099604d88a54761649498daa7405983a7e12f" + executables = [ { "path": f"bin/clang++.exe", "checksum": "e3f26820ac446cb7c471cce49f6646b4346aa5380d11790ceaa7bf494a94b21d", @@ -428,17 +539,37 @@ def get_manifest(): "checksum": "e3f26820ac446cb7c471cce49f6646b4346aa5380d11790ceaa7bf494a94b21d", "symlink": [f"clang-{version}.exe"], "add_to_devenv_path": False, + } + ] + else: + download_checksum = "none" + executables = [ + { + "path": f"bin/clang++", + "checksum": "none", + "symlink": [f"clang++-{version}"], + "add_to_devenv_path": False, }, - ], + { + "path": f"bin/clang.exe", + "checksum": "none", + "symlink": [f"clang-{version}"], + "add_to_devenv_path": False, + } + ] + + result[-1]['manifests'].append({ + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, + "executables": executables, "add_to_devenv_script": [], }) version = "12.0.1" - result[-1]['manifests'].append({ - "download_checksum": "fcbabc9a170208bb344f7bba8366cca57ff103d72a316781bbb77d634b9e9433", - "download_url": f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/LLVM-{version}-win64.exe", - "version": version, - "executables": [ + if is_windows: + download_checksum = "fcbabc9a170208bb344f7bba8366cca57ff103d72a316781bbb77d634b9e9433" + executables = [ { "path": f"bin/clang++.exe", "checksum": "9f0748de7f946c210a030452de226986bab46a0121d7236ea0e7b5079cb6dfef", @@ -450,17 +581,37 @@ def get_manifest(): "checksum": "9f0748de7f946c210a030452de226986bab46a0121d7236ea0e7b5079cb6dfef", "symlink": [f"clang-{version}.exe"], "add_to_devenv_path": False, + } + ] + else: + download_checksum = "none" + executables = [ + { + "path": f"bin/clang++", + "checksum": "none", + "symlink": [f"clang++-{version}"], + "add_to_devenv_path": False, }, - ], + { + "path": f"bin/clang.exe", + "checksum": "none", + "symlink": [f"clang-{version}"], + "add_to_devenv_path": False, + } + ] + + result[-1]['manifests'].append({ + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, + "executables": executables, "add_to_devenv_script": [], }) version = "11.1.0" - result[-1]['manifests'].append({ - "download_checksum": "b5770bbfac712d273938cd155e232afaa85c2e8d865c7ca504a104a838568516", - "download_url": f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/LLVM-{version}-win64.exe", - "version": version, - "executables": [ + if is_windows: + download_checksum = "b5770bbfac712d273938cd155e232afaa85c2e8d865c7ca504a104a838568516" + executables = [ { "path": f"bin/clang++.exe", "checksum": "f72591f8a02e4b7573aa2fcd2999a3ea76fe729e2468e5414853617268798dfd", @@ -472,27 +623,65 @@ def get_manifest(): "checksum": "f72591f8a02e4b7573aa2fcd2999a3ea76fe729e2468e5414853617268798dfd", "symlink": [f"clang-{version}.exe"], "add_to_devenv_path": False, + } + ] + else: + download_checksum = "none" + executables = [ + { + "path": f"bin/clang++", + "checksum": "none", + "symlink": [f"clang++-{version}"], + "add_to_devenv_path": False, }, - ], + { + "path": f"bin/clang.exe", + "checksum": "none", + "symlink": [f"clang-{version}"], + "add_to_devenv_path": False, + } + ] + + result[-1]['manifests'].append({ + "download_checksum": download_checksum, + "download_url": download_url, + "version": version, + "executables": executables, "add_to_devenv_script": [], }) # -------------------------------------------------------------------------- - version = "1.11.1" + version = "1.11.1" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://github.com/ninja-build/ninja/releases/download/v{version}/ninja-win.zip", + download_checksum = "524b344a1a9a55005eaf868d991e090ab8ce07fa109f1820d40e74642e289abc" + checksum = "23e7d60c17b3fcd42d9c00d49eca3c3771b04d7ccb13e49836b06b34e20211c7" + exe_path = "ninja.exe" + else: + download_url = f"https://github.com/ninja-build/ninja/releases/download/v{version}/ninja-linux.zip", + download_checksum = "none" + checksum = "none" + exe_path = "ninja" + result.append({ "label": "Ninja", "manifests": [ { - "download_url": f"https://github.com/ninja-build/ninja/releases/download/v{version}/ninja-win.zip", - "download_checksum": "524b344a1a9a55005eaf868d991e090ab8ce07fa109f1820d40e74642e289abc", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "ninja.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": True, - "checksum": "23e7d60c17b3fcd42d9c00d49eca3c3771b04d7ccb13e49836b06b34e20211c7", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -502,20 +691,39 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "16.19.0" + version = "16.19.0" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + symlink = [] + + if is_windows: + download_url = f"https://nodejs.org/dist/v{version}/node-v{version}-win-x64.7z" + download_checksum = "e07399a4a441091ca0a5506faf7a9236ea1675220146daeea3bee828c2cbda3f" + checksum = "e4e7f389fbec9300275defc749246c62bdbe4f66406eb01e7c9a4101e07352da" + exe_path = "node.exe" + symlink = [f"node-{version}.exe"] + else: + download_url = f"https://nodejs.org/dist/v{version}/node-v{version}-linux-x64.tar.xz" + download_checksum = "none" + checksum = "none" + exe_path = "node" + symlink = [f"node-{version}"] + result.append({ "label": "NodeJS", "manifests": [ { - "download_checksum": "e07399a4a441091ca0a5506faf7a9236ea1675220146daeea3bee828c2cbda3f", - "download_url": f"https://nodejs.org/dist/v{version}/node-v{version}-win-x64.7z", + "download_checksum": download_checksum, + "download_url": download_url, "version": version, "executables": [ { - "path": "node.exe", - "symlink": [f"node-{version}.exe"], + "path": exe_path, + "symlink": symlink, "add_to_devenv_path": True, - "checksum": "e4e7f389fbec9300275defc749246c62bdbe4f66406eb01e7c9a4101e07352da", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -525,48 +733,82 @@ def get_manifest(): # -------------------------------------------------------------------------- - date = "20230116" - version = f"3.10.9+{date}" - label = "Python" + label = "Python" + date = "20230116" + version = f"3.10.9+{date}" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + add_to_devenv_script = [] + + if is_windows: + download_url = f"https://github.com/indygreg/python-build-standalone/releases/download/{date}/cpython-{version}-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst" + download_checksum = "4cfa6299a78a3959102c461d126e4869616f0a49c60b44220c000fc9aecddd78" + checksum = "6dafb845aba67aba898f5aa8adf6c48061e7ffea1d2ed7d290a1e4386e78f2f0" + exe_path = "install/python.exe" + add_to_devenv_script = [ + f"set PYTHONHOME=%~dp0{label}\\{version}\\install", + f"set PATH=%~dp0{label}\\{version}\\install\\Script;%PATH%", + ] + 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 = "none" + checksum = "none" + exe_path = "bin/python" + result.append({ - "label": f"{label}", + "label": label, "manifests": [ { - "download_checksum": "4cfa6299a78a3959102c461d126e4869616f0a49c60b44220c000fc9aecddd78", - "download_url": f"https://github.com/indygreg/python-build-standalone/releases/download/{date}/cpython-{version}-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", + "download_checksum": download_checksum, + "download_url": download_url, "version": version, "executables": [ { - "path": "install/python.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": True, - "checksum": "6dafb845aba67aba898f5aa8adf6c48061e7ffea1d2ed7d290a1e4386e78f2f0", + "checksum": checksum, } ], - "add_to_devenv_script": [ - f"set PYTHONHOME=%~dp0{label}\\{version}\\install", - f"set PATH=%~dp0{label}\\{version}\\install\\Script;%PATH%", - ], + "add_to_devenv_script": add_to_devenv_script, } ], }) # -------------------------------------------------------------------------- - version = "1.24" + version = "1.24" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://renderdoc.org/stable/{version}/RenderDoc_{version}_64.zip" + download_checksum = "dbd215f7e1c7933b8eedc49499a4372c92e68ddab04af4658f434bfe6c382a9a" + checksum = "cfb96468355a416568faf89db18cd8a195bccec87ea16b3fffd3cc13c952c5fd" + exe_path = "qrenderdoc.exe" + else: + download_url = f"https://renderdoc.org/stable/{version}/renderdoc_{version}.tar.gz" + download_checksum = "none" + checksum = "none" + exe_path = "bin/qrenderdoc" + result.append({ "label": "Renderdoc", "manifests": [ { - "download_url": f"https://renderdoc.org/stable/{version}/RenderDoc_{version}_64.zip", - "download_checksum": "dbd215f7e1c7933b8eedc49499a4372c92e68ddab04af4658f434bfe6c382a9a", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "qrenderdoc.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": False, - "checksum": "cfb96468355a416568faf89db18cd8a195bccec87ea16b3fffd3cc13c952c5fd", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -576,43 +818,63 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "0.6.1" - result.append({ - "label": "Zeal", - "manifests": [ - { - "download_url": f"https://github.com/zealdocs/zeal/releases/download/v{version}/zeal-portable-{version}-windows-x64.7z", - "download_checksum": "08e9992f620ba0a5ea348471d8ac9c85059e95eedd950118928be639746e3f94", - "version": version, - "executables": [ - { - "path": "zeal.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "d1e687a33e117b6319210f40e2401b4a68ffeb0f33ef82f5fb6a31ce4514a423", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "0.6.1" + result.append({ + "label": "Zeal", + "manifests": [ + { + "download_url": f"https://github.com/zealdocs/zeal/releases/download/v{version}/zeal-portable-{version}-windows-x64.7z", + "download_checksum": "08e9992f620ba0a5ea348471d8ac9c85059e95eedd950118928be639746e3f94", + "version": version, + "executables": [ + { + "path": "zeal.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "d1e687a33e117b6319210f40e2401b4a68ffeb0f33ef82f5fb6a31ce4514a423", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "0.10.1" + version = "0.10.1" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + symlink = [] + + if is_windows: + download_url = f"https://ziglang.org/download/{version}/zig-windows-x86_64-{version}.zip" + download_checksum = "5768004e5e274c7969c3892e891596e51c5df2b422d798865471e05049988125" + checksum = "607c9928a24f9d2e08df1ee240ebfd15ab1eb3c14b85e02f7dad6f8c8b53fea8" + exe_path = "zig.exe" + symlink = [f"zig-{version}.exe"] + else: + download_url = f"https://ziglang.org/download/{version}/zig-linux-x86_64-{version}.zip" + download_checksum = "none" + checksum = "none" + exe_path = "zig" + symlink = [f"zig-{version}"] + result.append({ "label": "Zig", "manifests": [ { - "download_url": f"https://ziglang.org/download/{version}/zig-windows-x86_64-{version}.zip", - "download_checksum": "5768004e5e274c7969c3892e891596e51c5df2b422d798865471e05049988125", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "zig.exe", - "symlink": [f"zig-{version}.exe"], + "path": exe_path, + "symlink": symlink, "add_to_devenv_path": True, - "checksum": "607c9928a24f9d2e08df1ee240ebfd15ab1eb3c14b85e02f7dad6f8c8b53fea8", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -622,90 +884,112 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "1.4.13" - git_hash = "0066c6" - result.append({ - "label": "Clink", - "manifests": [ - { - "download_url": f"https://github.com/chrisant996/clink/releases/download/v{version}/clink.{version}.{git_hash}.zip", - "download_checksum": "800f7657d73a00dad40d46c9317bd418172ee40cc8b3958e32fba1f0b596e829", - "version": version, - "executables": [ - { - "path": "clink_x64.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "331266334f59f2c978ff8e13bbcadb218051e790b61d9cc69e85617276c51298", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "1.4.13" + git_hash = "0066c6" + result.append({ + "label": "Clink", + "manifests": [ + { + "download_url": f"https://github.com/chrisant996/clink/releases/download/v{version}/clink.{version}.{git_hash}.zip", + "download_checksum": "800f7657d73a00dad40d46c9317bd418172ee40cc8b3958e32fba1f0b596e829", + "version": version, + "executables": [ + { + "path": "clink_x64.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "331266334f59f2c978ff8e13bbcadb218051e790b61d9cc69e85617276c51298", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "1.11.1" - result.append({ - "label": "Dependencies", - "manifests": [ - { - "download_url": f"https://github.com/lucasg/Dependencies/releases/download/v{version}/Dependencies_x64_Release.zip", - "download_checksum": "7d22dc00f1c09fd4415d48ad74d1cf801893e83b9a39944b0fce6dea7ceaea99", - "version": version, - "executables": [ - { - "path": "DependenciesGui.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "1737e5406128c3560bbb2bced3ac62d77998e592444f94b10cc0aa0bb1e617e6", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "1.11.1" + result.append({ + "label": "Dependencies", + "manifests": [ + { + "download_url": f"https://github.com/lucasg/Dependencies/releases/download/v{version}/Dependencies_x64_Release.zip", + "download_checksum": "7d22dc00f1c09fd4415d48ad74d1cf801893e83b9a39944b0fce6dea7ceaea99", + "version": version, + "executables": [ + { + "path": "DependenciesGui.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "1737e5406128c3560bbb2bced3ac62d77998e592444f94b10cc0aa0bb1e617e6", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "1.4.1.1022" - result.append({ - "label": "Everything", - "manifests": [ - { - "download_url": f"https://www.voidtools.com/Everything-{version}.x64.zip", - "download_checksum": "c718bcd73d341e64c8cb47e97eb0c45d010fdcc45c2488d4a3a3c51acc775889", - "version": version, - "executables": [ - { - "path": "Everything.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "9c282a47a18477af505e64b45c3609f21f13fe1f6ff289065497a1ec00f5d332", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "1.4.1.1022" + result.append({ + "label": "Everything", + "manifests": [ + { + "download_url": f"https://www.voidtools.com/Everything-{version}.x64.zip", + "download_checksum": "c718bcd73d341e64c8cb47e97eb0c45d010fdcc45c2488d4a3a3c51acc775889", + "version": version, + "executables": [ + { + "path": "Everything.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "9c282a47a18477af505e64b45c3609f21f13fe1f6ff289065497a1ec00f5d332", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "0.37.0" + version = "0.37.0" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + symlink = [] + + if is_windows: + download_url = f"https://github.com/junegunn/fzf/releases/download/{version}/fzf-{version}-windows_amd64.zip" + download_checksum = "247bffe84ff3294a8c0a7bb96329d5e4152d3d034e13dec59dcc97d8a828000d" + checksum = "c0f4b20d0602977ff3e592cac8eadf86473abed0d24e2def81239bd2e76047e8" + exe_path = "fzf.exe" + symlink = [f"fzf.exe"] + else: + download_url = f"https://github.com/junegunn/fzf/releases/download/{version}/fzf-{version}-linux_amd64.tar.gz" + download_checksum = "none" + checksum = "none" + exe_path = "fzf" + symlink = [f"fzf"] + result.append({ "label": "FZF", "manifests": [ { - "download_url": f"https://github.com/junegunn/fzf/releases/download/{version}/fzf-{version}-windows_amd64.zip", - "download_checksum": "247bffe84ff3294a8c0a7bb96329d5e4152d3d034e13dec59dcc97d8a828000d", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "fzf.exe", - "symlink": ["fzf.exe"], + "path": exe_path, + "symlink": symlink, "add_to_devenv_path": False, - "checksum": "c0f4b20d0602977ff3e592cac8eadf86473abed0d24e2def81239bd2e76047e8", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -715,66 +999,84 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "1.1.42" - result.append({ - "label": "JPEGView", - "manifests": [ - { - "download_url": f"https://github.com/sylikc/jpegview/releases/download/v{version}/JPEGView_{version}.7z", - "download_checksum": "84b20a6f3ee5184176e46a6755a57147aba90984c2fbbee094e57af036859daf", - "version": version, - "executables": [ - { - "path": "JPEGView64/JPEGView.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "cd7930d0242cbd8a0d0dc9861e48f6ebe4c2bfba33aafbcf8e0da497ab0eae54", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "1.1.42" + result.append({ + "label": "JPEGView", + "manifests": [ + { + "download_url": f"https://github.com/sylikc/jpegview/releases/download/v{version}/JPEGView_{version}.7z", + "download_checksum": "84b20a6f3ee5184176e46a6755a57147aba90984c2fbbee094e57af036859daf", + "version": version, + "executables": [ + { + "path": "JPEGView64/JPEGView.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "cd7930d0242cbd8a0d0dc9861e48f6ebe4c2bfba33aafbcf8e0da497ab0eae54", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "22.02" - result.append({ - "label": "MPC-Qt", - "manifests": [ - { - "download_url": f"https://github.com/mpc-qt/mpc-qt/releases/download/v{version}/mpc-qt-win-x64-{version.replace('.', '')}.zip", - "download_checksum": "2230c4f4de1a429ccc67e5c590efc0a86fbaffeb33a4dc5f391aa45e660b80c2", - "version": version, - "executables": [ - { - "path": "mpc-qt.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "d7ee46b0d4a61a26f8acd5d5fd4da2d252d6bc80c5cab6a55db06e853f2acefb", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "22.02" + result.append({ + "label": "MPC-Qt", + "manifests": [ + { + "download_url": f"https://github.com/mpc-qt/mpc-qt/releases/download/v{version}/mpc-qt-win-x64-{version.replace('.', '')}.zip", + "download_checksum": "2230c4f4de1a429ccc67e5c590efc0a86fbaffeb33a4dc5f391aa45e660b80c2", + "version": version, + "executables": [ + { + "path": "mpc-qt.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "d7ee46b0d4a61a26f8acd5d5fd4da2d252d6bc80c5cab6a55db06e853f2acefb", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "0.8.2" + version = "0.8.2" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://github.com/neovim/neovim/releases/download/v{version}/nvim-win64.zip" + download_checksum = "e2d53c6fd4a3caefbff47765d63d1640a5a134de46623ed8e3f9bf547791c26f" + checksum = "dd8b045e9a76bea6add3e7a727387aef6996846907e061df07971329b9464faf" + exe_path = "bin/nvim.exe" + else: + exe_path = "nvim.appimage" + download_url = f"https://github.com/neovim/neovim/releases/download/v{version}/{exe_path}" + download_checksum = "bb0d4599cb506fc6e29bf0e9cef3b52e06dcb4bb930b56d6eb88320f1d46a908" + checksum = "none" + result.append({ "label": "NVim", "manifests": [ { - "download_url": f"https://github.com/neovim/neovim/releases/download/v{version}/nvim-win64.zip", - "download_checksum": "e2d53c6fd4a3caefbff47765d63d1640a5a134de46623ed8e3f9bf547791c26f", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "bin/nvim.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": True, - "checksum": "dd8b045e9a76bea6add3e7a727387aef6996846907e061df07971329b9464faf", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -784,20 +1086,36 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "0.10.3" + version = "0.10.3" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://github.com/neovide/neovide/releases/download/{version}/neovide-windows.zip" + download_checksum = "ec54f811e5cb271102751694124380f4a58ae5edf99a1a267e8b070a362f8297" + checksum = "2c1df8ec7287f927554ebd9ad5cd0da34d7e72c3384fe266080ddf612adf6e5a" + exe_path = "neovide.exe" + else: + download_url = f"https://github.com/neovide/neovide/releases/download/{version}/neovide.tar.gz" + download_checksum = "fc0593a0f55e99fa8398e8137ac89632ea7fc97a90cbd32d8c2a69afc1eff6f" + checksum = "none" + exe_path = "neovide" + result.append({ "label": "Neovide", "manifests": [ { - "download_url": f"https://github.com/neovide/neovide/releases/download/{version}/neovide-windows.zip", - "download_checksum": "ec54f811e5cb271102751694124380f4a58ae5edf99a1a267e8b070a362f8297", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "neovide.exe", - "symlink": ["neovide.exe"], + "path": exe_path, + "symlink": [exe_path], "add_to_devenv_path": False, - "checksum": "2c1df8ec7287f927554ebd9ad5cd0da34d7e72c3384fe266080ddf612adf6e5a", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -807,43 +1125,36 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "1.26.2" + version = "1.26.2" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://github.com/WerWolv/ImHex/releases/download/v{version}/imhex-{version}-Windows-Portable.zip" + download_checksum = "4f58097c3ccee88d8dff0d48da0f239af8a9d444903cc19a3369f63caa8d77e6" + checksum = "ddd448c0d8fe71295bbcc5b52c9e9f4b06956a79572b7d634436a49728f5f341" + exe_path = "imhex.exe" + else: + download_url = f"https://github.com/WerWolv/ImHex/releases/download/v{version}/imhex-{version}.AppImage" + download_checksum = "none" + checksum = "none" + exe_path = "imhex-{version}.AppImage" + result.append({ "label": "ImHex", "manifests": [ { - "download_url": f"https://github.com/WerWolv/ImHex/releases/download/v{version}/imhex-{version}-Windows-Portable.zip", - "download_checksum": "4f58097c3ccee88d8dff0d48da0f239af8a9d444903cc19a3369f63caa8d77e6", - "version": f"{version}", - "executables": [ - { - "path": "imhex.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "ddd448c0d8fe71295bbcc5b52c9e9f4b06956a79572b7d634436a49728f5f341", - } - ], - "add_to_devenv_script": [], - } - ], - }) - - # -------------------------------------------------------------------------- - - version = "22.3" - result.append({ - "label": "MobaXTerm", - "manifests": [ - { - "download_url": f"https://download.mobatek.net/2232022120824733/MobaXterm_Portable_v{version}.zip", - "download_checksum": "c8de508d6731f31a73f061e58942691466d1d24cfa941e642e16e0930be2fad9", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": f"MobaXTerm_Personal_{version}.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": False, - "checksum": "e47cb54645a368411c5d6b6cbfa7e25980a2a674d7d0c082f5137b6e77a2f362", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -853,43 +1164,84 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "3.0.5847" - result.append({ - "label": "SystemInformer", - "manifests": [ - { - "download_url": f"https://github.com/winsiderss/si-builds/releases/download/{version}/systeminformer-{version}-bin.zip", - "download_checksum": "4557e58f698048e882515faac89c9c7f654247dbf4bd656ceed5c3f97afef77d", - "version": "3.0.5847", - "executables": [ - { - "path": "amd64/SystemInformer.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "8a6e9dfd145e5cb8d03ec3db1b7b0163325be33e5c8fdd4126e9f8df2af2a39c", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "22.3" + result.append({ + "label": "MobaXTerm", + "manifests": [ + { + "download_url": f"https://download.mobatek.net/2232022120824733/MobaXterm_Portable_v{version}.zip", + "download_checksum": "c8de508d6731f31a73f061e58942691466d1d24cfa941e642e16e0930be2fad9", + "version": version, + "executables": [ + { + "path": f"MobaXTerm_Personal_{version}.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "e47cb54645a368411c5d6b6cbfa7e25980a2a674d7d0c082f5137b6e77a2f362", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "13.0.0" + if is_windows: + version = "3.0.5847" + result.append({ + "label": "SystemInformer", + "manifests": [ + { + "download_url": f"https://github.com/winsiderss/si-builds/releases/download/{version}/systeminformer-{version}-bin.zip", + "download_checksum": "4557e58f698048e882515faac89c9c7f654247dbf4bd656ceed5c3f97afef77d", + "version": "3.0.5847", + "executables": [ + { + "path": "amd64/SystemInformer.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "8a6e9dfd145e5cb8d03ec3db1b7b0163325be33e5c8fdd4126e9f8df2af2a39c", + } + ], + "add_to_devenv_script": [], + } + ], + }) + + # -------------------------------------------------------------------------- + + version = "13.0.0" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://github.com/BurntSushi/ripgrep/releases/download/{version}/ripgrep-{version}-x86_64-pc-windows-msvc.zip" + download_checksum = "a47ace6f654c5ffa236792fc3ee3fefd9c7e88e026928b44da801acb72124aa8" + checksum = "ab5595a4f7a6b918cece0e7e22ebc883ead6163948571419a1dd5cd3c7f37972" + exe_path = "rg.exe" + else: + download_url = f"https://github.com/BurntSushi/ripgrep/releases/download/{version}/ripgrep-{version}-x86_64-unknown-linux-musl.tar.gz" + download_checksum = "ee4e0751ab108b6da4f47c52da187d5177dc371f0f512a7caaec5434e711c091" + checksum = "none" + exe_path = "rg" + result.append({ "label": "Ripgrep", "manifests": [ { - "download_url": f"https://github.com/BurntSushi/ripgrep/releases/download/{version}/ripgrep-{version}-x86_64-pc-windows-msvc.zip", - "download_checksum": "a47ace6f654c5ffa236792fc3ee3fefd9c7e88e026928b44da801acb72124aa8", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "rg.exe", - "symlink": ["rg.exe"], + "path": exe_path, + "symlink": [exe_path], "add_to_devenv_path": False, - "checksum": "ab5595a4f7a6b918cece0e7e22ebc883ead6163948571419a1dd5cd3c7f37972", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -899,20 +1251,36 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "2.0.0" + version = "2.0.0" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://github.com/ahrm/sioyek/releases/download/v{version}/sioyek-release-windows-portable.zip" + download_checksum = "1f4fedbb38c0dc46bbba4bb95d0d6fab39fcf3525092ac26d92c891684d2bf8d" + checksum = "6c660f0f7265fabe6d943d15d9b5c7e85f2dbcf7fecb7d2cd0639e7086b1c034" + exe_path = "sioyek.exe" + else: + download_url = f"https://github.com/ahrm/sioyek/releases/download/v{version}/sioyek-release-linux-portable.zip" + download_checksum = "none" + checksum = "none" + exe_path = "sioyek" + result.append({ "label": "Sioyek", "manifests": [ { - "download_url": f"https://github.com/ahrm/sioyek/releases/download/v{version}/sioyek-release-windows-portable.zip", - "download_checksum": "1f4fedbb38c0dc46bbba4bb95d0d6fab39fcf3525092ac26d92c891684d2bf8d", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "sioyek.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": False, - "checksum": "6c660f0f7265fabe6d943d15d9b5c7e85f2dbcf7fecb7d2cd0639e7086b1c034", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -922,115 +1290,157 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "8.6.0" + version = "8.6.0" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + add_to_devenv_script = [] + + if is_windows: + download_url = f"https://github.com/sharkdp/fd/releases/download/v{version}/fd-v{version}-x86_64-pc-windows-msvc.zip" + download_checksum = "9cff97eb1c024ed94cc76a4b2d924ab3df04b37e7430c282b8188a13f1653ebe" + checksum = "a93ab08528896556ba3a6c262c8d73b275df2ce7a4138f5323f3eff414403f33" + exe_path = "fd.exe" + add_to_devenv_script = [ + "set FZF_DEFAULT_OPTS=--multi --layout=reverse", + "set FZF_DEFAULT_COMMAND=fd --type f --strip-cwd-prefix --hidden --follow --exclude .git --exclude .cache --exclude .vs", + ] + else: + download_url = f"https://github.com/sharkdp/fd/releases/download/v{version}/fd-v{version}-x86_64-pc-unknown-linux-musl.tar.gz" + download_checksum = "none" + checksum = "none" + exe_path = "fd" + add_to_devenv_script = [ + "FZF_DEFAULT_OPTS=--multi --layout=reverse", + "FZF_DEFAULT_COMMAND=fd --type f --strip-cwd-prefix --hidden --follow --exclude .git --exclude .cache --exclude .vs", + ] + + result.append({ "label": "Fd", "manifests": [ { - "download_url": f"https://github.com/sharkdp/fd/releases/download/v{version}/fd-v{version}-x86_64-pc-windows-msvc.zip", - "download_checksum": "9cff97eb1c024ed94cc76a4b2d924ab3df04b37e7430c282b8188a13f1653ebe", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "fd.exe", - "symlink": ["fd.exe"], + "path": exe_path, + "symlink": [exe_path], "add_to_devenv_path": False, - "checksum": "a93ab08528896556ba3a6c262c8d73b275df2ce7a4138f5323f3eff414403f33", + "checksum": checksum } ], - "add_to_devenv_script": [ - "set FZF_DEFAULT_OPTS=--multi --layout=reverse", - "set FZF_DEFAULT_COMMAND=fd --type f --strip-cwd-prefix --hidden --follow --exclude .git --exclude .cache --exclude .vs", - ], + "add_to_devenv_script": add_to_devenv_script, } ], }) # -------------------------------------------------------------------------- - version = "4_12" - result.append({ - "label": "WizTree", - "manifests": [ - { - "download_url": f"https://www.diskanalyzer.com/files/wiztree_{version}_portable.zip", - "download_checksum": "f6b71fc54a9bb3f277efdf8afcd45df8ddc1759533f3236437309dae7778b168", - "version": version, - "executables": [ - { - "path": "wiztree64.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "e2157dc64629a29e1713a845e5a9e7cab89d79a7390820c1bfda05c7de989c3d", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "4_12" + result.append({ + "label": "WizTree", + "manifests": [ + { + "download_url": f"https://www.diskanalyzer.com/files/wiztree_{version}_portable.zip", + "download_checksum": "f6b71fc54a9bb3f277efdf8afcd45df8ddc1759533f3236437309dae7778b168", + "version": version, + "executables": [ + { + "path": "wiztree64.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "e2157dc64629a29e1713a845e5a9e7cab89d79a7390820c1bfda05c7de989c3d", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "1.61.1" - result.append({ - "label": "RClone", - "manifests": [ - { - "download_url": f"https://github.com/rclone/rclone/releases/download/v{version}/rclone-v{version}-windows-amd64.zip", - "download_checksum": "99daaa95867cdf0758ec1d5d7f2ebdb3bf74c8c8602e2aaf888e637163d2ebdd", - "version": version, - "executables": [ - { - "path": "rclone.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "e94901809ff7cc5168c1e857d4ac9cbb339ca1f6e21dcce95dfb8e28df799961", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "1.61.1" + result.append({ + "label": "RClone", + "manifests": [ + { + "download_url": f"https://github.com/rclone/rclone/releases/download/v{version}/rclone-v{version}-windows-amd64.zip", + "download_checksum": "99daaa95867cdf0758ec1d5d7f2ebdb3bf74c8c8602e2aaf888e637163d2ebdd", + "version": version, + "executables": [ + { + "path": "rclone.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "e94901809ff7cc5168c1e857d4ac9cbb339ca1f6e21dcce95dfb8e28df799961", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "1.5.3" - result.append({ - "label": "Eyes-Thanks", - "manifests": [ - { - "download_url": f"https://github.com/yalov/eyes-thanks/releases/download/{version}/EyesThanks_v{version}.zip", - "download_checksum": "6ab2b20730f56aa54263eb942be8849f52f9cba26438aee3c1b01103069411cc", - "version": version, - "executables": [ - { - "path": "Eyes' Thanks.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "48d232bd4a302b11378791eee844b42a2e30fe3553acf17a3b9e8ee0fcf27766", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "1.5.3" + result.append({ + "label": "Eyes-Thanks", + "manifests": [ + { + "download_url": f"https://github.com/yalov/eyes-thanks/releases/download/{version}/EyesThanks_v{version}.zip", + "download_checksum": "6ab2b20730f56aa54263eb942be8849f52f9cba26438aee3c1b01103069411cc", + "version": version, + "executables": [ + { + "path": "Eyes' Thanks.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "48d232bd4a302b11378791eee844b42a2e30fe3553acf17a3b9e8ee0fcf27766", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "0.4.29" + version = "0.4.29" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://cancel.fm/dl/Ripcord_Win_{version}.zip" + download_checksum = "c7a393ac669d02c16828706521833df06b690554368049545e47a1420fa8f04f" + checksum = "12d62abb9ad4db43c2b9b1398acae66857eb6e64205364631a3d3bda0ff17e2e" + exe_path = "ripcord.exe" + else: + exe_path = "Ripcord-{version}-x86_64.AppImage" + download_url = f"https://cancel.fm/dl/{exe_path}" + download_checksum = "e320cb3c4043b0f296b4bc1da664b29776f95c2c0b02bdbf115b4d46b1669899" + checksum = download_checksum + result.append({ "label": "Ripcord", "manifests": [ { - "download_url": f"https://cancel.fm/dl/Ripcord_Win_{version}.zip", - "download_checksum": "c7a393ac669d02c16828706521833df06b690554368049545e47a1420fa8f04f", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "ripcord.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": False, - "checksum": "12d62abb9ad4db43c2b9b1398acae66857eb6e64205364631a3d3bda0ff17e2e", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -1040,43 +1450,60 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "15.0.0" - result.append({ - "label": "ShareX", - "manifests": [ - { - "download_url": f"https://github.com/ShareX/ShareX/releases/download/v{version}/ShareX-{version}-portable.zip", - "download_checksum": "c3bc97e9fb8d107e92cb494b50f842fccafbc9fd810588a1b635aee4dbe90bc1", - "version": version, - "executables": [ - { - "path": "sharex.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "0b679c46c2940edc09cff8ae0b0f4578aeda0346b9c402276b166aee4ec864be", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "15.0.0" + result.append({ + "label": "ShareX", + "manifests": [ + { + "download_url": f"https://github.com/ShareX/ShareX/releases/download/v{version}/ShareX-{version}-portable.zip", + "download_checksum": "c3bc97e9fb8d107e92cb494b50f842fccafbc9fd810588a1b635aee4dbe90bc1", + "version": version, + "executables": [ + { + "path": "sharex.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "0b679c46c2940edc09cff8ae0b0f4578aeda0346b9c402276b166aee4ec864be", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "2023.01.06" + version = "2023.01.06" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://github.com/yt-dlp/yt-dlp/releases/download/{version}/yt-dlp.exe" + download_checksum = "2ff706a386a6890d4fd6871609e99248402959b149781feaeb41fede1c5efea1" + checksum = download_checksum + exe_path = "yt-dlp.exe" + else: + download_url = f"https://github.com/yt-dlp/yt-dlp/releases/download/{version}/yt-dlp_linux" + download_checksum = "none" + checksum = download_checksum + exe_path = "yt-dlp_linux" + result.append({ "label": "yt-dlp", "manifests": [ { - "download_url": f"https://github.com/yt-dlp/yt-dlp/releases/download/{version}/yt-dlp.exe", - "download_checksum": "2ff706a386a6890d4fd6871609e99248402959b149781feaeb41fede1c5efea1", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "yt-dlp.exe", - "symlink": ["yt-dlp.exe"], + "path": exe_path, + "symlink": [exe_path], "add_to_devenv_path": False, - "checksum": "2ff706a386a6890d4fd6871609e99248402959b149781feaeb41fede1c5efea1", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -1086,20 +1513,36 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "0.12" + version = "0.12" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://bitbucket.org/heldercorreia/speedcrunch/downloads/SpeedCrunch-{version}-win32.zip" + download_checksum = "024362bccd7908b508192cd90c2f6a716b5aa4fa5c7ff2aea9a1bf49d6580175" + checksum = "c80409586d6b36d315ce9462fd9020a12b07633a569d94a8ee057bcd18ee5647" + exe_path = "speedcrunch.exe" + else: + download_url = f"https://bitbucket.org/heldercorreia/speedcrunch/downloads/SpeedCrunch-{version}-linux64.tar.bz2" + download_checksum = "9347bef2068053ad15c5914ee147bf11a1ccb1d30cb18d63d0178380c327e8fc" + checksum = "none" + exe_path = "speedcrunch" + result.append({ "label": "SpeedCrunch", "manifests": [ { - "download_url": f"https://bitbucket.org/heldercorreia/speedcrunch/downloads/SpeedCrunch-{version}-win32.zip", - "download_checksum": "024362bccd7908b508192cd90c2f6a716b5aa4fa5c7ff2aea9a1bf49d6580175", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "speedcrunch.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": False, - "checksum": "c80409586d6b36d315ce9462fd9020a12b07633a569d94a8ee057bcd18ee5647", + "checksum": checksum, } ], "add_to_devenv_script": [], @@ -1109,20 +1552,36 @@ def get_manifest(): # -------------------------------------------------------------------------- - version = "2.7.4" + version = "2.7.4" + download_url = "" + download_checksum = "" + exe_path = "" + checksum = "" + + if is_windows: + download_url = f"https://github.com/keepassxreboot/keepassxc/releases/download/{version}/KeePassXC-{version}-Win64.zip" + download_checksum = "2ffb7a3289d008d3cd3ad0efffc3238d10a0ce176217d5e7bc34e1b59bcc644a" + checksum = "3102bb194dbc60e9ab4ba6c0024129893c8d845c1acf576aab0c05e607ef47ad" + exe_path = "KeePassXC.exe" + else: + exe_path = f"KeePassXC-{version}-x86_64.AppImage" + download_url = f"https://github.com/keepassxreboot/keepassxc/releases/download/{version}/{exe_path}" + download_checksum = "none" + checksum = "none" + result.append({ "label": "KeePassXC", "manifests": [ { - "download_url": f"https://github.com/keepassxreboot/keepassxc/releases/download/{version}/KeePassXC-{version}-Win64.zip", - "download_checksum": "2ffb7a3289d008d3cd3ad0efffc3238d10a0ce176217d5e7bc34e1b59bcc644a", + "download_url": download_url, + "download_checksum": download_checksum, "version": version, "executables": [ { - "path": "KeePassXC.exe", + "path": exe_path, "symlink": [], "add_to_devenv_path": False, - "checksum": "3102bb194dbc60e9ab4ba6c0024129893c8d845c1acf576aab0c05e607ef47ad", + "checksum": checksum, } ], "add_to_devenv_script": [], diff --git a/win_app_manifest_user.py b/win_app_manifest_user.py index ac8302c..89eab1c 100644 --- a/win_app_manifest_user.py +++ b/win_app_manifest_user.py @@ -1,51 +1,53 @@ -def get_manifest(): +def get_manifest(is_windows): result = [] # -------------------------------------------------------------------------- - version = "7.9.0" - result.append({ - "label": "digiKam", - "manifests": [ - { - "download_url": f"https://download.kde.org/stable/digikam/{version}/digiKam-{version}-Win64.tar.xz", - "download_checksum": "810476996461dc9275e97f1aa0438c77d0fe49f6ae5f6ae36fca983022dafe71", - "version": version, - "executables": [ - { - "path": "digikam.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "aebabac51581c4a0a8fd6950c728d5b8a2306b7251e5f9b1987a437f3576d2c8", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "7.9.0" + result.append({ + "label": "digiKam", + "manifests": [ + { + "download_url": f"https://download.kde.org/stable/digikam/{version}/digiKam-{version}-Win64.tar.xz", + "download_checksum": "810476996461dc9275e97f1aa0438c77d0fe49f6ae5f6ae36fca983022dafe71", + "version": version, + "executables": [ + { + "path": "digikam.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "aebabac51581c4a0a8fd6950c728d5b8a2306b7251e5f9b1987a437f3576d2c8", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- - version = "0.25.0" - result.append({ - "label": "PicoTorrent", - "manifests": [ - { - "download_url": f"https://github.com/picotorrent/picotorrent/releases/download/v{version}/PicoTorrent-{version}-x64.zip", - "download_checksum": "375c2445db76b7d51b7cd351b1c5b40f895fb15b502da6073e19aaf6cb08cd76", - "version": version, - "executables": [ - { - "path": "picotorrent.exe", - "symlink": [], - "add_to_devenv_path": False, - "checksum": "135adefb184d6a28d75b18fefebcd23e62005246664ff12f8af5687823630829", - } - ], - "add_to_devenv_script": [], - } - ], - }) + if is_windows: + version = "0.25.0" + result.append({ + "label": "PicoTorrent", + "manifests": [ + { + "download_url": f"https://github.com/picotorrent/picotorrent/releases/download/v{version}/PicoTorrent-{version}-x64.zip", + "download_checksum": "375c2445db76b7d51b7cd351b1c5b40f895fb15b502da6073e19aaf6cb08cd76", + "version": version, + "executables": [ + { + "path": "picotorrent.exe", + "symlink": [], + "add_to_devenv_path": False, + "checksum": "135adefb184d6a28d75b18fefebcd23e62005246664ff12f8af5687823630829", + } + ], + "add_to_devenv_script": [], + } + ], + }) # -------------------------------------------------------------------------- diff --git a/win_install.py b/win_install.py index 7542774..9df70f5 100644 --- a/win_install.py +++ b/win_install.py @@ -33,18 +33,15 @@ def git_clone(install_dir, git_exe, url, commit_hash): # Arguments # ------------------------------------------------------------------------------ -default_download_dir = devenver.script_dir / 'Downloads' -default_install_dir = devenver.script_dir / 'Win' - arg_parser = argparse.ArgumentParser() arg_parser.add_argument('--download-dir', - help=f'Set the directory where downloaded files are cached (default: {default_download_dir})', - default=default_download_dir, + help=f'Set the directory where downloaded files are cached (default: ./(Win|Linux))', + default="", type=pathlib.Path) arg_parser.add_argument('--install-dir', - help=f'Set the directory where downloaded files are installed (default: {default_install_dir})', - default=default_install_dir, + help=f'Set the directory where downloaded files are installed (default: ./Downloads)', + default="", type=pathlib.Path) arg_parser.add_argument('--with-dev-apps', @@ -57,9 +54,23 @@ arg_parser.add_argument('--with-user-apps', const=True, action="store_const") +arg_parser.add_argument('operating_system', + choices=['win', 'linux'], + help=f'Download and install apps for the specified operating system') + args = arg_parser.parse_args() download_dir = args.download_dir install_dir = args.install_dir +is_windows = args.operating_system == 'win' + +if download_dir == pathlib.Path(""): + download_dir = devenver.script_dir / 'Downloads' + +if install_dir == pathlib.Path(""): + if is_windows: + install_dir = devenver.script_dir / 'Win' + else: + install_dir = devenver.script_dir / 'Linux' # Install development apps # ------------------------------------------------------------------------------ @@ -67,162 +78,141 @@ if args.with_dev_apps: # Run DEVenver, installing the portable apps # -------------------------------------------------------------------------- dev_env_script_name = "dev_env" - app_list = win_app_manifest_dev.get_manifest() + app_list = win_app_manifest_dev.get_manifest(is_windows=is_windows) installed_dev_apps = devenver.run(user_app_list=app_list, download_dir=download_dir, install_dir=install_dir, - devenv_script_name=dev_env_script_name) + devenv_script_name=dev_env_script_name, + is_windows=is_windows) - # Install MSVC - # -------------------------------------------------------------------------- - devenver.print_header("Install MSVC & Windows 10 SDK") - msvc_script = devenver.script_dir / "win_portable_msvc.py" - msvc_version = "14.34" - win10_sdk_version = "22621" + if is_windows: + # Install MSVC + # -------------------------------------------------------------------------- + devenver.print_header("Install MSVC & Windows 10 SDK") + msvc_script = devenver.script_dir / "win_portable_msvc.py" + msvc_version = "14.34" + win10_sdk_version = "22621" - msvc_install_dir = install_dir / "msvc" + msvc_install_dir = install_dir / "msvc" - # Basic heuristic to see if we"ve already installed the MSVC/SDK version - msvc_installed = False - win10_sdk_installed = False + # Basic heuristic to see if we"ve already installed the MSVC/SDK version + msvc_installed = False + win10_sdk_installed = False - msvc_find_test_dir = msvc_install_dir / "VC/Tools/MSVC" - win10_sdk_find_test_dir = msvc_install_dir / "Windows Kits/10" + msvc_find_test_dir = msvc_install_dir / "VC/Tools/MSVC" + win10_sdk_find_test_dir = msvc_install_dir / "Windows Kits/10" - if os.path.exists(msvc_find_test_dir): - for file_name in os.listdir(msvc_find_test_dir): - msvc_installed = file_name.startswith(msvc_version) - if msvc_installed == True: - devenver.lprint(f"MSVC {msvc_version} install detected (skip download) in {msvc_find_test_dir}\\{file_name}") - break - if not msvc_installed: - devenver.lprint(f"MSVC {msvc_version} install not detected (need to download) in {msvc_find_test_dir}") + if os.path.exists(msvc_find_test_dir): + for file_name in os.listdir(msvc_find_test_dir): + msvc_installed = file_name.startswith(msvc_version) + if msvc_installed == True: + devenver.lprint(f"MSVC {msvc_version} install detected (skip download) in {msvc_find_test_dir}\\{file_name}") + break + if not msvc_installed: + devenver.lprint(f"MSVC {msvc_version} install not detected (need to download) in {msvc_find_test_dir}") - if os.path.exists(win10_sdk_find_test_dir): - for file_name in os.listdir(win10_sdk_find_test_dir / "bin"): - # Check if directory contains version substring, 22621, e.g. "10.0.22621.0" - win10_sdk_installed = file_name.count(win10_sdk_version) > 0 - if win10_sdk_installed == True: - install_locations = f"{win10_sdk_find_test_dir}\\*\\{file_name}" - devenver.lprint(f"Windows 10 SDK {win10_sdk_version} install detected (skip download) in {install_locations}") - break - if not win10_sdk_installed: - devenver.lprint(f"Windows 10 SDK {win10_sdk_version} not detected (need to download) in {win10_sdk_find_test_dir}") + if os.path.exists(win10_sdk_find_test_dir): + for file_name in os.listdir(win10_sdk_find_test_dir / "bin"): + # Check if directory contains version substring, 22621, e.g. "10.0.22621.0" + win10_sdk_installed = file_name.count(win10_sdk_version) > 0 + if win10_sdk_installed == True: + install_locations = f"{win10_sdk_find_test_dir}\\*\\{file_name}" + devenver.lprint(f"Windows 10 SDK {win10_sdk_version} install detected (skip download) in {install_locations}") + break + if not win10_sdk_installed: + devenver.lprint(f"Windows 10 SDK {win10_sdk_version} not detected (need to download) in {win10_sdk_find_test_dir}") - # Install MSVC - if msvc_installed == False or win10_sdk_installed == False: - with tempfile.TemporaryDirectory() as temp_dir: + # Install MSVC + if msvc_installed == False or win10_sdk_installed == False: + with tempfile.TemporaryDirectory() as temp_dir: - # Invoke the MSVC script to download MSVC to disk - command = f"\"{sys.executable}\" \"{msvc_script}\" --accept-license" - line = "Invoking MSVC script to install" - if msvc_installed: - command += " --no-msvc" - else: - command += f" --msvc-version {msvc_version}" - line += f" MSVC {msvc_version}" + # Invoke the MSVC script to download MSVC to disk + command = f"\"{sys.executable}\" \"{msvc_script}\" --accept-license" + line = "Invoking MSVC script to install" + if msvc_installed: + command += " --no-msvc" + else: + command += f" --msvc-version {msvc_version}" + line += f" MSVC {msvc_version}" - if win10_sdk_installed: - command += " --no-sdk" - else: - command += f" --sdk-version {win10_sdk_version}" - line += f" Windows 10 SDK {win10_sdk_version}" + if win10_sdk_installed: + command += " --no-sdk" + else: + command += f" --sdk-version {win10_sdk_version}" + line += f" Windows 10 SDK {win10_sdk_version}" - devenver.lprint(line) - devenver.lprint(f"Command: {command}") - subprocess.run(command, cwd=temp_dir) + devenver.lprint(line) + devenver.lprint(f"Command: {command}") + subprocess.run(command, cwd=temp_dir) - # Merge the download MSVC installation to our unified install dir - temp_msvc_dir = pathlib.Path(temp_dir, "msvc") - for src_dir, dirs, files in os.walk(temp_msvc_dir): - install_dir = src_dir.replace(str(temp_msvc_dir), str(msvc_install_dir), 1) - if not os.path.exists(install_dir): - os.makedirs(install_dir) - for file_ in files: - src = os.path.join(src_dir, file_) - dest = os.path.join(install_dir, file_) - if os.path.exists(dest): - if os.path.samefile(src, dest): - continue - os.remove(dest) - shutil.move(src, install_dir) + # Merge the download MSVC installation to our unified install dir + temp_msvc_dir = pathlib.Path(temp_dir, "msvc") + for src_dir, dirs, files in os.walk(temp_msvc_dir): + install_dir = src_dir.replace(str(temp_msvc_dir), str(msvc_install_dir), 1) + if not os.path.exists(install_dir): + os.makedirs(install_dir) + for file_ in files: + src = os.path.join(src_dir, file_) + dest = os.path.join(install_dir, file_) + if os.path.exists(dest): + if os.path.samefile(src, dest): + continue + os.remove(dest) + shutil.move(src, install_dir) - devenver.lprint(f"MSVC {msvc_version} Windows 10 SDK {win10_sdk_version} installed: {msvc_install_dir}") + devenver.lprint(f"MSVC {msvc_version} Windows 10 SDK {win10_sdk_version} installed: {msvc_install_dir}") - # Install apps dependent on Git - # -------------------------------------------------------------------------- - devenver.print_header("Install apps that rely on Git") - git_exe = installed_dev_apps["Git"][0]['exe_path'] + # Install apps dependent on Git + # -------------------------------------------------------------------------- + devenver.print_header("Install apps that rely on Git") + git_exe = installed_dev_apps["Git"][0]['exe_path'] - # Clink - # -------------------------------------------------------------------------- - clink_install_dir = installed_dev_apps["Clink"][0]['install_dir'] - clink_base_dir = clink_install_dir.parent + # Clink + # -------------------------------------------------------------------------- + clink_install_dir = installed_dev_apps["Clink"][0]['install_dir'] + clink_base_dir = clink_install_dir.parent - # Gizmos - clink_gizmo_git_hash = "fb2edd9" - clink_gizmo_install_dir = clink_base_dir / "clink-gizmos" - git_clone(install_dir=clink_gizmo_install_dir, - git_exe=git_exe, - url="https://github.com/chrisant996/clink-gizmos", - commit_hash=clink_gizmo_git_hash) + # Gizmos + clink_gizmo_git_hash = "fb2edd9" + clink_gizmo_install_dir = clink_base_dir / "clink-gizmos" + git_clone(install_dir=clink_gizmo_install_dir, + git_exe=git_exe, + url="https://github.com/chrisant996/clink-gizmos", + commit_hash=clink_gizmo_git_hash) - # Completions - clink_completions_git_hash = "86b6f07" - clink_completions_install_dir = clink_base_dir / "clink-completions" - git_clone(install_dir=clink_completions_install_dir, - git_exe=git_exe, - url="https://github.com/vladimir-kotikov/clink-completions", - commit_hash=clink_completions_git_hash) + # Completions + clink_completions_git_hash = "86b6f07" + clink_completions_install_dir = clink_base_dir / "clink-completions" + git_clone(install_dir=clink_completions_install_dir, + git_exe=git_exe, + url="https://github.com/vladimir-kotikov/clink-completions", + commit_hash=clink_completions_git_hash) - # Odin - # -------------------------------------------------------------------------- - odin_git_hash = "9ae1bfb6" - odin_install_dir = install_dir / "Odin" - git_clone(install_dir=odin_install_dir, - git_exe=git_exe, - url="https://github.com/odin-lang/odin.git", - commit_hash=odin_git_hash) + # Odin + # -------------------------------------------------------------------------- + odin_git_hash = "9ae1bfb6" + odin_install_dir = install_dir / "Odin" + git_clone(install_dir=odin_install_dir, + git_exe=git_exe, + url="https://github.com/odin-lang/odin.git", + commit_hash=odin_git_hash) - # TODO: We can't do this yet because the odin build requires a registry hack so - # that it knows where to find MSVC. + # TODO: We can't do this yet because the odin build requires a registry hack so + # that it knows where to find MSVC. - # Build Odin - # subprocess.run(f"{git_exe} checkout {odin_git_hash}", - # cwd=odin_install_dir) + # Build Odin + # subprocess.run(f"{git_exe} checkout {odin_git_hash}", + # cwd=odin_install_dir) - # Install left-overs - # -------------------------------------------------------------------------- - devenver.print_header("Install configuration files") + # Install clink configuration + # -------------------------------------------------------------------------- + clink_profile_dir = clink_base_dir / "profile" + clink_settings_path = clink_profile_dir / "clink_settings" + devenver.lprint(f"Installing clink_settings to: {clink_settings_path}") - # Copy init.vim to NVIM directory - internal_dir = pathlib.Path(os.path.dirname(os.path.abspath(__file__))) / "Internal" - nvim_init_dir = pathlib.Path(os.path.expanduser("~")) / "AppData" / "Local" / "nvim" - nvim_config_dest_path = nvim_init_dir / "init.vim" - nvim_config_src_path = internal_dir / "os_nvim_init.vim" - - devenver.lprint(f"Installing NVIM config to {nvim_config_dest_path}") - nvim_init_dir.mkdir(parents=True, exist_ok=True) - shutil.copy(nvim_config_src_path, nvim_config_dest_path) - - # Download vim.plug to NVIM init directory - nvim_plug_vim_dir = nvim_init_dir / "autoload" - nvim_plug_vim_path = nvim_plug_vim_dir / "plug.vim" - nvim_plug_vim_dir.mkdir(parents=True, exist_ok=True) - if not os.path.exists(nvim_plug_vim_path): - devenver.lprint(f"Installing NVIM plugin manager to {nvim_plug_vim_path}") - urllib.request.urlretrieve("https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim", - nvim_plug_vim_path) - - # Install clink configuration - # -------------------------------------------------------------------------- - clink_profile_dir = clink_base_dir / "profile" - clink_settings_path = clink_profile_dir / "clink_settings" - devenver.lprint(f"Installing clink_settings to: {clink_settings_path}") - - clink_settings_path.parent.mkdir(exist_ok=True) - clink_settings_path.write_text(f"""# When this file is named "default_settings" and is in the binaries + clink_settings_path.parent.mkdir(exist_ok=True) + clink_settings_path.write_text(f"""# When this file is named "default_settings" and is in the binaries # directory or profile directory, it provides enhanced default settings. # Override built-in default settings with ones that provide a more @@ -260,16 +250,16 @@ clink.path = {clink_completions_install_dir};{clink_gizmo fzf.default_bindings = True """) - # Install wezterm configuration - # -------------------------------------------------------------------------- - wezterm_config_dest_path = installed_dev_apps["WezTerm"][0]["install_dir"] / "wezterm.lua" - devenver.lprint(f"Installing WezTerm config to {wezterm_config_dest_path}") + # Install wezterm configuration + # -------------------------------------------------------------------------- + wezterm_config_dest_path = installed_dev_apps["WezTerm"][0]["install_dir"] / "wezterm.lua" + devenver.lprint(f"Installing WezTerm config to {wezterm_config_dest_path}") - clink_exe_path = clink_install_dir.relative_to(install_dir) / "clink_x64.exe" - clink_exe_path_for_wezterm = str(clink_exe_path).replace("\\", "\\\\") - clink_profile_path_for_wezterm = str(clink_profile_dir.relative_to(install_dir)).replace("\\", "\\\\") + clink_exe_path = clink_install_dir.relative_to(install_dir) / "clink_x64.exe" + clink_exe_path_for_wezterm = str(clink_exe_path).replace("\\", "\\\\") + clink_profile_path_for_wezterm = str(clink_profile_dir.relative_to(install_dir)).replace("\\", "\\\\") - wezterm_config_dest_path.write_text(f"""local wezterm = require 'wezterm'; + wezterm_config_dest_path.write_text(f"""local wezterm = require 'wezterm'; local default_prog local set_environment_variables = {{}} @@ -302,12 +292,12 @@ return {{ }} """) - # Wezterm super terminal - # -------------------------------------------------------------------------- - wezterm_terminal_script_path = install_dir / "dev_terminal.bat" - devenver.lprint(f"Installing WezTerm terminal script to {wezterm_terminal_script_path}") + # Wezterm super terminal + # -------------------------------------------------------------------------- + wezterm_terminal_script_path = install_dir / "dev_terminal.bat" + devenver.lprint(f"Installing WezTerm terminal script to {wezterm_terminal_script_path}") - wezterm_terminal_script_path.write_text(f"""@echo off + wezterm_terminal_script_path.write_text(f"""@echo off setlocal EnableDelayedExpansion set working_dir= @@ -319,12 +309,12 @@ if "%~1" neq "" ( start "" /MAX "%~dp0{installed_dev_apps["WezTerm"][0]["exe_path"].relative_to(install_dir)}" !working_dir! """) - # Run background scripts helper - # -------------------------------------------------------------------------- - background_apps_script_path = install_dir / "dev_run_background_apps.bat" - devenver.lprint(f"Installing run background script (helper) to {background_apps_script_path}") + # Run background scripts helper + # -------------------------------------------------------------------------- + background_apps_script_path = install_dir / "dev_run_background_apps.bat" + devenver.lprint(f"Installing run background script (helper) to {background_apps_script_path}") - background_apps_script_path.write_text(f"""@echo off + background_apps_script_path.write_text(f"""@echo off start "" "%~dp0{installed_dev_apps["Everything"][0]["exe_path"].relative_to(install_dir)}" REM Ensure that eyes-thanks creates their portable INI file in the correct directory @@ -336,49 +326,49 @@ start "" "%~dp0{installed_dev_apps["ShareX"][0]["exe_path"].relative_to(install_ start "" "%~dp0{installed_dev_apps["SpeedCrunch"][0]["exe_path"].relative_to(install_dir)}" """) - # Create Odin work-around scripts - # -------------------------------------------------------------------------- - # Odin uses J. Blow's Microsoft craziness SDK locator which relies on the - # registry. Here we inject the registry entry that the SDK locator checks for - # finding our portable MSVC installation. - win10_sdk_find_test_dir_reg_path = str(win10_sdk_find_test_dir).replace("\\", "\\\\") + # Create Odin work-around scripts + # -------------------------------------------------------------------------- + # Odin uses J. Blow's Microsoft craziness SDK locator which relies on the + # registry. Here we inject the registry entry that the SDK locator checks for + # finding our portable MSVC installation. + win10_sdk_find_test_dir_reg_path = str(win10_sdk_find_test_dir).replace("\\", "\\\\") - odin_msvc_install_script_path = install_dir / "odin_msvc_install_workaround.reg" - odin_msvc_uninstall_script_path = install_dir / "odin_msvc_uninstall_workaround.reg" + odin_msvc_install_script_path = install_dir / "odin_msvc_install_workaround.reg" + odin_msvc_uninstall_script_path = install_dir / "odin_msvc_uninstall_workaround.reg" - devenver.lprint(f"Installing Odin MSVC workaround scripts", level=0) - devenver.lprint(f" - {odin_msvc_install_script_path}", level=1) - devenver.lprint(f" - {odin_msvc_uninstall_script_path}", level=1) + devenver.lprint(f"Installing Odin MSVC workaround scripts", level=0) + devenver.lprint(f" - {odin_msvc_install_script_path}", level=1) + devenver.lprint(f" - {odin_msvc_uninstall_script_path}", level=1) - odin_msvc_install_script_path.write_text(f"""Windows Registry Editor Version 5.00 + odin_msvc_install_script_path.write_text(f"""Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots] "KitsRoot10"="{win10_sdk_find_test_dir_reg_path}" """) - odin_msvc_uninstall_script_path.write_text(f"""Windows Registry Editor Version 5.00 + odin_msvc_uninstall_script_path.write_text(f"""Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots] "KitsRoot10"=- """) - # Python - # -------------------------------------------------------------------------- - # TODO: If I'm using the terminal that this script generates it will lock the - # executable and Python cannot open the file for verifying the SHA256. + # Python + # -------------------------------------------------------------------------- + # TODO: If I'm using the terminal that this script generates it will lock the + # executable and Python cannot open the file for verifying the SHA256. - python_exe_path = pathlib.Path(installed_dev_apps["Python"][0]['exe_path']) + python_exe_path = pathlib.Path(installed_dev_apps["Python"][0]['exe_path']) - # PyNvim - devenver.lprint(f"Installing PyNVIM") - subprocess.run(f"{python_exe_path} -m pip install pynvim") + # PyNvim + devenver.lprint(f"Installing PyNVIM") + subprocess.run(f"{python_exe_path} -m pip install pynvim") - # Add update script - python_rel_exe_path = pathlib.Path(python_exe_path).relative_to(install_dir) - python_install_dir = pathlib.Path(python_exe_path).parent.relative_to(install_dir) - win_setup_script_path = pathlib.Path(devenver.script_dir, "win_install.py") + # Add update script + python_rel_exe_path = pathlib.Path(python_exe_path).relative_to(install_dir) + python_install_dir = pathlib.Path(python_exe_path).parent.relative_to(install_dir) + win_setup_script_path = pathlib.Path(devenver.script_dir, "win_install.py") - (install_dir / "dev_env_update.bat").write_text(f"""@echo off + (install_dir / "dev_env_update.bat").write_text(f"""@echo off setlocal EnableDelayedExpansion set PYTHONHOME=%~dp0{python_install_dir} %~dp0{python_rel_exe_path} {win_setup_script_path} --with-dev-apps @@ -392,11 +382,42 @@ set PYTHONHOME=%~dp0{python_install_dir} pause """) + # Install left-overs + # -------------------------------------------------------------------------- + devenver.print_header("Install configuration files") + + # Copy init.vim to NVIM directory + internal_dir = pathlib.Path(os.path.dirname(os.path.abspath(__file__))) / "Internal" + nvim_init_dir = "" + + if is_windows: + nvim_init_dir = pathlib.Path(os.path.expanduser("~")) / "AppData" / "Local" / "nvim" + else: + nvim_init_dir = pathlib.Path(os.path.expanduser("~")) / ".config" / "nvim" + + nvim_config_dest_path = nvim_init_dir / "init.vim" + nvim_config_src_path = internal_dir / "os_nvim_init.vim" + + devenver.lprint(f"Installing NVIM config to {nvim_config_dest_path}") + nvim_init_dir.mkdir(parents=True, exist_ok=True) + shutil.copy(nvim_config_src_path, nvim_config_dest_path) + + # Download vim.plug to NVIM init directory + nvim_plug_vim_dir = nvim_init_dir / "autoload" + nvim_plug_vim_path = nvim_plug_vim_dir / "plug.vim" + nvim_plug_vim_dir.mkdir(parents=True, exist_ok=True) + if not os.path.exists(nvim_plug_vim_path): + devenver.lprint(f"Installing NVIM plugin manager to {nvim_plug_vim_path}") + urllib.request.urlretrieve("https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim", + nvim_plug_vim_path) + + # Install user apps # ------------------------------------------------------------------------------ if args.with_user_apps: - app_list = win_app_manifest_user.get_manifest() + app_list = win_app_manifest_user.get_manifest(is_windows=is_windows) installed_user_apps = devenver.run(user_app_list=app_list, download_dir=download_dir, install_dir=install_dir, - devenv_script_name="user_env") + devenv_script_name="user_env", + is_windows=True)