-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
86 lines (71 loc) · 1.58 KB
/
main.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
#! python
#By toutpuissantged
from loader import *
mixer.init()
root = Tk()
root.size()
root.iconbitmap('asset/img/main.jpg')
lang=langInit("public/lang/"+env['userLang']+"/config.json",json)
root.title(lang['main']['title'])
logo = PhotoImage(file="asset/img/main.jpg")
global props
props={
'root':root,
'music':music,
'filedialog':filedialog,
'defaultdir':env['defaultdir'],
'lang':lang,
'finish':finish,
'zipfile':zipfile,
'ext':ext,
'langPop':langPop,
'extractor':{
'here':ext_here,
'to':ext_to
},
'ext_ui':{
'filedir':'',
'filedir2':'',
'finishswetch':0
},
'db':{
'name':'auth.db',
'dir':'database/'
},
'auth':{
'root':'',
'Login':'',
'Password':'',
'ErrMsg':'',
'valide':0,
'conter':0,
},
'env':{
'main':{
'version':env['version'],
'p1open':env['p1open'],
'SIDEX':env['SIDEX'],
'SIDEY':env['SIDEY'],
'userLang':env['userLang'],
'defaultdir':env['defaultdir'],
'jsonDir':"public\\lang\\"+env['userLang']+"\\config.json",
'logo':logo,
}
}
}
DATABASE=props['db']['dir']+props['db']['name']
result=connexion(DATABASE,'login' ,'password')
print(result)
print('ok ca marche')
dbexist=True
try :
conn=sqlite3.connect(DATABASE)
print('connexion reussi')
except :
print('connexion echouer')
dbexist=False
if dbexist:
root_monted(props)
else:
auth_valide=root_auth(props)
root.mainloop()