Skip to content

Commit 3fe8ff1

Browse files
committed
setup/windows: build mavpicviewr
1 parent 6f8e0b8 commit 3fe8ff1

File tree

6 files changed

+47
-1
lines changed

6 files changed

+47
-1
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def package_files(directory):
106106
scripts=['MAVProxy/mavproxy.py',
107107
'MAVProxy/tools/mavflightview.py',
108108
'MAVProxy/tools/MAVExplorer.py',
109+
'MAVProxy/tools/mavpicviewer/mavpicviewer.py',
109110
'MAVProxy/modules/mavproxy_map/mp_slipmap.py',
110111
'MAVProxy/modules/mavproxy_map/mp_tile.py'],
111112
package_data={'MAVProxy':

shortcuts/mavpicviewer.desktop

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Version=1.0
3+
Type=Application
4+
Terminal=true
5+
Exec=bash -c 'export PATH="$PATH:~/.local/bin"; mavpicviewer.py %F'
6+
Name=MAVPicViewer
7+
Icon=mavpicviewer
8+
Comment=Picture Review Tool
9+

shortcuts/mavpicviewer.png

121 KB
Loading

windows/mavpicviewer.ico

137 KB
Binary file not shown.

windows/mavproxy.iss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,25 @@ Source: "..\MAVProxy\dist\mavproxy\mavproxy.exe"; DestDir: "{app}"; Flags: ignor
4343
Source: "..\MAVProxy\dist\mavproxy\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
4444
Source: "..\MAVProxy\dist\MAVExplorer\MAVExplorer.exe"; DestDir: "{app}"; Flags: ignoreversion
4545
Source: "..\MAVProxy\dist\MAVExplorer\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
46+
Source: "..\MAVProxy\dist\mavpicviewer\mavpicviewer.exe"; DestDir: "{app}"; Flags: ignoreversion
47+
Source: "..\MAVProxy\dist\mavpicviewer\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
4648
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
4749
Source: "..\Parameters\*"; DestDir: "{localappdata}\.mavproxy"; Flags: ignoreversion
4850
Source: "..\windows\mavinit.scr"; DestDir: "{localappdata}\.mavproxy"; Flags: ignoreversion
4951
Source: "..\windows\version.txt"; DestDir: "{localappdata}\.mavproxy"; Flags: ignoreversion
5052
Source: "..\windows\MAVProxy.ico"; DestDir: "{app}"; Flags: ignoreversion
5153
Source: "..\windows\MAVExplorer.ico"; DestDir: "{app}"; Flags: ignoreversion
54+
Source: "..\windows\mavpicviewer.ico"; DestDir: "{app}"; Flags: ignoreversion
5255
Source: "..\windows\Startup Examples\MAVProxyLogput.bat"; DestDir: "{app}\Examples"; Flags: ignoreversion
5356
Source: "..\windows\Startup Examples\MAVProxyMultiOutput.bat"; DestDir: "{app}\Examples"; Flags: ignoreversion
5457

5558
[Icons]
5659
Name: "{group}\{#MyAppName} (No GUI)"; Filename: "{app}\{#MyAppExeName}"; WorkingDir: "{commondocs}"; IconFilename: "{app}\MAVProxy.ico"
5760
Name: "{group}\MAVExplorer"; Filename: "{app}\MAVExplorer.exe"; WorkingDir: "{commondocs}"; IconFilename: "{app}\MAVExplorer.ico"
61+
Name: "{group}\MAVPicViewer"; Filename: "{app}\mavpicviewer.exe"; WorkingDir: "{commondocs}"; IconFilename: "{app}\mavpicviewer.ico"
5862
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--map --console --load-module=graph"; WorkingDir: "{commondocs}"; Tasks: desktopicon; IconFilename: "{app}\MAVProxy.ico"
5963
Name: "{commondesktop}\MAVExplorer"; Filename: "{app}\MAVExplorer.exe"; WorkingDir: "{commondocs}"; Tasks: desktopicon; IconFilename: "{app}\MAVExplorer.ico"
64+
Name: "{commondesktop}\MAVPicViewer"; Filename: "{app}\mavpicviewer.exe"; WorkingDir: "{commondocs}"; Tasks: desktopicon; IconFilename: "{app}\mavpicviewer.ico"
6065
Name: "{group}\Documentation"; Filename: "https://ardupilot.org/mavproxy/index.html"
6166
Name: "{group}\Startup Examples"; Filename: "{app}\Examples"
6267
Name: "{group}\Ardupilot MAVProxy Forum"; Filename: "http://discuss.ardupilot.org/c/ground-control-software/mavproxy"

windows/mavproxy.spec

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,21 @@ MAVExpAny = Analysis(['.\\tools\\MAVExplorer.py'],
3737
hookspath=None,
3838
runtime_hooks=None,
3939
excludes= ['sphinx', 'docutils', 'alabaster', 'FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'])
40-
# MERGE( (MAVProxyAny, 'mavproxy', 'mavproxy'), (MAVExpAny, 'MAVExplorer', 'MAVExplorer') )
40+
MAVPicViewerAny = Analysis(['.\\tools\\mavpicviewer\\mavpicviewer.py'],
41+
pathex=[os.path.abspath('.')],
42+
# for some unknown reason these hidden imports don't pull in
43+
# all the needed pieces, so we also import them in mavproxy.py
44+
hiddenimports=['cv2', 'wx',
45+
'numpy', 'dateutil',
46+
'wx.lib.agw.genericmessagedialog', 'wx.lib.wordwrap', 'wx.lib.buttons',
47+
'wx.lib.embeddedimage', 'wx.lib.imageutils', 'wx.lib.agw.aquabutton',
48+
'wx.lib.agw.gradientbutton', 'FileDialog', 'Dialog',
49+
] + collect_submodules('pymavlink'),
50+
datas= [],
51+
hookspath=None,
52+
runtime_hooks=None,
53+
excludes= ['sphinx', 'docutils', 'alabaster', 'FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'])
54+
# MERGE( (MAVProxyAny, 'mavproxy', 'mavproxy'), (MAVExpAny, 'MAVExplorer', 'MAVExplorer'), (MAVPicViewerAny, 'mavpicviewer', 'mavpicviewer') )
4155
MAVProxy_pyz = PYZ(MAVProxyAny.pure)
4256
MAVProxy_exe = EXE(MAVProxy_pyz,
4357
MAVProxyAny.scripts,
@@ -71,3 +85,20 @@ MAVExp_coll = COLLECT(MAVExp_exe,
7185
strip=None,
7286
upx=True,
7387
name='MAVExplorer')
88+
89+
MAVPicViewer_pyz = PYZ(MAVPicViewerAny.pure)
90+
MAVPicViewer_exe = EXE(MAVPicViewer_pyz,
91+
MAVPicViewerAny.scripts,
92+
exclude_binaries=True,
93+
name='mavpicviewer.exe',
94+
debug=False,
95+
strip=None,
96+
upx=True,
97+
console=True )
98+
MAVPicViewer_coll = COLLECT(MAVPicViewer_exe,
99+
MAVPicViewerAny.binaries,
100+
MAVPicViewerAny.zipfiles,
101+
MAVPicViewerAny.datas,
102+
strip=None,
103+
upx=True,
104+
name='mavpicviewer')

0 commit comments

Comments
 (0)