-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGEO11_MM.py
152 lines (98 loc) · 3.28 KB
/
GEO11_MM.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import os
import webview
import run
from time import sleep
from structured import copy_move_setup
import run
###########################################
###########################################
dirname = os.path.dirname(__file__)
###########################################
###########################################
def on_bridge(window):
# Fire the onbridge function which indicates pywebview is ready
window.evaluate_js("if(window.onbridge){window.onbridge();}")
##########################################
#############Javascript_Entry#############
##########################################
class Api:
def importsteam(self):
response = run.importsteam()
return response
def install(self, id):
run.install_process(id)
def printer(self, val):
print(val)
return val
# Api.install('', 63)
# test install above uncomment
##########################################
#############Start Pywebview Html#########
##########################################
api = Api()
window = webview.create_window('GEO11',
'libber\index.html',
js_api=api,
width=1250,
height=900)
webview.start(on_bridge, window)
##################################################
##################1/14/22 below###################
##################################################
# def checker(window):
# pass
# lib = parse.main()
# vals = ''
# for i in lib[0]:
# vals = vals + str(js.javascript(str(i.name), str(i.exe), str(i.path)))
# try:
# elements = window.get_elements('tabler')
# elements[0]['innerHTML'] = vals
# except:
# pass
# # lib = parse.main()
# vals = ''
# for i in lib[0]:
# if i.longpath != 'xxxx':
# val = js.javascript(str(i.name), str(i.exe), str(i.path))
# vals = vals + val
# try:
# elements = window.get_elements('tabler')
# elements[0]['innerHTML'] = vals
# except:
# print('')
# time.sleep(0.1)
# storage = vals
##########################################
##########################################
##########################################
# 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. ")