Skip to content

Commit

Permalink
Merge pull request #30 from jongough/updates
Browse files Browse the repository at this point in the history
Update to frontend2 v1.0.185.0 and update properties icon
  • Loading branch information
jongough authored Dec 13, 2021
2 parents edfcd95 + f70d44d commit 22bf85c
Show file tree
Hide file tree
Showing 17 changed files with 231 additions and 542 deletions.
572 changes: 125 additions & 447 deletions .circleci/config.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ set(PACKAGE "windvane")

set(VERSION_MAJOR "1")
set(VERSION_MINOR "0")
set(VERSION_PATCH "23")
set(VERSION_PATCH "24")
set(VERSION_TWEAK "0")
set(VERSION_DATE "13/09/2021") # DD/MM/YYYY format
set(VERSION_DATE "21/11/2021") # DD/MM/YYYY format
set(OCPN_MIN_VERSION "ov50")
set(OCPN_API_VERSION_MAJOR "1")
set(OCPN_API_VERSION_MINOR "16")
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ before_build:
- ps: Start-FileDownload https://downloads.sourceforge.net/project/opencpnplugins/opencpn_packaging_data/PVW32Con.exe
- cd ..
- rm -rf build && mkdir build && cd build
- ps: Start-FileDownload https://downloads.sourceforge.net/project/opencpnplugins/opencpn_lib/4.99.1405-vc141_xp/opencpn.lib
#- ps: Start-FileDownload https://downloads.sourceforge.net/project/opencpnplugins/opencpn_lib/4.99.1405-vc141_xp/opencpn.lib - no longer available, replaced with below
- ps: Start-FileDownload https://sourceforge.net/projects/opencpnplugins/files/opencpn.lib
# http://opencpn.navnux.org/build_deps/OpenCPN_buildwin-4.99a.7z - no longer available, replaced with below
- ps: Start-FileDownload https://download.opencpn.org/s/oibxM3kzfzKcSc3/download -FileName OpenCPN_buildwin-4.99a.7z
- cmd: 7z x -y OpenCPN_buildwin-4.99a.7z -oc:\project\ocpn_project\buildwin
Expand Down
23 changes: 6 additions & 17 deletions ci/circleci-build-android-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ set -xe

pwd

#not needed for CI built, the workflow starts up already in "project" directory.
# but required for local build.
#cd project

ls -la


sudo apt-get -q update
sudo apt-get -y install git cmake gettext unzip

# Get the OCPN Android build support package.
#NOT REQUIRED FOR LOCAL BUILD
# FOR LOCAL BUILD - have a local version to avoid big download each run - need to stage it but not commit it. DO NOT COMMIT AND PUSH master.zip
echo "CIRCLECI_LOCAL: $CIRCLECI_LOCAL"
if [ -z "$CIRCLECI_LOCAL" ]; then
wget https://github.com/bdbcat/OCPNAndroidCommon/archive/master.zip
Expand All @@ -30,14 +25,11 @@ unzip -qq -o master.zip
pwd
ls -la

#change this for local build, so as not to overwrite any other generic build.
#mkdir -p build_android_64_ci
#cd build_android_64_ci
mkdir -p build
cd build

rm -f CMakeCache.txt
COMPDIR=$(find /opt/android -iname "android-ndk*")
COMPDIR=$(find ~/. -regex ".*/ndk/22.[0-9].[0-9]*")

cmake \
-D_wx_selected_config=androideabi-qt-arm64 \
Expand All @@ -47,16 +39,13 @@ cmake \
-DCMAKE_CXX_COMPILER=$COMPDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++ \
-DCMAKE_C_COMPILER=$COMPDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang \
-DOCPN_Android_Common=OCPNAndroidCommon-master \
-DPREFIX=/ \
-DCMAKE_INSTALL_PREFIX=/ \
..

