From f1147db37fea8d896984f7a2a6a7adde072e8904 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Sat, 5 Oct 2024 08:57:42 +0900 Subject: [PATCH] windows: build mavpicviewer executables --- windows/mavproxy.spec | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/windows/mavproxy.spec b/windows/mavproxy.spec index dc1db8a63b..7f0398913d 100755 --- a/windows/mavproxy.spec +++ b/windows/mavproxy.spec @@ -35,7 +35,21 @@ MAVExpAny = Analysis(['.\\tools\\MAVExplorer.py'], hookspath=None, runtime_hooks=None, excludes= ['sphinx', 'docutils', 'alabaster', 'FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter']) -# MERGE( (MAVProxyAny, 'mavproxy', 'mavproxy'), (MAVExpAny, 'MAVExplorer', 'MAVExplorer') ) +MAVPicViewerAny = Analysis(['.\\tools\\mavpicviewer\\mavpicviewer.py'], + pathex=[os.path.abspath('.')], + # for some unknown reason these hidden imports don't pull in + # all the needed pieces, so we also import them in mavproxy.py + hiddenimports=['cv2', 'wx', + 'numpy', 'dateutil', + 'wx.lib.agw.genericmessagedialog', 'wx.lib.wordwrap', 'wx.lib.buttons', + 'wx.lib.embeddedimage', 'wx.lib.imageutils', 'wx.lib.agw.aquabutton', + 'wx.lib.agw.gradientbutton', 'FileDialog', 'Dialog', + ] + collect_submodules('pymavlink'), + datas= [], + hookspath=None, + runtime_hooks=None, + excludes= ['sphinx', 'docutils', 'alabaster', 'FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter']) +# MERGE( (MAVProxyAny, 'mavproxy', 'mavproxy'), (MAVExpAny, 'MAVExplorer', 'MAVExplorer'), (MAVPicViewerAny, 'mavpicviewer', 'mavpicviewer') ) MAVProxy_pyz = PYZ(MAVProxyAny.pure) MAVProxy_exe = EXE(MAVProxy_pyz, MAVProxyAny.scripts, @@ -69,3 +83,20 @@ MAVExp_coll = COLLECT(MAVExp_exe, strip=None, upx=True, name='MAVExplorer') + +MAVPicViewer_pyz = PYZ(MAVPicViewerAny.pure) +MAVPicViewer_exe = EXE(MAVPicViewer_pyz, + MAVPicViewerAny.scripts, + exclude_binaries=True, + name='mavpicviewer.exe', + debug=False, + strip=None, + upx=True, + console=True ) +MAVExp_coll = COLLECT(MAVPicViewer_exe, + MAVPicViewerAny.binaries, + MAVPicViewerAny.zipfiles, + MAVPicViewerAny.datas, + strip=None, + upx=True, + name='mavpicviewer')