Skip to content

Commit

Permalink
setup/windows: build mavpicviewr
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Oct 9, 2024
1 parent 8375466 commit 1f8e4f9
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 1 deletion.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
9 changes: 9 additions & 0 deletions shortcuts/mavpicviewer.desktop
Original file line number Diff line number Diff line change
@@ -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

Binary file added shortcuts/mavpicviewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added windows/mavpicviewer.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions windows/mavproxy.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
33 changes: 32 additions & 1 deletion windows/mavproxy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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')

0 comments on commit 1f8e4f9

Please sign in to comment.