# Get number of processors and use this on make to speed up build
if type nproc &> /dev/null
then
make_cmd="make -j"$(nproc)
else
make_cmd="make"
fi
procs=$(awk -F- '{print $2}' /sys/fs/cgroup/cpuset/cpuset.cpus)
procs=$((procs + 1))
make_cmd="make -j"$procs
eval $make_cmd
make package

Expand Down
25 changes: 6 additions & 19 deletions ci/circleci-build-android-armhf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,17 @@
# Build the Android artifacts inside the circleci linux container
#


set -xe

pwd

#not needed for CI built, the workflow starts up already in "project" directory.
# but required for local build.
#cd project

ls -la

#sudo chown -R 1000 /oesenc_pi/build_android_64_ci

sudo apt-get -q update
sudo apt-get -y install git cmake gettext unzip

# Get the OCPN Android build support package.
#NOT REQUIRED FOR LOCAL BUILD
# FOR LOCAL BUILD - have a local version to avoid big download each run - need to stage it but not commit it. DO NOT COMMIT AND PUSH master.zip
echo "CIRCLECI_LOCAL: $CIRCLECI_LOCAL"
if [ -z "$CIRCLECI_LOCAL" ]; then
wget https://github.com/bdbcat/OCPNAndroidCommon/archive/master.zip
Expand All @@ -31,14 +24,11 @@ unzip -qq -o master.zip
pwd
ls -la

#change this for local build, so as not to overwrite any other generic buildin "build".
#sudo mkdir -p build_android_arm32
#cd build_android_arm32
mkdir -p build
cd build

rm -f CMakeCache.txt
COMPDIR=$(find /opt/android -iname "android-ndk*")
COMPDIR=$(find ~/. -regex ".*/ndk/22.[0-9].[0-9]*")

cmake \
-D_wx_selected_config=androideabi-qt-armhf \
Expand All @@ -48,16 +38,13 @@ cmake \
-DCMAKE_CXX_COMPILER=$COMPDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++ \
-DCMAKE_C_COMPILER=$COMPDIR/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang \
-DOCPN_Android_Common=OCPNAndroidCommon-master \
-DPREFIX=/ \
-DCMAKE_INSTALL_PREFIX=/ \
..

# Get number of processors and use this on make to speed up build
if type nproc &> /dev/null
then
make_cmd="make -j"$(nproc)
else
make_cmd="make"
fi
procs=$(awk -F- '{print $2}' /sys/fs/cgroup/cpuset/cpuset.cpus)
procs=$((procs + 1))
make_cmd="make -j"$procs
eval $make_cmd

make package
Expand Down
2 changes: 1 addition & 1 deletion ci/circleci-build-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ rm -f ./*all.deb
tag=$(git tag --contains HEAD)

if [ -n "$BUILD_GTK3" ] && [ "$BUILD_GTK3" = "TRUE" ]; then
sudo update-alternatives --set wx-config /usr/lib/*-linux-*/wx/config/gtk3-unicode-3.0
sudo update-alternatives --set wx-config /usr/lib/*-linux-*/wx/config/gtk3-unicode-3.0
fi

if [ -n "$tag" ]; then
Expand Down
38 changes: 24 additions & 14 deletions ci/circleci-build-flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,39 @@

# bailout on errors and echo commands.
set -xe
sudo apt-get -qq update
sudo apt-get -q -y --allow-unauthenticated --allow-downgrades --allow-remove-essential --allow-change-held-packages update

#PLUGIN=bsb4

sudo apt install flatpak flatpak-builder
sudo apt --allow-unauthenticated --allow-downgrades --allow-remove-essential --allow-change-held-packages install flatpak flatpak-builder

if [ -n "$CI" ]; then
sudo apt update

# Avoid using outdated TLS certificates, see #210.
sudo apt install --reinstall ca-certificates

# Install flatpak and flatpak-builder
sudo apt install flatpak flatpak-builder
fi

flatpak remote-add --user --if-not-exists \
flathub https://flathub.org/repo/flathub.flatpakrepo
flathub https://dl.flathub.org/repo/flathub.flatpakrepo


