-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
48 lines (36 loc) · 1.06 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
# -*- coding: utf-8 -*-
__version__ = "1.0.3"
def main():
import os
from pathlib import Path
import certifi
from kivy.utils import platform
os.environ["KIVY_IMAGE"] = "pil,sdl2"
os.environ["SSL_CERT_FILE"] = certifi.where()
if platform != "android":
from kivy.core.window import Window
Window.size = (720, 1440)
Window.minimum_height = 1000
Window.minimum_width = 600
else:
from android.permissions import Permission, request_permissions
request_permissions(
[Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE]
)
from app_controller.client import Client
from app_view.app import MobileApp
from app_view.platform_specs import app_dir_path
app = MobileApp(
Client(
"",
"",
max_len=100,
max_age=60**2,
filepath=__file__,
verbose=True,
destination=str(Path(app_dir_path) / ".cache.dat"),
)
)
app.run()
if __name__ == "__main__":
main()