diff --git a/.gitignore b/.gitignore index d93a6b1..e9665ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ build src/version.h +data/drivers/ \ No newline at end of file diff --git a/Plugin/.travis.yml b/.travis.yml similarity index 78% rename from Plugin/.travis.yml rename to .travis.yml index a1ad78c..b295e47 100644 --- a/Plugin/.travis.yml +++ b/.travis.yml @@ -1,3 +1,20 @@ +# Set encrypted variable 'GitHub_auth_token' in Travis repo settings to deploy packages +# for tagged commits to GitHub Releases. +# deploy: +# - provider: releases +# api_key: $GitHub_auth_token +# file_glob: true +# file: $TRAVIS_BUILD_DIR/build/*.{deb,rpm,dmg,txz,pkg.tar.xz} +# skip_cleanup: true +# on: # Set deploy conditions + # Deploy only when tag is specified +# tags: true + # or his branch +# branch: dev + # and only when API token is set +# condition: "${#GitHub_auth_token} != 0" + +# ov50 Linux/OSX build - courtesy to https://github.com/seandepagnier language: cpp matrix: diff --git a/CMakeLists.txt b/CMakeLists.txt index 2be185e..f004047 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,10 +7,65 @@ # define minimum cmake version CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -PROJECT(TwoCanPlugIn) +PROJECT(twocan_pi) -# The TwoCan plugin -ADD_SUBDIRECTORY(Plugin) +SET(PACKAGE_NAME twocan_pi) +SET(VERBOSE_NAME TWOCAN) +SET(TITLE_NAME TWOCAN) +SET(CPACK_PACKAGE_CONTACT "TwoCanPlugin@hotmail.com") +# SET(PLUGIN_VERSION_MAJOR "1") +# SET(PLUGIN_VERSION_MINOR "4") +# SET(PLUGIN_VERSION_PATCH "0") +# SET(NAME_SUFFIX "ov50") +# SET(PLUGIN_VERSION_DATE "2019-05-26") +SET(CMAKE_BUILD_TYPE Release) +SET(CMAKE_CXX_STANDARD 11) + + + +INCLUDE("cmake/PluginConfigure.cmake") + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/Plugin/inc ${CMAKE_SOURCE_DIR}/{Plugin/src ${CMAKE_SOURCE_DIR}/Plugin/img) + +SET(SRC_TWOCAN + src/twocanerror.cpp + inc/twocanerror.h + src/twocandevice.cpp + inc/twocandevice.h + src/twocanplugin.cpp + inc/twocanplugin.h + src/twocansettings.cpp + inc/twocansettings.h + src/twocansettingsbase.cpp + inc/twocansettingsbase.h + src/twocanutils.cpp + inc/twocanutils.h + inc/version.h + img/twocan_16_icon.xpm + img/twocan_32.xpm + img/twocan_64.xpm + img/twocan_128.xpm + ) + +IF(UNIX AND NOT APPLE) + LIST(APPEND SRC_TWOCAN + src/twocansocket.cpp + inc/twocansocket.h + src/twocanlogreader.cpp + inc/twocanlogreader.h + ) +ENDIF(UNIX AND NOT APPLE) + +ADD_LIBRARY(${PACKAGE_NAME} SHARED ${SRC_TWOCAN} ) + +IF(WIN32) + TARGET_LINK_LIBRARIES(${PACKAGE_NAME} iphlpapi) +ENDIF(WIN32) + + +INCLUDE("cmake/PluginInstall.cmake") +INCLUDE("cmake/PluginLocalization.cmake") +INCLUDE("cmake/PluginPackage.cmake") # The TwoCan plugin Windows drivers IF(WIN32) @@ -22,4 +77,6 @@ IF(WIN32) ADD_SUBDIRECTORY(CandumpLog) ADD_SUBDIRECTORY(KeesLog) ADD_SUBDIRECTORY(YachtDevicesLog) -ENDIF(WIN32) \ No newline at end of file +ENDIF(WIN32) + + diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt deleted file mode 100644 index ace1ac6..0000000 --- a/Plugin/CMakeLists.txt +++ /dev/null @@ -1,67 +0,0 @@ -##--------------------------------------------------------------------------- -## Author: Steven Adler (based on standard OpenCPN Plug-In CMAKE commands) -## Copyright: 2018 -## License: GPL v3+ -##--------------------------------------------------------------------------- - -# define minimum cmake version -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - -PROJECT(twocan_pi) - -SET(PACKAGE_NAME twocan_pi) -SET(VERBOSE_NAME TWOCAN) -SET(TITLE_NAME TWOCAN) -SET(CPACK_PACKAGE_CONTACT "TwoCanPlugin@hotmail.com") -# SET(PLUGIN_VERSION_MAJOR "1") -# SET(PLUGIN_VERSION_MINOR "4") -# SET(PLUGIN_VERSION_PATCH "0") -# SET(NAME_SUFFIX "ov50") -# SET(PLUGIN_VERSION_DATE "2019-05-26") -SET(CMAKE_BUILD_TYPE Release) -SET(CMAKE_CXX_STANDARD 11) - -INCLUDE("cmake/PluginConfigure.cmake") - -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/Plugin/inc ${CMAKE_SOURCE_DIR}/{Plugin/src ${CMAKE_SOURCE_DIR}/Plugin/img) - -SET(SRC_TWOCAN - src/twocanerror.cpp - inc/twocanerror.h - src/twocandevice.cpp - inc/twocandevice.h - src/twocanplugin.cpp - inc/twocanplugin.h - src/twocansettings.cpp - inc/twocansettings.h - src/twocansettingsbase.cpp - inc/twocansettingsbase.h - src/twocanutils.cpp - inc/twocanutils.h - inc/version.h - img/twocan_16_icon.xpm - img/twocan_32.xpm - img/twocan_64.xpm - img/twocan_128.xpm - ) - -IF(UNIX AND NOT APPLE) - LIST(APPEND SRC_TWOCAN - src/twocansocket.cpp - inc/twocansocket.h - src/twocanlogreader.cpp - inc/twocanlogreader.h - ) -ENDIF(UNIX AND NOT APPLE) - -ADD_LIBRARY(${PACKAGE_NAME} SHARED ${SRC_TWOCAN} ) - -IF(WIN32) - TARGET_LINK_LIBRARIES(${PACKAGE_NAME} iphlpapi) -ENDIF(WIN32) - - -INCLUDE("cmake/PluginInstall.cmake") -INCLUDE("cmake/PluginLocalization.cmake") -INCLUDE("cmake/PluginPackage.cmake") - diff --git a/Plugin/src/version.h b/Plugin/src/version.h deleted file mode 100644 index 9003453..0000000 --- a/Plugin/src/version.h +++ /dev/null @@ -1,5 +0,0 @@ -#define PLUGIN_VERSION_MAJOR 1 -#define PLUGIN_VERSION_MINOR 4 -#define PLUGIN_VERSION_PATCH 0 -#define PLUGIN_NAME_SUFFIX "ov50" -#define PLUGIN_VERSION_DATE "2019-05-26" diff --git a/Plugin/VERSION.cmake b/VERSION.cmake similarity index 100% rename from Plugin/VERSION.cmake rename to VERSION.cmake diff --git a/Plugin/appveyor.yml b/appveyor.yml similarity index 74% rename from Plugin/appveyor.yml rename to appveyor.yml index 69596aa..718a728 100644 --- a/Plugin/appveyor.yml +++ b/appveyor.yml @@ -43,7 +43,25 @@ before_build: - cmake -T v141_xp .. build_script: - - cmake --build . --target package --config release + - cmake --build . --config release + - cd .. + - cd data + - mkdir drivers + - cd drivers + - copy ..\..\build\axiomtek\release\axiomtek.dll + - copy ..\..\build\candumplog\release\candumplog.dll + - copy ..\..\build\cantact\release\cantact.dll + - copy ..\..\build\Common\Release\twocanutil.lib + - copy ..\..\build\KeesLog\Release\keeslog.dll + - copy ..\..\build\Kvaser\Release\kvaser.dll + - copy ..\..\build\TwoCanLog\Release\twocanlog.dll + - copy ..\..\build\YachtDevicesLog\Release\yachtdeviceslog.dll + - cd ..\ + - cd ..\ + - cd build + - cpack + + # - cmake --build . --target package --config release # --target package doesn't work because of nsis not correctly installed artifacts: diff --git a/Plugin/buildosx/InstallOSX/twocan_pi.pkgproj.in b/buildosx/InstallOSX/twocan_pi.pkgproj.in similarity index 100% rename from Plugin/buildosx/InstallOSX/twocan_pi.pkgproj.in rename to buildosx/InstallOSX/twocan_pi.pkgproj.in diff --git a/Plugin/buildwin/NSIS.template.in b/buildwin/NSIS.template.in similarity index 100% rename from Plugin/buildwin/NSIS.template.in rename to buildwin/NSIS.template.in diff --git a/Plugin/cmake/PluginConfigure.cmake b/cmake/PluginConfigure.cmake similarity index 100% rename from Plugin/cmake/PluginConfigure.cmake rename to cmake/PluginConfigure.cmake diff --git a/Plugin/cmake/PluginInstall.cmake b/cmake/PluginInstall.cmake similarity index 100% rename from Plugin/cmake/PluginInstall.cmake rename to cmake/PluginInstall.cmake diff --git a/Plugin/cmake/PluginLocalization.cmake b/cmake/PluginLocalization.cmake similarity index 100% rename from Plugin/cmake/PluginLocalization.cmake rename to cmake/PluginLocalization.cmake diff --git a/Plugin/cmake/PluginPackage.cmake b/cmake/PluginPackage.cmake similarity index 100% rename from Plugin/cmake/PluginPackage.cmake rename to cmake/PluginPackage.cmake diff --git a/Plugin/cmake/gpl.txt b/cmake/gpl.txt similarity index 100% rename from Plugin/cmake/gpl.txt rename to cmake/gpl.txt diff --git a/Plugin/cmake/version.h.in b/cmake/version.h.in similarity index 100% rename from Plugin/cmake/version.h.in rename to cmake/version.h.in diff --git a/Plugin/img/twocan_128.xpm b/img/twocan_128.xpm similarity index 100% rename from Plugin/img/twocan_128.xpm rename to img/twocan_128.xpm diff --git a/Plugin/img/twocan_16_icon.xpm b/img/twocan_16_icon.xpm similarity index 100% rename from Plugin/img/twocan_16_icon.xpm rename to img/twocan_16_icon.xpm diff --git a/Plugin/img/twocan_32.xpm b/img/twocan_32.xpm similarity index 100% rename from Plugin/img/twocan_32.xpm rename to img/twocan_32.xpm diff --git a/Plugin/img/twocan_64.xpm b/img/twocan_64.xpm similarity index 100% rename from Plugin/img/twocan_64.xpm rename to img/twocan_64.xpm diff --git a/Plugin/inc/ocpn_plugin.h b/inc/ocpn_plugin.h similarity index 100% rename from Plugin/inc/ocpn_plugin.h rename to inc/ocpn_plugin.h diff --git a/Plugin/inc/twocandevice.h b/inc/twocandevice.h similarity index 100% rename from Plugin/inc/twocandevice.h rename to inc/twocandevice.h diff --git a/Plugin/inc/twocanerror.h b/inc/twocanerror.h similarity index 100% rename from Plugin/inc/twocanerror.h rename to inc/twocanerror.h diff --git a/Plugin/inc/twocanlogreader.h b/inc/twocanlogreader.h similarity index 100% rename from Plugin/inc/twocanlogreader.h rename to inc/twocanlogreader.h diff --git a/Plugin/inc/twocanplugin.h b/inc/twocanplugin.h similarity index 100% rename from Plugin/inc/twocanplugin.h rename to inc/twocanplugin.h diff --git a/Plugin/inc/twocansettings.h b/inc/twocansettings.h similarity index 100% rename from Plugin/inc/twocansettings.h rename to inc/twocansettings.h diff --git a/Plugin/inc/twocansettingsbase.h b/inc/twocansettingsbase.h similarity index 100% rename from Plugin/inc/twocansettingsbase.h rename to inc/twocansettingsbase.h diff --git a/Plugin/inc/twocansocket.h b/inc/twocansocket.h similarity index 100% rename from Plugin/inc/twocansocket.h rename to inc/twocansocket.h diff --git a/Plugin/inc/twocanutils.h b/inc/twocanutils.h similarity index 100% rename from Plugin/inc/twocanutils.h rename to inc/twocanutils.h diff --git a/Plugin/inc/version.h b/inc/version.h similarity index 100% rename from Plugin/inc/version.h rename to inc/version.h diff --git a/Plugin/po/POTFILES.in b/po/POTFILES.in similarity index 100% rename from Plugin/po/POTFILES.in rename to po/POTFILES.in diff --git a/Plugin/po/ar_SA.po b/po/ar_SA.po similarity index 100% rename from Plugin/po/ar_SA.po rename to po/ar_SA.po diff --git a/Plugin/po/bg_BG.po b/po/bg_BG.po similarity index 100% rename from Plugin/po/bg_BG.po rename to po/bg_BG.po diff --git a/Plugin/po/ca_ES.po b/po/ca_ES.po similarity index 100% rename from Plugin/po/ca_ES.po rename to po/ca_ES.po diff --git a/Plugin/po/cs_CZ.po b/po/cs_CZ.po similarity index 100% rename from Plugin/po/cs_CZ.po rename to po/cs_CZ.po diff --git a/Plugin/po/da_DK.po b/po/da_DK.po similarity index 100% rename from Plugin/po/da_DK.po rename to po/da_DK.po diff --git a/Plugin/po/de_DE.po b/po/de_DE.po similarity index 100% rename from Plugin/po/de_DE.po rename to po/de_DE.po diff --git a/Plugin/po/el_GR.po b/po/el_GR.po similarity index 100% rename from Plugin/po/el_GR.po rename to po/el_GR.po diff --git a/Plugin/po/es_ES.po b/po/es_ES.po similarity index 100% rename from Plugin/po/es_ES.po rename to po/es_ES.po diff --git a/Plugin/po/et_EE.po b/po/et_EE.po similarity index 100% rename from Plugin/po/et_EE.po rename to po/et_EE.po diff --git a/Plugin/po/fi_FI.po b/po/fi_FI.po similarity index 100% rename from Plugin/po/fi_FI.po rename to po/fi_FI.po diff --git a/Plugin/po/fil_PH.po b/po/fil_PH.po similarity index 100% rename from Plugin/po/fil_PH.po rename to po/fil_PH.po diff --git a/Plugin/po/fr_FR.po b/po/fr_FR.po similarity index 100% rename from Plugin/po/fr_FR.po rename to po/fr_FR.po diff --git a/Plugin/po/gl_ES.po b/po/gl_ES.po similarity index 100% rename from Plugin/po/gl_ES.po rename to po/gl_ES.po diff --git a/Plugin/po/hi_IN.po b/po/hi_IN.po similarity index 100% rename from Plugin/po/hi_IN.po rename to po/hi_IN.po diff --git a/Plugin/po/hu_HU.po b/po/hu_HU.po similarity index 100% rename from Plugin/po/hu_HU.po rename to po/hu_HU.po diff --git a/Plugin/po/id_ID.po b/po/id_ID.po similarity index 100% rename from Plugin/po/id_ID.po rename to po/id_ID.po diff --git a/Plugin/po/is_IS.po b/po/is_IS.po similarity index 100% rename from Plugin/po/is_IS.po rename to po/is_IS.po diff --git a/Plugin/po/it_IT.po b/po/it_IT.po similarity index 100% rename from Plugin/po/it_IT.po rename to po/it_IT.po diff --git a/Plugin/po/ja_JP.po b/po/ja_JP.po similarity index 100% rename from Plugin/po/ja_JP.po rename to po/ja_JP.po diff --git a/Plugin/po/ko_KR.po b/po/ko_KR.po similarity index 100% rename from Plugin/po/ko_KR.po rename to po/ko_KR.po diff --git a/Plugin/po/mr_IN.po b/po/mr_IN.po similarity index 100% rename from Plugin/po/mr_IN.po rename to po/mr_IN.po diff --git a/Plugin/po/nb_NO.po b/po/nb_NO.po similarity index 100% rename from Plugin/po/nb_NO.po rename to po/nb_NO.po diff --git a/Plugin/po/nl_NL.po b/po/nl_NL.po similarity index 100% rename from Plugin/po/nl_NL.po rename to po/nl_NL.po diff --git a/Plugin/po/pl_PL.po b/po/pl_PL.po similarity index 100% rename from Plugin/po/pl_PL.po rename to po/pl_PL.po diff --git a/Plugin/po/pt_BR.po b/po/pt_BR.po similarity index 100% rename from Plugin/po/pt_BR.po rename to po/pt_BR.po diff --git a/Plugin/po/pt_PT.po b/po/pt_PT.po similarity index 100% rename from Plugin/po/pt_PT.po rename to po/pt_PT.po diff --git a/Plugin/po/ro_RO.po b/po/ro_RO.po similarity index 100% rename from Plugin/po/ro_RO.po rename to po/ro_RO.po diff --git a/Plugin/po/ru_RU.po b/po/ru_RU.po similarity index 100% rename from Plugin/po/ru_RU.po rename to po/ru_RU.po diff --git a/Plugin/po/sv_SE.po b/po/sv_SE.po similarity index 100% rename from Plugin/po/sv_SE.po rename to po/sv_SE.po diff --git a/Plugin/po/th_TH.po b/po/th_TH.po similarity index 100% rename from Plugin/po/th_TH.po rename to po/th_TH.po diff --git a/Plugin/po/tr_TR.po b/po/tr_TR.po similarity index 100% rename from Plugin/po/tr_TR.po rename to po/tr_TR.po diff --git a/Plugin/po/twocan_pi.pot b/po/twocan_pi.pot similarity index 100% rename from Plugin/po/twocan_pi.pot rename to po/twocan_pi.pot diff --git a/Plugin/po/vi_VN.po b/po/vi_VN.po similarity index 100% rename from Plugin/po/vi_VN.po rename to po/vi_VN.po diff --git a/Plugin/po/zh_CN.po b/po/zh_CN.po similarity index 100% rename from Plugin/po/zh_CN.po rename to po/zh_CN.po diff --git a/Plugin/po/zh_TW.po b/po/zh_TW.po similarity index 100% rename from Plugin/po/zh_TW.po rename to po/zh_TW.po diff --git a/Plugin/src/twocandevice.cpp b/src/twocandevice.cpp similarity index 99% rename from Plugin/src/twocandevice.cpp rename to src/twocandevice.cpp index eb2bf6a..9d66017 100644 --- a/Plugin/src/twocandevice.cpp +++ b/src/twocandevice.cpp @@ -38,7 +38,7 @@ // 2. Rewrite/Port Adapter drivers to C++ // -#include "twocandevice.h" +#include "../inc/twocandevice.h" TwoCanDevice::TwoCanDevice(wxEvtHandler *handler) : wxThread(wxTHREAD_DETACHED) { // Save a reference to our "parent", the plugin event handler so we can pass events to it diff --git a/Plugin/src/twocanerror.cpp b/src/twocanerror.cpp similarity index 98% rename from Plugin/src/twocanerror.cpp rename to src/twocanerror.cpp index 784dc2e..22f5706 100644 --- a/Plugin/src/twocanerror.cpp +++ b/src/twocanerror.cpp @@ -24,7 +24,7 @@ // Date: 6/8/2018 // Version: 1.0 -#include "twocanerror.h" +#include "..\inc\twocanerror.h" #ifdef __LINUX__ #include diff --git a/Plugin/src/twocanlogreader.cpp b/src/twocanlogreader.cpp similarity index 100% rename from Plugin/src/twocanlogreader.cpp rename to src/twocanlogreader.cpp diff --git a/Plugin/src/twocanplugin.cpp b/src/twocanplugin.cpp similarity index 99% rename from Plugin/src/twocanplugin.cpp rename to src/twocanplugin.cpp index c70a12f..40445d7 100644 --- a/Plugin/src/twocanplugin.cpp +++ b/src/twocanplugin.cpp @@ -32,7 +32,7 @@ // -#include "twocanplugin.h" +#include "../inc/twocanplugin.h" // Globally accessible variables used by the plugin, device and the settings dialog. wxFileConfig *configSettings; diff --git a/Plugin/src/twocansettings.cpp b/src/twocansettings.cpp similarity index 99% rename from Plugin/src/twocansettings.cpp rename to src/twocansettings.cpp index 61b6fe8..86a41ae 100644 --- a/Plugin/src/twocansettings.cpp +++ b/src/twocansettings.cpp @@ -31,7 +31,7 @@ // 2. Prevent user selecting both LogFile reader and Log Raw frames ! // -#include "twocansettings.h" +#include "../inc/twocansettings.h" // Constructor and destructor implementation // inherits froms TwoCanSettingsBase which was implemented using wxFormBuilder diff --git a/Plugin/src/twocansettingsbase.cpp b/src/twocansettingsbase.cpp similarity index 99% rename from Plugin/src/twocansettingsbase.cpp rename to src/twocansettingsbase.cpp index e5fab6e..0419353 100644 --- a/Plugin/src/twocansettingsbase.cpp +++ b/src/twocansettingsbase.cpp @@ -5,7 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "twocansettingsbase.h" +#include "../inc/twocansettingsbase.h" /////////////////////////////////////////////////////////////////////////// diff --git a/Plugin/src/twocansocket.cpp b/src/twocansocket.cpp similarity index 100% rename from Plugin/src/twocansocket.cpp rename to src/twocansocket.cpp diff --git a/Plugin/src/twocanutils.cpp b/src/twocanutils.cpp similarity index 99% rename from Plugin/src/twocanutils.cpp rename to src/twocanutils.cpp index 8a41e26..f4dde8b 100644 --- a/Plugin/src/twocanutils.cpp +++ b/src/twocanutils.cpp @@ -28,7 +28,7 @@ // 1. Any additional functions ?? // -#include "twocanutils.h" +#include "../inc/twocanutils.h" int TwoCanUtils::ConvertByteArrayToInteger(const byte *buf, unsigned int *value) { if ((buf != NULL) && (value != NULL)) {