if [ "$FLATPAK_BRANCH" = "beta" ]; then
flatpak install --user -y flathub org.freedesktop.Sdk//20.08 >/dev/null
flatpak remote-add --user --if-not-exists flathub-beta \
https://flathub.org/beta-repo/flathub-beta.flatpakrepo
flatpak install --user -y flathub-beta \
org.opencpn.OpenCPN >/dev/null
flatpak install --user -y flathub org.freedesktop.Sdk//20.08 >/dev/null
flatpak remote-add --user --if-not-exists flathub-beta \
https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo
flatpak install --user -y flathub-beta \
org.opencpn.OpenCPN >/dev/null
else
flatpak install --user -y flathub org.freedesktop.Sdk//18.08 >/dev/null
flatpak remote-add --user --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub \
org.opencpn.OpenCPN >/dev/null
FLATPAK_BRANCH='stable'
flatpak install --user -y flathub org.freedesktop.Sdk//18.08 >/dev/null
flatpak remote-add --user --if-not-exists flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub \
org.opencpn.OpenCPN >/dev/null
FLATPAK_BRANCH='stable'
fi

rm -rf build && mkdir build && cd build
Expand Down
31 changes: 14 additions & 17 deletions ci/circleci-build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
# Build the MacOS artifacts
#

# Fix broken ruby on the CircleCI image:
if [ -n "$CIRCLECI" ]; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi

set -xe

set -o pipefail
Expand All @@ -20,18 +15,23 @@ for pkg in cairo cmake gettext libarchive libexif python wget; do
brew link --overwrite $pkg || brew install $pkg
done

#wget -q http://opencpn.navnux.org/build_deps/wx312_opencpn50_macos109.tar.xz - unsupported link, replaced with below
curl -o wx312B_opencpn50_macos109.tar.xz https://download.opencpn.org/s/rwoCNGzx6G34tbC/download
tar xJf wx312B_opencpn50_macos109.tar.xz -C /tmp
if [ -n "$WXVERSION" ] && [ "$WXVERSION" -eq "315" ]; then
curl -o wx315_opencpn50_macos1010.tar.xz https://download.opencpn.org/s/MCiRiq4fJcKD56r/download
tar xJf wx315_opencpn50_macos1010.tar.xz -C /tmp
WX_EXECUTABLE=/tmp/wx315_opencpn50_macos1010/bin/wx-config
WX_CONFIG="--prefix=/tmp/wx315_opencpn50_macos1010"
else
curl -o wx312B_opencpn50_macos109.tar.xz https://download.opencpn.org/s/rwoCNGzx6G34tbC/download
tar xJf wx312B_opencpn50_macos109.tar.xz -C /tmp
WX_EXECUTABLE=/tmp/wx312B_opencpn50_macos109/bin/wx-config
WX_CONFIG="--prefix=/tmp/wx312B_opencpn50_macos109"
fi

export PATH="/usr/local/opt/gettext/bin:$PATH"
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

export MACOSX_DEPLOYMENT_TARGET=10.9

#wget -q http://opencpn.navnux.org/build_deps/Packages.dmg - unsupported link, replaced with below
#curl -o Packages.dmg https://download.opencpn.org/s/SneCR3z9XM3aRc6/download
#hdiutil attach Packages.dmg
#sudo installer -pkg "/Volumes/Packages 1.2.5/Install Packages.pkg" -target "/"
# use brew to get Packages.pkg
if brew list --cask --versions packages; then
version=$(pkg_version packages '--cask')
Expand All @@ -44,15 +44,12 @@ fi

rm -rf build && mkdir build && cd build
cmake \
-DwxWidgets_CONFIG_EXECUTABLE=/tmp/wx312B_opencpn50_macos109/bin/wx-config \
-DwxWidgets_CONFIG_OPTIONS="--prefix=/tmp/wx312B_opencpn50_macos109" \
-DwxWidgets_CONFIG_EXECUTABLE=$WX_EXECUTABLE \
-DwxWidgets_CONFIG_OPTIONS=$WX_CONFIG \
-DCMAKE_INSTALL_PREFIX= \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
"/" \
..
make -sj2
make package

