File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,19 +13,23 @@ if not FFMPEG_PATH:
1313
1414DATA_FILES = [('backend/static' , 'backend/static' )]
1515
16+ HIDDEN_IMPORTS = [
17+ 'backend.api' ,
18+ 'webview' ,
19+ ]
20+
21+ if sys .platform .startswith ('win' ):
22+ HIDDEN_IMPORTS .append ('webview.platforms.edgechromium' )
23+ elif sys .platform == 'darwin' :
24+ HIDDEN_IMPORTS .append ('webview.platforms.cocoa' )
25+
1626
1727a = Analysis (
1828 ['desktop_launcher.py' ],
1929 pathex = [],
2030 binaries = [(FFMPEG_PATH , 'ffmpeg_bin' )],
2131 datas = DATA_FILES ,
22- hiddenimports = [
23- 'backend.api' ,
24- 'webview' ,
25- 'webview.platforms.cocoa' ,
26- 'webview.platforms.edgechromium' ,
27- 'webview.platforms.winforms' ,
28- ],
32+ hiddenimports = HIDDEN_IMPORTS ,
2933 hookspath = [],
3034 hooksconfig = {},
3135 runtime_hooks = [],
Original file line number Diff line number Diff line change @@ -134,7 +134,10 @@ def main() -> None:
134134 min_size = (900 , 700 ),
135135 js_api = DesktopApi (),
136136 )
137- webview .start ()
137+ if sys .platform .startswith ("win" ):
138+ webview .start (gui = "edgechromium" )
139+ else :
140+ webview .start ()
138141
139142
140143if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments