Skip to content

Commit

Permalink
update to FE2 1.0.297.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jongough committed Mar 15, 2024
1 parent 6faff92 commit c514acd
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 83 deletions.
129 changes: 58 additions & 71 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parameters:
type: boolean
default: true

## Start of build control of O58 and O562 plugins
## Start of build control of O58 and O562 pluginsrun_workflow_deploy
## run_workflow_deploy_O58
## type: boolean
## default: true
Expand All @@ -33,15 +33,10 @@ workflows:
<<: *std-filters
- build-android-armhf:
<<: *std-filters
# Duplicate macos-universal covers this.
# - build-macos-wx32:
# <<: *std-filters
- build-flatpak-arm64-2208:
<<: *std-filters
- build-flatpak-x86-2208:
<<: *std-filters
## flatpak-armhf has Insufficient performance.
## Appveyor can also build for Windows.
- build-msvc-wx32-2022:
<<: *std-filters
- build-debian-arm64-12-bookworm:
Expand All @@ -56,7 +51,7 @@ workflows:
<<: *std-filters
- build-debian-x86_64-11-bullseye:
<<: *std-filters
## KEEP needed for Jammy with wx32
### KEEP needed for Jammy with wx32
- build-ubuntu-x86_64-2204-jammy:
<<: *std-filters
- build-macos-universal:
Expand All @@ -68,68 +63,50 @@ workflows:
## Circleci will not build for macos 11 so removed - 18/10/2023
- build-macos:
<<: *std-filters
## Appveyor no longer builds for Windows.
- build-msvc-2022:
<<: *std-filters
## Removed as build environments and cloudsmith upload is depricated
# - build-debian-armhf-10-buster:
# <<: *std-filters
# - build-debian-armhf-10-buster-gtk3:
# <<: *std-filters
# - build-debian-arm64-10-buster:
# <<: *std-filters
## Cloudsmith-cli not currently working, appears to be a python3 error: jg 19/02/2024
# - build-debian-x86_64-10-buster:
# <<: *std-filters

## -------------------------------------
## UBUNTU OS Frozen - 28/05/2023 DROP
## -------------------------------------
## KEEP needed for Raspbian OpenCPN v5.6
- build-ubuntu-armhf-1804-buster:
<<: *std-filters
## - build-ubuntu-x86_64-1804-bionic:
## <<: *std-filters
## - build-ubuntu-x86_64-1804-bionic-gtk3:
## <<: *std-filters
## - build-ubuntu-armhf-2004-focal-gtk3:
## <<: *std-filters
## - build-ubuntu-x86_64-2004-focal-gtk3:
## <<: *std-filters
# - build-ubuntu-armhf-1804-buster:
# <<: *std-filters

orbs:
cloudsmith: cloudsmith/[email protected]
win: circleci/[email protected]

commands:
deploy-code:
parameters:
install-python:
install_python:
type: boolean
default: false
DEPLOY-USE-ORB:
deploy_use_orb:
type: boolean
default: true
steps:
- when:
condition: <<pipeline.parameters.run_workflow_deploy>>
steps:
- when:
condition: <<parameters.install-python>>
condition: <<parameters.install_python>>
steps:
- run: sudo apt install -y python3-pip
- run: python3 -m pip install cloudsmith-cli
- when:
condition: <<parameters.DEPLOY-USE-ORB>>
condition: <<parameters.deploy_use_orb>>
steps:
- cloudsmith/ensure-api-key
- cloudsmith/install-cli
- run: bash ci/cloudsmith-upload.sh

# if you want to use a local proxy add Acquire::http::Proxy \"http://192.168.1.1:3142\"; to a file called circleci-cache/apt-proxy. This will require
# --volume {your local directory}/circleci-cache:/home/circleci/circleci-cache
# on the circleci local command line so that the docker image script can have access to the directory
# if you are on a slow or data limited internet link you can put a copy of master.zip here, or allow one to be downloaded by the script, as it is used by the android builds to
# provide the wxWidgets QT information.
# if you want to use a local proxy add Acquire::http::Proxy \"http://192.168.1.1:3142\"; to a file called circleci-cache/apt-proxy. This will require
# --volume {your local directory}/circleci-cache:/home/circleci/circleci-cache
# on the circleci local command line so that the docker image script can have access to the directory
# if you are on a slow or data limited internet link you can put a copy of master.zip here, or allow one to be downloaded by the script, as it is used by the android builds to
# provide the wxWidgets QT information.

jobs:
## ---------------------
Expand All @@ -142,67 +119,73 @@ jobs:
environment:
- OCPN_TARGET: android-arm64
- DEPLOY_USE_ORB: true
- INSTALL_PYTHON: true
steps:
- checkout
- run: chmod a+x ci/*.sh
- run: bash ci/circleci-build-android-arm64.sh
- deploy-code:
install-python: true
install_python: true
build-android-armhf:
docker:
- image: cimg/android:2023.12-ndk
resource_class: large
environment:
- OCPN_TARGET: android-armhf
- DEPLOY_USE_ORB: true
- INSTALL_PYTHON: true
steps:
- checkout
- run: chmod a+x ci/*.sh
- run: bash ci/circleci-build-android-armhf.sh
- deploy-code:
install-python: true
install_python: true
build-macos-wx32:
macos:
xcode: "13.4"
environment:
- OCPN_TARGET: macos
- CLOUDSMITH_PKG_EXT: pkg
- DEPLOY_USE_ORB: true
- WX_VER: 32
- WX_VER: "32"
- DEPLOY_USE_ORB: false
steps:
- checkout
- run: chmod a+x ci/*.sh
- run: bash ci/circleci-build-macos.sh
- deploy-code
- deploy-code:
deploy_use_orb: false
build-macos-universal:
macos:
xcode: "13.4"
environment:
- OCPN_TARGET: macos
- CMAKE_BUILD_PARALLEL_LEVEL: 2
- WX_VER: 32
OCPN_TARGET: macos
CMAKE_BUILD_PARALLEL_LEVEL: 2
WX_VER: 32
DEPLOY_USE_ORB: false
INSTALL_PYTHON: false
steps:
- checkout
- run: sudo chmod go+w /usr/local
- restore_cache:
key: "{{checksum \"build-deps/macos-cache-stamp\"}}\
-{{checksum \"cmake/MacosWxwidgets.cmake\"}}\
-{{checksum \"ci/circleci-build-macos-universal.sh\"}}"
- run: chmod a+x ci/*.sh
- run: chmod a+x cmake/*.sh
- run: ci/circleci-build-macos-universal.sh
- save_cache:
key: "{{checksum \"build-deps/macos-cache-stamp\"}}\
-{{checksum \"cmake/MacosWxwidgets.cmake\"}}\
-{{checksum \"ci/circleci-build-macos-universal.sh\"}}"
paths:
- /tmp/local.cache.tar
- /Users/distiller/project/cache
- run: >
sh -c "otool -L build/*.dylib"
- run: >
sh -c "cat build/*.xml"
- deploy-code
- checkout
- run: sudo chmod go+w /usr/local
- restore_cache:
key: "{{checksum \"build-deps/macos-cache-stamp\"}}\
-{{checksum \"cmake/MacosWxwidgets.cmake\"}}\
-{{checksum \"ci/circleci-build-macos-universal.sh\"}}"
- run: chmod a+x ci/*.sh
- run: chmod a+x cmake/*.sh
- run: ci/circleci-build-macos-universal.sh
- save_cache:
key: "{{checksum \"build-deps/macos-cache-stamp\"}}\
-{{checksum \"cmake/MacosWxwidgets.cmake\"}}\
-{{checksum \"ci/circleci-build-macos-universal.sh\"}}"
paths:
- /tmp/local.cache.tar
- /Users/distiller/project/cache
- run: >
sh -c "otool -L build/*.dylib"
- run: >
sh -c "cat build/*.xml"
- deploy-code:
deploy_use_orb: false
build-msvc-wx32-2022:
executor:
name: win/server-2022
Expand All @@ -211,14 +194,15 @@ jobs:
- OCPN_TARGET: MSVC
- MSVC_VERSION: 2022
- WX_VER: 32
- DEPLOY_USE_ORB: false
steps:
- checkout
- run:
privileged: False
shell: cmd.exe
command: ci\circleci-build-msvc.bat
- deploy-code:
DEPLOY-USE-ORB: false
deploy_use_orb: false
build-flatpak-arm64-2208:
machine:
image: ubuntu-2004:202101-01
Expand Down Expand Up @@ -311,7 +295,7 @@ jobs:
environment:
- OCPN_TARGET=bullseye-armhf
- DOCKER_IMAGE=jongough/debian-armhf:bullseye
- BUILD_FLAGS=-j3
- BUILD_FLbuild-debian-arm64-12-bookwormAGS=-j3
- BUILD_ENV=debian
- BUILD_GTK3: true
- DEPLOY_USE_ORB: true
Expand Down Expand Up @@ -390,13 +374,15 @@ jobs:
environment:
- OCPN_TARGET: macos
- CLOUDSMITH_PKG_EXT: pkg
- DEPLOY_USE_ORB: true
- WX_VER: 315
- DEPLOY_USE_ORB: false
steps:
- checkout
- run: chmod a+x ci/*.sh
- run: bash ci/circleci-build-macos.sh
- deploy-code
- deploy-code:
deploy_use_orb: false

## Appveyor doesn't build for Windows now.
## If below is used, WinXT will not work.
build-msvc-2022:
Expand All @@ -407,14 +393,15 @@ jobs:
- OCPN_TARGET: MSVC
- MSVC_VERSION: 2022
- WX_VER: 31
- DEPLOY_USE_ORB: false
steps:
- checkout
- run:
privileged: False
shell: cmd.exe
command: ci\circleci-build-msvc.bat
- deploy-code:
DEPLOY-USE-ORB: false
deploy_use_orb: false

## -------------------------------------------
## Ubuntu OS - Generally deprecated and not used.
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
## * xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *
#-----------------------------------------------------------------------------
# Frontend2 Author: Jon Gough
# Testplugn(TP) v1.0.294.0 19/02/2024 DD/MM/YYYY format
# Testplugn(TP) v1.0.297.0 15/03/2024 DD/MM/YYYY format
# buildCI:yes provideODAPI:yes validateJSON:yes
# ---------------------------------------------------------------------------
## -- When changing this file do NOT change the order of the sections. -- ##
Expand Down Expand Up @@ -60,9 +60,9 @@ set(PACKAGE "ocpn_draw")

set(VERSION_MAJOR "1")
set(VERSION_MINOR "8")
set(VERSION_PATCH "47")
set(VERSION_PATCH "48")
set(VERSION_TWEAK "0")
set(VERSION_DATE "22/02/2024") # DD/MM/YYYY forma0t
set(VERSION_DATE "15/03/2024") # DD/MM/YYYY forma0t
set(OCPN_MIN_VERSION "ov50")
set(OCPN_API_VERSION_MAJOR "1")
set(OCPN_API_VERSION_MINOR "17")
Expand Down
5 changes: 4 additions & 1 deletion ci/circleci-build-macos-universal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ pkg_version() { brew list --versions $2 $1 | tail -1 | awk '{print $2}'; }
brew list --versions libexif || brew update-reset

# Install packaged dependencies
for pkg in cmake gettext libarchive libexif python wget openssl@3; do
for pkg in cmake gettext libarchive libexif python3 wget openssl@3; do
brew list --versions $pkg || brew install $pkg || brew install $pkg || :
brew link --overwrite $pkg || brew install $pkg
done

#Install python virtual environment
/usr/bin/python3 -m venv $HOME/cs-venv

#Install prebuilt dependencies
wget -q https://dl.cloudsmith.io/public/nohal/opencpn-plugins/raw/files/macos_deps_universal.tar.xz \
-O /tmp/macos_deps_universal.tar.xz
Expand Down
7 changes: 5 additions & 2 deletions ci/circleci-build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ set -o pipefail
# Check if the cache is with us. If not, re-install brew.
brew list --versions libexif || brew update-reset

for pkg in cairo cmake gettext libarchive libexif python wget; do
for pkg in cairo cmake gettext libarchive libexif python3 wget; do
brew list --versions $pkg || brew install $pkg || brew install $pkg || :
brew link --overwrite $pkg || brew install $pkg
done

if [ -n "$WX_VER" ] && [ "$WX_VER" -eq "32" ]; then
if [ -n "${WX_VER}" ] && [ "${WX_VER}" -eq "32" ]; then
echo "Building for WXVERSION 32";
WX_URL=https://download.opencpn.org/s/Djqm4SXzYjF8nBw/download
WX_DOWNLOAD=/tmp/wx321_opencpn50_macos1010.tar.xz
Expand All @@ -31,6 +31,9 @@ else
MACOSX_DEPLOYMENT_TARGET=10.10
fi

#Install python virtual environment
/usr/bin/python3 -m venv $HOME/cs-venv

# Download required binaries using wget, since curl causes an issue with Xcode 13.1 and some specific certificates.
# Inspect the response code to see if the file is downloaded properly.
# If the download failed or file does not exist, then exit with an error.
Expand Down
6 changes: 1 addition & 5 deletions cmake/PluginConfigure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,7 @@ if("${PKG_BUILD_TARGET}" STREQUAL "")
endif()

if(NOT WIN32 AND NOT APPLE AND NOT QT_ANDROID)
if(NOT "$ENV{BUILD_GTK3}" STREQUAL "TRUE")
find_package(GTK2 QUIET)
else()
set(GTK2_FOUND "FALSE")
endif()
find_package(GTK2)

if(GTK2_FOUND AND NOT "$ENV{BUILD_GTK3}" STREQUAL "TRUE")
set(wxWidgets_CONFIG_OPTIONS ${wxWidgets_CONFIG_OPTIONS} --toolkit=gtk2)
Expand Down
5 changes: 4 additions & 1 deletion cmake/in-files/cloudsmith-upload.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fi
set -x

if [ "$CIRCLECI" ] || [ "$TRAVIS" ]; then
if [ ! "$DEPLOY_USE_ORB" ]; then
if [ "$DEPLOY_USE_ORB" != "true" ]; then
if pyenv versions 2>&1 >/dev/null; then
pyenv versions
if ! pyenv global 3.9.1 2>&1 >/dev/null; then
Expand All @@ -83,6 +83,9 @@ if [ "$CIRCLECI" ] || [ "$TRAVIS" ]; then
python3 --version
sudo python3 -m pip install cloudsmith-cli
pyenv rehash
elif test -d $HOME/cs-venv; then
source $HOME/cs-venv/bin/activate
python -m pip install cloudsmith-cli
elif dnf --version 2>&1 >/dev/null; then
sudo dnf -y install python3-pip python3-setuptools
sudo python3 -m pip install -q cloudsmith-cli
Expand Down

0 comments on commit c514acd

Please sign in to comment.