# removed as fails to build
# make create-pkg

3 changes: 2 additions & 1 deletion ci/control
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Build-Depends: debhelper (>= 9),
libsqlite3-dev,
libtinyxml-dev,
libunarr-dev | base-files (<< 11),
libgtk2.0-dev | libgtk-3-dev,
libgtk2.0-dev,
libgtk-3-dev,
libwxgtk3.0-dev | libwxgtk3.0-gtk3-dev,
libwxgtk3.0-0v5 | libwxgtk3.0-0 | libwxgtk3.0-gtk3-0v5,
libwxgtk3.0-gtk3-dev | base-files (<< 10),
Expand Down
9 changes: 6 additions & 3 deletions cmake/PluginConfigure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,17 @@ else()
endif(MINGW)
endif()

set(PKG_BUILD_TARGET "${PKG_TARGET}")
if("${PKG_BUILD_TARGET}" STREQUAL "")
set(PKG_BUILD_TARGET "${PKG_TARGET}")
set(PKG_TARGET_BUILD "-${PKG_BUILD_TARGET}")
endif()
set(PKG_BUILD_GTK "${PKG_TARGET_GTK}")
if(NOT "${PKG_TARGET_GTK}" STREQUAL "")
set(PKG_TARGET_GTK "-${PKG_TARGET_GTK}")
endif()
set(PKG_TARGET_FULL "${PKG_TARGET}${PKG_TARGET_GTK}${PKG_TARGET_ARCH}")
message(STATUS "${CMLOC}PKG_TARGET_FULL: ${PKG_TARGET}${PKG_TARGET_GTK}${PKG_TARGET_ARCH}")
message(STATUS "${CMLOC}PKG_BUILD_TARGET: ${PKG_TARGET}")
message(STATUS "${CMLOC}PKG_TARGET_FULL: ${PKG_TARGET_FULL}")
message(STATUS "${CMLOC}PKG_BUILD_TARGET: ${PKG_BUILD_TARGET}")
message(STATUS "${CMLOC}PKG_BUILD_GTK: ${PKG_TARGET_GTK}")
message(STATUS "${CMLOC}*.in files generated in ${CMAKE_CURRENT_BINARY_DIR}")
message(STATUS "${CMLOC}PACKAGING_NAME_XML: ${PACKAGING_NAME_XML}")
Expand Down
4 changes: 4 additions & 0 deletions cmake/PluginInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ if(APPLE)
install(DIRECTORY data DESTINATION OpenCPN.app/Contents/SharedSupport/plugins/${PACKAGE_NAME})
endif()

if(EXISTS ${PROJECT_SOURCE_DIR}/UserIcons)
install(DIRECTORY UserIcons DESTINATION OpenCPN.app/Contents/SharedSupport/plugins/${PACKAGE_NAME})
endif()

find_package(ZLIB REQUIRED)
target_link_libraries(${PACKAGE_NAME} ${ZLIB_LIBRARIES})

Expand Down
7 changes: 6 additions & 1 deletion cmake/PluginSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ elseif(MSVC)
set(PKG_TARGET_VERSION 10)
endif()
elseif(APPLE)
set(PKG_TARGET "darwin")
set(PKG_BUILD_TARGET "darwin")
if("$ENV{WXVERSION}" STREQUAL "315")
set(PKG_TARGET "darwin-wx$ENV{WXVERSION}")
else()
set(PKG_TARGET "${PKG_BUILD_TARGET}")
endif()
execute_process(COMMAND "sw_vers" "-productVersion" OUTPUT_VARIABLE PKG_TARGET_VERSION)
elseif(_wx_selected_config MATCHES "androideabi-qt-arm64")
set(PKG_TARGET "Android")
Expand Down
45 changes: 28 additions & 17 deletions cmake/in-files/cloudsmith-upload.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -228,32 +228,43 @@ pwd
ls -la
ls -la ~/.

# Find if file exists in directory
function have_any() {
[ $# -gt 0 ]
}

if [ ! -z ${LOCAL_DEPLOY+x} ]; then
if [ -d "/home/circleci/circleci-output" ]; then
sudo cp build/*.gz ~/circleci-output
sudo cp build/*.deb ~/circleci-output
sudo cp build/*.xml ~/circleci-output
if have_any ./build/*.deb; then
sudo cp build/*.deb ~/circleci-output
elif have_any ./build/*.exe; then
sudo cp build/*.exe ~/circleci-output
fi
else
echo "Directory ~/circleci-output not found"
fi
elif [ $LOCAL_BUILD = false ]; then
cloudsmith push raw --republish --no-wait-for-sync \
--name @PACKAGE_NAME@-@PACKAGE_VERSION@-@PKG_TARGET@-@ARCH@-@PKG_TARGET_VERSION@-${OCPN_TARGET}-metadata \
--version ${VERSION} \
--summary "@PACKAGE@ opencpn plugin metadata for automatic installation" \
$REPO $xml

cloudsmith push raw --republish --no-wait-for-sync \
--name $tarball_name \
--version ${VERSION} \
--summary "@PACKAGE@ opencpn plugin tarball for automatic installation" \
$REPO $tarball
# Only upload if the owner did the pull request. Non-owners probably don't have security to upload to the cloudsmith repository
if [ "$CIRCLE_PROJECT_USERNAME" = "$CIRCLE_USERNAME" ]; then
cloudsmith push raw --republish --no-wait-for-sync \
--name @PACKAGE_NAME@-@PACKAGE_VERSION@-@PKG_TARGET@-@ARCH@-@PKG_TARGET_VERSION@-${OCPN_TARGET}-metadata \
--version ${VERSION} \
--summary "@PACKAGE@ opencpn plugin metadata for automatic installation" \
$REPO $xml

if [ "${PKG_EXT}" != "gz" ] && [ "$pkg" != "" ]; then
cloudsmith push raw --republish --no-wait-for-sync \
--name opencpn-package-@PACKAGE@-@PACKAGE_VERSION@-@PKG_TARGET@-@ARCH@-@PKG_TARGET_VERSION@-${OCPN_TARGET}.${PKG_EXT} \
--name $tarball_name \
--version ${VERSION} \
--summary "@PACKAGE@ .${PKG_EXT} installation package" \
$REPO $pkg
--summary "@PACKAGE@ opencpn plugin tarball for automatic installation" \
$REPO $tarball

if [ "${PKG_EXT}" != "gz" ] && [ "$pkg" != "" ]; then
cloudsmith push raw --republish --no-wait-for-sync \
--name opencpn-package-@PACKAGE@-@PACKAGE_VERSION@-@PKG_TARGET@-@ARCH@-@PKG_TARGET_VERSION@-${OCPN_TARGET}.${PKG_EXT} \
--version ${VERSION} \
--summary "@PACKAGE@ .${PKG_EXT} installation package" \
$REPO $pkg
fi
fi
fi
1 change: 0 additions & 1 deletion cmake/in-files/version.h.extra
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// empty file
#define WX_GRAPHIC_CONTEXT ${WX_GRAPHICS_CONTEXT}
1 change: 1 addition & 0 deletions include/WVicons.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class WVicons
void ChangeScheme(void);

wxBitmap m_bm_windvane_pi;
wxBitmap m_bm_windvane_properties_pi;
wxBitmap m_bm_windvane_toggled_pi;
wxBitmap m_bm_windvane_grey_pi;
wxString m_s_windvane_pi;
Expand Down
Loading

0 comments on commit 22bf85c

Please sign in to comment.