Skip to content

Commit

Permalink
Merge pull request #438 from jongough/update_1.8
Browse files Browse the repository at this point in the history
Update 1.8
  • Loading branch information
jongough authored Jun 4, 2020
2 parents acf0086 + 96fe495 commit c689fd7
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 98 deletions.
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ deploy:
description: 'release created by AppVeyor CI'
provider: GitHub
#auth_token: '%GitHub_auth_token%'
auth_token: '%GIT-PTOKEN-testplugin_pi-INTO-APPVEYOR%'
auth_token: #'%GIT-PTOKEN-ocpn_draw_pi-INTO-APPVEYOR%'
secure: "LBNZqgBxrVxzPGVf2gH5hVgOmjFuPD/LiA1F6NFWx4jHgdx4HAw4i1JGglr/+ZZg"
artifact: installer,portable
draft: true
prerelease: true
Expand Down
9 changes: 7 additions & 2 deletions ci/circleci-build-raspbian-armhf.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

#
# Build for Raspbian in a docker container
#

# bailout on errors and echo commands.
Expand All @@ -12,10 +13,14 @@ echo "DOCKER_OPTS=\"-H tcp://127.0.0.1:2375 -H $DOCKER_SOCK -s devicemapper\"" |
sudo service docker restart
sleep 5;

docker run --rm --privileged multiarch/qemu-user-static:register --reset
if [ "$BUILD_ENV" = "raspbian" ]; then
docker run --rm --privileged multiarch/qemu-user-static:register --reset
else
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
fi

docker run --privileged -d -ti -e "container=docker" -v $(pwd):/ci-source:rw $DOCKER_IMAGE /bin/bash
DOCKER_CONTAINER_ID=$(docker ps | grep raspbian | awk '{print $1}')
DOCKER_CONTAINER_ID=$(docker ps | grep $BUILD_ENV | awk '{print $1}')

docker exec -ti $DOCKER_CONTAINER_ID apt-get update
docker exec -ti $DOCKER_CONTAINER_ID apt-get -y install git cmake build-essential cmake gettext wx-common libgtk2.0-dev libwxgtk3.0-dev libbz2-dev libcurl4-openssl-dev libexpat1-dev libcairo2-dev libarchive-dev liblzma-dev libexif-dev lsb-release
Expand Down
5 changes: 4 additions & 1 deletion ci/cloudsmith-upload.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Run created upload script
#
# Run created cloudsmith upload script
#

CURRENT_DIR=$(pwd)
bash $CURRENT_DIR/build/cloudsmith-upload.sh
15 changes: 0 additions & 15 deletions ci/docker-build-fedora.sh

This file was deleted.

19 changes: 0 additions & 19 deletions ci/toolchain.cmake

This file was deleted.

9 changes: 7 additions & 2 deletions ci/travis-build-raspbian-armhf-part1.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

#
# Travis build for raspian part 1
#

# bailout on errors and echo commands.
Expand All @@ -14,14 +15,18 @@ echo "DOCKER_OPTS=\"-H tcp://127.0.0.1:2375 -H $DOCKER_SOCK -s devicemapper\"" \
sudo service docker restart;
sleep 5;

docker run --rm --privileged multiarch/qemu-user-static:register --reset
if [ "$BUILD_ENV" = "raspbian" ]; then
docker run --rm --privileged multiarch/qemu-user-static:register --reset
else
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
fi

docker run --privileged -d -ti -e "container=docker" \
-v ~/source_top:/source_top \
-v $(pwd):/ci-source:rw \
$DOCKER_IMAGE /bin/bash

DOCKER_CONTAINER_ID=$(sudo docker ps | grep raspbian | awk '{print $1}')
DOCKER_CONTAINER_ID=$(sudo docker ps | grep $BUILD_ENV | awk '{print $1}')

