diff --git a/setup.py b/setup.py index a3118a96da..5cf6df19bd 100755 --- a/setup.py +++ b/setup.py @@ -106,6 +106,7 @@ def package_files(directory): scripts=['MAVProxy/mavproxy.py', 'MAVProxy/tools/mavflightview.py', 'MAVProxy/tools/MAVExplorer.py', + 'MAVProxy/tools/mavpicviewer/mavpicviewer.py', 'MAVProxy/modules/mavproxy_map/mp_slipmap.py', 'MAVProxy/modules/mavproxy_map/mp_tile.py'], package_data={'MAVProxy': diff --git a/shortcuts/mavpicviewer.desktop b/shortcuts/mavpicviewer.desktop new file mode 100644 index 0000000000..3a4f5c749a --- /dev/null +++ b/shortcuts/mavpicviewer.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Terminal=true +Exec=bash -c 'export PATH="$PATH:~/.local/bin"; mavpicviewer.py %F' +Name=MAVPicViewer +Icon=mavpicviewer +Comment=Picture Review Tool + diff --git a/shortcuts/mavpicviewer.png b/shortcuts/mavpicviewer.png new file mode 100644 index 0000000000..8ca05fbc87 Binary files /dev/null and b/shortcuts/mavpicviewer.png differ diff --git a/windows/mavpicviewer.ico b/windows/mavpicviewer.ico new file mode 100644 index 0000000000..ff4dce2efe Binary files /dev/null and b/windows/mavpicviewer.ico differ diff --git a/windows/mavproxy.iss b/windows/mavproxy.iss index 821267f766..213731b71b 100644 --- a/windows/mavproxy.iss +++ b/windows/mavproxy.iss @@ -43,20 +43,25 @@ Source: "..\MAVProxy\dist\mavproxy\mavproxy.exe"; DestDir: "{app}"; Flags: ignor Source: "..\MAVProxy\dist\mavproxy\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "..\MAVProxy\dist\MAVExplorer\MAVExplorer.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\MAVProxy\dist\MAVExplorer\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "..\MAVProxy\dist\mavpicviewer\mavpicviewer.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\MAVProxy\dist\mavpicviewer\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files Source: "..\Parameters\*"; DestDir: "{localappdata}\.mavproxy"; Flags: ignoreversion Source: "..\windows\mavinit.scr"; DestDir: "{localappdata}\.mavproxy"; Flags: ignoreversion Source: "..\windows\version.txt"; DestDir: "{localappdata}\.mavproxy"; Flags: ignoreversion Source: "..\windows\MAVProxy.ico"; DestDir: "{app}"; Flags: ignoreversion Source: "..\windows\MAVExplorer.ico"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\windows\mavpicviewer.ico"; DestDir: "{app}"; Flags: ignoreversion Source: "..\windows\Startup Examples\MAVProxyLogput.bat"; DestDir: "{app}\Examples"; Flags: ignoreversion Source: "..\windows\Startup Examples\MAVProxyMultiOutput.bat"; DestDir: "{app}\Examples"; Flags: ignoreversion [Icons] Name: "{group}\{#MyAppName} (No GUI)"; Filename: "{app}\{#MyAppExeName}"; WorkingDir: "{commondocs}"; IconFilename: "{app}\MAVProxy.ico" Name: "{group}\MAVExplorer"; Filename: "{app}\MAVExplorer.exe"; WorkingDir: "{commondocs}"; IconFilename: "{app}\MAVExplorer.ico" +Name: "{group}\mavpicviewer"; Filename: "{app}\mavpicviewer.exe"; WorkingDir: "{commondocs}"; IconFilename: "{app}\mavpicviewer.ico" Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--map --console --load-module=graph"; WorkingDir: "{commondocs}"; Tasks: desktopicon; IconFilename: "{app}\MAVProxy.ico" Name: "{commondesktop}\MAVExplorer"; Filename: "{app}\MAVExplorer.exe"; WorkingDir: "{commondocs}"; Tasks: desktopicon; IconFilename: "{app}\MAVExplorer.ico" +Name: "{commondesktop}\mavpicviewer"; Filename: "{app}\mavpicviewer.exe"; WorkingDir: "{commondocs}"; Tasks: desktopicon; IconFilename: "{app}\mavpicviewer.ico" Name: "{group}\Documentation"; Filename: "https://ardupilot.org/mavproxy/index.html" Name: "{group}\Startup Examples"; Filename: "{app}\Examples" Name: "{group}\Ardupilot MAVProxy Forum"; Filename: "http://discuss.ardupilot.org/c/ground-control-software/mavproxy" diff --git a/windows/mavproxy.spec b/windows/mavproxy.spec index 17edf8a35d..77afe41c50 100755 --- a/windows/mavproxy.spec +++ b/windows/mavproxy.spec @@ -37,7 +37,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, @@ -71,3 +85,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 ) +MAVPicViewer_coll = COLLECT(MAVPicViewer_exe, + MAVPicViewerAny.binaries, + MAVPicViewerAny.zipfiles, + MAVPicViewerAny.datas, + strip=None, + upx=True, + name='mavpicviewer')