Skip to content

Commit

Permalink
Merge branch 'OpenCPN:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakansv authored Jan 24, 2024
2 parents 2bac948 + 91ae80b commit 3af224d
Show file tree
Hide file tree
Showing 137 changed files with 2,075 additions and 2,333 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
- build/.flatpak-builder/checksums
- build/.flatpak-builder/downloads
- build/.flatpak-builder/rofiles
- run: ci/generic-upload.sh

build-android-armhf:
docker:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*~
.DS_Store
.idea
.pre-commit-config.yaml
.vs
.vscode
build
Expand Down
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ set(GUI_HDRS
${GUI_HDR_DIR}/OCPNRegion.h
${GUI_HDR_DIR}/options.h
${GUI_HDR_DIR}/piano.h
${GUI_HDR_DIR}/peer_client.h
${GUI_HDR_DIR}/peer_client_dlg.h
${GUI_HDR_DIR}/pluginmanager.h
${GUI_HDR_DIR}/printtable.h
${GUI_HDR_DIR}/priority_gui.h
Expand Down Expand Up @@ -910,7 +910,7 @@ set(GUI_SRC
${GUI_SRC_DIR}/OCPNRegion.cpp
${GUI_SRC_DIR}/options.cpp
${GUI_SRC_DIR}/Osenc.cpp
${GUI_SRC_DIR}/peer_client.cpp
${GUI_SRC_DIR}/peer_client_dlg.cpp
${GUI_SRC_DIR}/piano.cpp
${GUI_SRC_DIR}/pluginmanager.cpp
${GUI_SRC_DIR}/printtable.cpp
Expand Down Expand Up @@ -1862,7 +1862,10 @@ add_subdirectory(libs/gdal)
add_subdirectory(libs/geoprim)
add_subdirectory(libs/iso8211)
add_subdirectory(libs/mDNS)

set(MSVC_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cache/buildwin/include)
add_subdirectory(libs/mongoose)

add_subdirectory(libs/N2KParser)
add_subdirectory(libs/nmea0183)
add_subdirectory(libs/observable)
Expand Down Expand Up @@ -2672,7 +2675,7 @@ if (NOT TARGET uninstall)
endif ()

add_subdirectory(model)
target_link_libraries(${PACKAGE_NAME} PUBLIC ocpn::model)
target_link_libraries(${PACKAGE_NAME} PUBLIC ocpn::model-src ocpn::model)

if (NOT QT_ANDROID)
add_subdirectory(cli)
Expand Down
50 changes: 1 addition & 49 deletions android/androidUTIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#include <QtAndroidExtras/QAndroidJniObject>

#include "model/ais_state_vars.h"
#include "model/cmdline.h"
#include "model/comm_drv_n0183_android_bt.h"
#include "model/comm_drv_n0183_android_int.h"
Expand Down Expand Up @@ -150,7 +151,6 @@ extern bool g_bShowDepthUnits;
extern bool g_bskew_comp;
extern bool g_bopengl;
extern bool g_bsmoothpanzoom;
extern bool g_bShowMag;
extern int g_chart_zoom_modifier_raster;
extern int g_NMEAAPBPrecision;

Expand All @@ -161,40 +161,9 @@ extern int g_SOGFilterSec;

extern bool g_bDisplayGrid;

// AIS Global configuration
extern bool g_bCPAMax;
extern double g_CPAMax_NM;
extern bool g_bCPAWarn;
extern double g_CPAWarn_NM;
extern bool g_bTCPA_Max;
extern double g_TCPA_Max;
extern bool g_bMarkLost;
extern double g_MarkLost_Mins;
extern bool g_bRemoveLost;
extern double g_RemoveLost_Mins;
extern bool g_bShowCOG;
extern double g_ShowCOG_Mins;
extern bool g_bAISShowTracks;
extern double g_AISShowTracks_Mins;
extern bool g_bHideMoored;
extern double g_ShowMoored_Kts;
extern bool g_bAIS_CPA_Alert;
extern bool g_bAIS_CPA_Alert_Audio;
extern wxString g_sAIS_Alert_Sound_File;
extern bool g_bAIS_CPA_Alert_Suppress_Moored;
extern bool g_bShowAreaNotices;
extern bool g_bDrawAISSize;
extern bool g_bShowAISName;
extern int g_Show_Target_Name_Scale;
extern bool g_bWplIsAprsPosition;

extern int g_iNavAidRadarRingsNumberVisible;
extern float g_fNavAidRadarRingsStep;
extern int g_pNavAidRadarRingsStepUnits;
extern int g_iWaypointRangeRingsNumber;
extern float g_fWaypointRangeRingsStep;
extern int g_iWaypointRangeRingsStepUnits;
extern wxColour g_colourWaypointRangeRingsColour;
extern bool g_bWayPointPreventDragging;

extern bool g_bPreserveScaleOnX;
Expand All @@ -208,15 +177,10 @@ extern double g_n_ownship_beam_meters;
extern double g_n_gps_antenna_offset_y;
extern double g_n_gps_antenna_offset_x;
extern int g_n_ownship_min_mm;
extern double g_n_arrival_circle_radius;

extern bool g_bEnableZoomToCursor;
extern bool g_bTrackDaily;
extern bool g_bHighliteTracks;
extern double g_TrackIntervalSeconds;
extern double g_TrackDeltaDistance;
extern double g_TrackDeltaDistance;
extern int g_nTrackPrecision;

extern bool g_bAdvanceRouteWaypointOnArrivalOnly;

Expand All @@ -230,13 +194,6 @@ extern bool g_bLookAhead;
extern double g_ownship_predictor_minutes;
extern double g_ownship_HDTpredictor_miles;

extern bool g_bAISRolloverShowClass;
extern bool g_bAISRolloverShowCOG;
extern bool g_bAISRolloverShowCPA;

extern bool g_bAIS_ACK_Timeout;
extern double g_AckTimeout_Mins;

extern bool g_bQuiltEnable;
extern bool g_bFullScreenQuilt;
extern bool g_bConfirmObjectDelete;
Expand All @@ -246,7 +203,6 @@ extern wxLocale *plocale_def_lang;
#endif

// extern OCPN_Sound g_anchorwatch_sound;
extern bool g_bMagneticAPB;

extern bool g_fog_overzoom;
extern double g_overzoom_emphasis_base;
Expand Down Expand Up @@ -274,15 +230,13 @@ extern AisDecoder *g_pAIS;

extern options *g_pOptions;

extern bool g_btouch;
extern bool g_bresponsive;
extern bool g_bAutoHideToolbar;
extern int g_nAutoHideToolbar;
extern int g_GUIScaleFactor;
extern int g_ChartScaleFactor;

extern double g_config_display_size_mm;
extern float g_ChartScaleFactorExp;
extern bool g_config_display_size_manual;

extern Multiplexer *g_pMUX;
Expand All @@ -303,8 +257,6 @@ extern ChartStack *pCurrentStack;
extern Select *pSelect;
extern WayPointman *pWayPointMan;
extern bool g_bCruising;
extern RoutePoint *pAnchorWatchPoint1;
extern RoutePoint *pAnchorWatchPoint2;
extern bool g_bAutoAnchorMark;
extern wxAuiManager *g_pauimgr;
extern wxString g_AisTargetList_perspective;
Expand Down
13 changes: 9 additions & 4 deletions ci/circleci-build-flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ cp ../ci/id_opencpn.tar.cpt .
ccdecrypt --envvar FLATPAK_KEY id_opencpn.tar.cpt
tar -xf id_opencpn.tar
chmod 600 .ssh/id_opencpn
rsync -a --info=stats --delete-after \
--rsh="ssh -o 'StrictHostKeyChecking no' -i .ssh/id_opencpn" \
website/ [email protected]:web/flatpak-repo
rm -f .ssh/id_opencpn*


# Restore the patched file so the caching works.
git checkout ../flatpak/org.opencpn.OpenCPN.yaml
Expand All @@ -86,3 +83,11 @@ flatpak remote-ls local

# Validate the appstream data:
appstreamcli validate app/files/share/appdata/org.opencpn.OpenCPN.appdata.xml || :


# build the single file bundle, the actual artifact.
flatpak build-bundle repo \
opencpn+$(git rev-parse --short HEAD).flatpak org.opencpn.OpenCPN devel

# Make sure upload script has what it needs.
sudo apt-get --yes --force-yes install python3-pip python3-setuptools
4 changes: 3 additions & 1 deletion ci/generic-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ else
$SUDO python3 -m pip install -q cloudsmith-cli
fi
if test -f Release/opencpn.pdb; then cp Release/opencpn.pdb .; fi
for src in $(expand *.dmg *setup.exe *.deb *.pkg *pdb*gz *.dSYM.tar.gz); do
for src in \
$(expand *.dmg *setup.exe *.deb *.pkg *pdb*gz *.dSYM.tar.gz *.flatpak)
do
old=$(basename $src)
new=$(echo $old | sed "s/+/+${BUILD_NR}./")
if [ "$old" != "$new" ]; then $SUDO mv "$old" "$new"; fi
Expand Down
7 changes: 6 additions & 1 deletion cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ if (TARGET ocpn::wxsvg)
target_link_libraries(opencpn-cmd PRIVATE ocpn::wxsvg)
endif ()

target_link_libraries(opencpn-cmd PRIVATE ocpn::model)

target_link_libraries(opencpn-cmd PRIVATE ocpn::serial)
target_link_libraries(opencpn-cmd PRIVATE ocpn::tinyxml)
Expand Down Expand Up @@ -96,6 +95,12 @@ else ()
)
endif ()

target_link_libraries(opencpn-cmd PRIVATE ocpn::model ocpn::model-src)
if (MSVC)
target_link_libraries(opencpn-cmd PRIVATE iphlpapi)
endif ()


install(TARGETS opencpn-cmd RUNTIME DESTINATION ${PREFIX_BIN})

if (APPLE)
Expand Down
Loading

0 comments on commit 3af224d

Please sign in to comment.