docker exec -ti $DOCKER_CONTAINER_ID apt-get update
docker exec -ti $DOCKER_CONTAINER_ID echo "------\nEND apt-get update\n"
Expand Down
5 changes: 3 additions & 2 deletions ci/travis-build-raspbian-armhf-part2.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/usr/bin/env bash

#
# Travis build for raspbian part 2
#

# bailout on errors and echo commands.
set -xe

DOCKER_CONTAINER_ID=$(sudo docker ps | grep raspbian | awk '{print $1}')
DOCKER_CONTAINER_ID=$(sudo docker ps | grep $BUILD_ENV | awk '{print $1}')

echo $TRAVIS_BRANCH
echo $OCPN_TARGET

docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec \
"export TRAVIS=$TRAVIS; export TRAVIS_BRANCH=$TRAVIS_BRANCH; export OCPN_TARGET=$OCPN_TARGET; export BUILD_FLAGS=$BUILD_FLAGS; rm -rf ci-source/build; mkdir ci-source/build; cd ci-source/build; cmake ..; make $BUILD_FLAGS; make package; chmod -R a+rw ../build;"
"export TRAVIS=$TRAVIS; export TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG; export TRAVIS_BRANCH=$TRAVIS_BRANCH; export OCPN_TARGET=$OCPN_TARGET; export BUILD_FLAGS=$BUILD_FLAGS; rm -rf ci-source/build; mkdir ci-source/build; cd ci-source/build; cmake ..; make $BUILD_FLAGS; make package; chmod -R a+rw ../build;"

echo "Stopping"
docker ps -a
Expand Down
52 changes: 0 additions & 52 deletions ci/travis-build-raspbian-armhf.sh

This file was deleted.

10 changes: 10 additions & 0 deletions cmake/in-files/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
The files in this directory are not executed but are transformed or used by the build process.

version.h.in is updated to include the current settings from CMakeLists.txt and put in a location that
is part of the include directory set. Source code that needs these settings just have to use:
#include "version.h"
at/near the top of the source code file.

the wxWTranslateCatalog.h.in file is used to ensure that the plugins language files are accessed rather than
OpenCPN language files. This allows for change of context of words to be applied correctly. Without this there
can be confusion when a language uses a different word translation in different contexts.
4 changes: 0 additions & 4 deletions cmake/in-files/version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
#define PLUGIN_VERSION_TWEAK ${VERSION_TWEAK}
#define PLUGIN_VERSION_DATE "${VERSION_DATE}"
#define PLUGIN_COMMON_NAME "${COMMON_NAME}"
#define OCPN_MIN_VERSION ${OCPN_MIN_VERSION}
// API version of OCPN to use
#define OCPN_API_VERSION_MAJOR ${OCPN_API_VERSION_MAJOR}
#define OCPN_API_VERSION_MINOR ${OCPN_API_VERSION_MINOR}
// OD API Version
#define OD_API_VERSION_MAJOR ${OD_API_VERSION_MAJOR}
#define OD_API_VERSION_MINOR ${OD_API_VERSION_MINOR}
22 changes: 22 additions & 0 deletions cmake/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The *.cmake files in this directory provide resources to build the make environment. However, the contents of these
files is mainly static, so this helps reduce the size and complexity of the main CMakeLists.txt file.

The following files are manadatory for the cmake process to work:
pluginConfigure.cmake
PluginInstall.cmake
PluginLocalization.cmake
PluginPackage.cmake
PluginSetup.cmake

These file should only be changed with great care as they use generalised processes to handle the generation of the
build environments. If you need to add functionality that you need for your plugin then add extra cmake files here
for your purpose. It is strongly suggested that you do not change these files as if updates to the process are
required it is much easier to do a file replace than identify what has changed.

An example of an 'extra' cmake file can be seen with:
FindTinyXML.cmake

Extra files are added to the CMakeLists.txt file by using an include statement such as:
include("cmake/FindTinyXML.cmake")

Please be case sensitive as it may work on windows builds without this but Linux builds will not.

0 comments on commit c689fd7

Please sign in to comment.