File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed
Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change 1010
1111app_path = "app.py"
1212app_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+
1422
1523# files to be added to the app bundle
1624added_files = [
2129# options to be passed to flet pack
2230pack_options = [
2331 ("--name" , app_name ),
24- ("--icon" , icon_path ),
32+ ("--icon" , get_icon_path () ),
2533 ("--product-name" , app_name ),
2634 ("--product-version" , tuttle .__version__ ),
2735 ("--copyright" , "© 2021-2023 Tuttle developers. Licsened under the GNU GPL v3.0." ),
2836]
2937
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+
3446
3547added_data_options = []
3648for 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 } " ]
3850pack_options_unpacked = [item for pair in pack_options for item in pair ]
3951
4052
You can’t perform that action at this time.
0 commit comments