From 6c3d2d8102cd2e108606874015f04242bf1c3299 Mon Sep 17 00:00:00 2001 From: royna2544 Date: Mon, 2 Dec 2024 22:27:45 +0900 Subject: [PATCH] Add simple script msys2 helper --- resources/scripts/install_cmd_for_msys2.py | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 resources/scripts/install_cmd_for_msys2.py diff --git a/resources/scripts/install_cmd_for_msys2.py b/resources/scripts/install_cmd_for_msys2.py new file mode 100644 index 00000000..895688e9 --- /dev/null +++ b/resources/scripts/install_cmd_for_msys2.py @@ -0,0 +1,28 @@ +packages = [ + 'libxml2', + 'libwebp', + 'opencv', + 'sqlite', + 'fmt', + 'cmake', + 'toolchain', + 'boost', + 'libgit2' +] + +mappings = { + 'ucrt64': 'mingw-w64-ucrt-x86_64', + 'mingw32': 'mingw-w64-i686', + 'mingw64': 'mingw-w64-x86_64', + 'clang': 'mingw-w64-clang-x86_64', +} + +def main(): + selected = input(f'Select a runtime. ({'/'.join([l for l in mappings.keys()])}): ') + if selected not in mappings: + print('Invalid runtime selected.') + return + print(f'Command is:\npacman -S {' '.join([f'{mappings[selected]}-{i}' for i in packages])}') + +if __name__ == "__main__": + main() \ No newline at end of file