File tree 1 file changed +19
-7
lines changed
1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change 10
10
11
11
app_path = "app.py"
12
12
app_name = "Tuttle"
13
- icon_path = "tuttle/app/assets/icon/macos/AppIcon.icns"
13
+
14
+
15
+ def get_icon_path ():
16
+ if sys .platform .startswith ("darwin" ):
17
+ icon_path = "tuttle/app/assets/icon/macos/AppIcon.icns"
18
+ else :
19
+ icon_path = "tuttle/app/assets/icon/web/icon-512-maskable.png"
20
+ return icon_path
21
+
14
22
15
23
# files to be added to the app bundle
16
24
added_files = [
21
29
# options to be passed to flet pack
22
30
pack_options = [
23
31
("--name" , app_name ),
24
- ("--icon" , icon_path ),
32
+ ("--icon" , get_icon_path () ),
25
33
("--product-name" , app_name ),
26
34
("--product-version" , tuttle .__version__ ),
27
35
("--copyright" , "© 2021-2023 Tuttle developers. Licsened under the GNU GPL v3.0." ),
28
36
]
29
37
30
- if sys .platform .startswith ("win" ):
31
- delimiter = ";"
32
- else :
33
- delimiter = ":"
38
+
39
+ def get_delimiter ():
40
+ if sys .platform .startswith ("win" ):
41
+ delimiter = ";"
42
+ else :
43
+ delimiter = ":"
44
+ return delimiter
45
+
34
46
35
47
added_data_options = []
36
48
for src , dst in added_files :
37
- added_data_options += ["--add-data" , f"{ src } { delimiter } { dst } " ]
49
+ added_data_options += ["--add-data" , f"{ src } { get_delimiter () } { dst } " ]
38
50
pack_options_unpacked = [item for pair in pack_options for item in pair ]
39
51
40
52
You can’t perform that action at this time.
0 commit comments