diff --git a/modules/installer.py b/modules/installer.py index 75f74d2..a11dfc4 100644 --- a/modules/installer.py +++ b/modules/installer.py @@ -19,7 +19,7 @@ def __init__(self, gameDirectory): self.gameDirectory = gameDirectory return - def install(self, bepinUrl): + def install(self, bepinUrl:str, installUnityLibs:bool): print("The Default (Preferred) Version is Now 353. If you'd Like to Try Something Newer, Please Select A Newer Version.") # Downloads BepInEx and extracts to Steam Library print("\nDownloading and Installing BepInEx") @@ -28,8 +28,9 @@ def install(self, bepinUrl): bepinPath = os.path.join(self.gameDirectory, "BepInEx") # Downloads Unity-Libs and extracts to Steam Library - print("\nDownloading and Extracting Unity Libraries") - self.utils.downloadFileAndUnzip(self.unitylibsutils.githubRawUrl, os.path.join(bepinPath, "unity-libs")) + if (installUnityLibs): + print("\nDownloading and Extracting Unity Libraries") + self.utils.downloadFileAndUnzip(self.unitylibsutils.githubRawUrl, os.path.join(bepinPath, "unity-libs")) try: DirectoryFiller(self.gameDirectory).fillWithBepinExFolders() diff --git a/srxdbepinexinstaller.py b/srxdbepinexinstaller.py index e4f947d..1824d56 100644 --- a/srxdbepinexinstaller.py +++ b/srxdbepinexinstaller.py @@ -40,7 +40,7 @@ def main(): print(f"Found BepInExURL: {url}") # Run installer - installer.install(bepinUrl=url) + installer.install(bepinUrl=url, installUnityLibs=True) try: main() except Exception as e: diff --git a/srxdbepinexinstallerui.pyw b/srxdbepinexinstallerui.pyw index 7b10cc1..2b3f25e 100644 --- a/srxdbepinexinstallerui.pyw +++ b/srxdbepinexinstallerui.pyw @@ -112,8 +112,11 @@ class GUIWindow: installerInstance = Installer(self.steamutils.gameDirectory) installthread = None if (not isUninstall and self.canInstall): + installUnityLibs = True downloadUrl = self.bepinutils.downloadURLs[self.bepinutils.downloadVersions.index(self.selectedVersion.get())] - installthread = threading.Thread(target=installerInstance.install, args=(downloadUrl,), daemon=True).start() + if (int(self.selectedVersion.get()) >= 378): + installUnityLibs = False + installthread = threading.Thread(target=installerInstance.install, args=(downloadUrl, installUnityLibs), daemon=True).start() elif (isUninstall): installthread = threading.Thread(target=installerInstance.uninstall, daemon=True).start() else: