chore(scripts): add submodule management batch file

Added a batch file for managing Git submodules:
- Submodule cleanup and reinitialization script.
- Submodule deinitialization and re-addition script.
This commit is contained in:
Phoenix 2024-09-07 20:19:40 +10:00
parent 121bebcdf7
commit 31053f81e2

View File

@ -0,0 +1,99 @@
@echo off
title Uzuy X - Tool [Submodule]
REM Phoenix ASCII Logo
echo.
echo  /\
echo  //\\
echo  // \\
echo  // \\
echo  // \\
echo  //________\\
echo  \\ //
echo  \\ //
echo  \\ //
echo  \\ //
echo  \//
echo Proceed with warning!
timeout /t 5
echo Deinitializing submodules...
git submodule deinit -f --all
echo Removing submodule entries from Git index...
git rm -f externals/enet
git rm -f externals/cubeb
git rm -f externals/dynarmic
git rm -f externals/libusb/libusb
git rm -f externals/discord-rpc
git rm -f externals/Vulkan-Headers
git rm -f externals/sirit
git rm -f externals/mbedtls
git rm -f externals/xbyak
git rm -f externals/opus
git rm -f externals/SDL
git rm -f externals/cpp-httplib
git rm -f externals/ffmpeg/ffmpeg
git rm -f externals/vcpkg
git rm -f externals/cpp-jwt
git rm -f externals/libadrenotools
git rm -f externals/nx_tzdb/tzdb_to_nx
git rm -f externals/VulkanMemoryAllocator
git rm -f externals/breakpad
git rm -f externals/simpleini
git rm -f externals/oaknut
git rm -f externals/Vulkan-Utility-Libraries
echo Removing submodule directories...
rmdir /S /Q externals/enet
rmdir /S /Q externals/cubeb
rmdir /S /Q externals/dynarmic
rmdir /S /Q externals/libusb/libusb
rmdir /S /Q externals/discord-rpc
rmdir /S /Q externals/Vulkan-Headers
rmdir /S /Q externals/sirit
rmdir /S /Q externals/mbedtls
rmdir /S /Q externals/xbyak
rmdir /S /Q externals/opus
rmdir /S /Q externals/SDL
rmdir /S /Q externals/cpp-httplib
rmdir /S /Q externals/ffmpeg/ffmpeg
rmdir /S /Q externals/vcpkg
rmdir /S /Q externals/cpp-jwt
rmdir /S /Q externals/libadrenotools
rmdir /S /Q externals/nx_tzdb/tzdb_to_nx
rmdir /S /Q externals/VulkanMemoryAllocator
rmdir /S /Q externals/breakpad
rmdir /S /Q externals/simpleini
rmdir /S /Q externals/oaknut
rmdir /S /Q externals/Vulkan-Utility-Libraries
echo Adding submodules...
git submodule add https://github.com/lsalzman/enet.git externals/enet
git submodule add https://github.com/mozilla/cubeb.git externals/cubeb
git submodule add https://github.com/PabloMK7/dynarmic.git externals/dynarmic
git submodule add https://github.com/libusb/libusb.git externals/libusb/libusb
git submodule add https://github.com/uzuy-emu/discord-rpc.git externals/discord-rpc
git submodule add https://github.com/KhronosGroup/Vulkan-Headers.git externals/Vulkan-Headers
git submodule add https://github.com/uzuy-emu/sirit.git externals/sirit
git submodule add https://github.com/uzuy-emu/mbedtls.git externals/mbedtls
git submodule add https://github.com/herumi/xbyak.git externals/xbyak
git submodule add https://github.com/xiph/opus.git externals/opus
git submodule add https://github.com/libsdl-org/SDL.git externals/SDL
git submodule add https://github.com/yhirose/cpp-httplib.git externals/cpp-httplib
git submodule add https://github.com/FFmpeg/FFmpeg.git externals/ffmpeg/ffmpeg
git submodule add https://github.com/microsoft/vcpkg.git externals/vcpkg
git submodule add https://github.com/arun11299/cpp-jwt.git externals/cpp-jwt
git submodule add https://github.com/bylaws/libadrenotools.git externals/libadrenotools
git submodule add https://github.com/lat9nq/tzdb_to_nx.git externals/nx_tzdb/tzdb_to_nx
git submodule add https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git externals/VulkanMemoryAllocator
git submodule add https://github.com/uzuy-emu/breakpad.git externals/breakpad
git submodule add https://github.com/brofield/simpleini.git externals/simpleini
git submodule add https://github.com/merryhime/oaknut externals/oaknut
git submodule add https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git externals/Vulkan-Utility-Libraries
echo Updating submodules recursively...
git submodule update --init --recursive
echo Done!
pause