Skip to content

Commit

Permalink
Update opencpn-libs and add some API 1.18 functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nohal committed Oct 24, 2023
1 parent 7b3512e commit 90d0eb9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ endif()
set(VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(VERSION_PATCH ${PROJECT_VERSION_PATCH})
if(PROJECT_VERSION_TWEAK STREQUAL "")
set(PROJECT_VERSION_TWEAK 0)
endif()

set(PACKAGE_NAME ${CMAKE_PROJECT_NAME})

Expand Down
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
#define PLUGIN_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define PLUGIN_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define PLUGIN_VERSION_TWEAK @PROJECT_VERSION_TWEAK@

#define PKG_PRERELEASE "@PKG_PRERELEASE@"
#define PKG_BUILD_INFO "@pkg_vers_build_info@"
13 changes: 13 additions & 0 deletions include/nsk_pi.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ class nsk_pi : public opencpn_plugin_118 {
/// \return Minor version of the plugin
int GetPlugInVersionMinor() override;

/// Forms a semantic version together with GetPlugInVersionMajor() and
/// GetPlugInVersionMinor(), see https://semver.org/
int GetPlugInVersionPatch() override;

/// Post-release version part, extends the semver spec.
int GetPlugInVersionPost() override;

/// Pre-release tag version part, see GetPlugInVersionPatch()
const char* GetPlugInVersionPre() override;

/// Build version part see GetPlugInVersionPatch()
const char* GetPlugInVersionBuild() override;

/// Get bitmap icon of the plugin logo
///
/// \return pointer to the bitmap containing the logo
Expand Down
8 changes: 8 additions & 0 deletions src/nsk_pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ int nsk_pi::GetPlugInVersionMajor() { return PLUGIN_VERSION_MAJOR; }

int nsk_pi::GetPlugInVersionMinor() { return PLUGIN_VERSION_MINOR; }

int nsk_pi::GetPlugInVersionPatch() { return PLUGIN_VERSION_PATCH; }

int nsk_pi::GetPlugInVersionPost() { return PLUGIN_VERSION_TWEAK; }

const char* nsk_pi::GetPlugInVersionPre() { return PKG_PRERELEASE; }

const char* nsk_pi::GetPlugInVersionBuild() { return PKG_BUILD_INFO; }

wxBitmap* nsk_pi::GetPlugInBitmap() { return &m_logo; }
wxString nsk_pi::GetCommonName() { return _("NSK"); }

Expand Down

0 comments on commit 90d0eb9

Please sign in to comment.