-
Notifications
You must be signed in to change notification settings - Fork 3
/
run.py
64 lines (46 loc) · 1.53 KB
/
run.py
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import os.path
dirname = os.path.dirname(__file__)
from pathlib import Path
dirname = Path(__file__).parent.parent.parent
with open("logger.txt", "w") as f:
f.write(str(dirname))
f.write("\n")
f.write(str(os.path.join(dirname, "libber\\msgbox.exe")))
from structured import path
import subprocess
from structured import sqlbuilder as SqL
from structured import javascriptpywebview as js
from structured import parse
from structured.copy_move_setup import move_copy
import utilities
def directory():
return dirname
def msgbox(msg):
msgbox = os.path.join(dirname, "libber\\msgbox.exe")
subprocess.call([msgbox, f"{msg}"])
def importsteam():
try:
test = SqL.test()
insert_html = SqL.initial_retrieve()
print('log place 1')
print(insert_html[1])
except:
lib = parse.main() # parse steam library
SqL.loop_insert(lib) # save to sql
insert_html = js.Import.run(lib)
print("\nError: Database already exists")
response = {'message': insert_html}
return response
def install_process(id):
msgbox("Installing...")
try:
install_game = SqL.get_game_details(id)
except:
msgbox("Error, game not found")
if install_game == 1:
msgbox("this game is already installed")
else:
# game_deets[0] = path, [1] = name
saucedest = move_copy(install_game)
utilities.installer(saucedest[0], saucedest[1])
msgbox("Complete! \nFind the Geo11 Launcher to play. ")