-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsrxdbepinexinstaller.py
More file actions
50 lines (41 loc) · 1.34 KB
/
srxdbepinexinstaller.py
File metadata and controls
50 lines (41 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from modules.args import ArgsUtils
from modules.steamutils import SteamUtils
from modules.github import GitHubUtils
# from modules.gui import GuiUtils
from modules.installer import Installer
from modules.args import ArgsUtils
def main():
# Init Arg Vars
uninstall = False
# Parse Args
argsutils = ArgsUtils()
for index, arg in enumerate(argsutils.getArgs()):
if arg == "uninstall":
uninstall = True
# Init Steam Module
print("Getting Steam Info...")
steamutils = SteamUtils()
if(steamutils.gameDirectory == ""):
steamutils.inputPathIfEmpty()
print(f"Found Game Path: {steamutils.gameDirectory}")
# Init Installer Module
installer = Installer(steamutils.gameDirectory)
if (uninstall):
if(steamutils.gameDirectory == ""):
steamutils.inputPathIfEmpty()
installer.uninstall()
# Do rest of work:
else:
# Init BepInEx Webpage
print("\nGetting Info from BepInEx Bleeding Edge Website...")
bepinutils = GitHubUtils()
# Get Download URL
url = bepinutils.downloadURLs[0]
print(f"Found BepInExURL: {url}")
# Run installer
installer.install(bepinUrl=url, installUnityLibs=False)
try:
main()
except Exception as e:
print(f'Exception: "{e}"')
input("Press any Key to Close...")