Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win changes #127

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 6 additions & 53 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,18 @@
language: cpp

matrix:
include:
- dist: trusty
compiler: gcc
- os: osx
compiler: clang

install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
sudo apt-get -qq update;
sudo apt-get install libwxgtk3.0-dev libwxgtk3.0-0 libgps-dev libglu1-mesa-dev libgtk2.0-dev libbz2-dev libtinyxml-dev;
sudo apt-get install libportaudio2 portaudio19-dev libcurl4-openssl-dev libexpat1-dev libcairo2-dev librtlsdr-dev;
sudo apt-get install rpm;
fi

# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install wxmac --devel; fi
# We do not use wxmac, everything comes in the prebuilt tarball downloaded bellow
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
brew install cairo libexif libarchive portaudio;
wget http://opencpn.navnux.org/build_deps/cairo_macos107.tar.xz;
tar xJf cairo_macos107.tar.xz -C /tmp;
wget http://opencpn.navnux.org/build_deps/wx_opencpn_macos107.tar.xz;
tar xJf wx_opencpn_macos107.tar.xz -C /tmp;
wget http://opencpn.navnux.org/build_deps/libarchive_macos107.tar.xz;
tar xJf libarchive_macos107.tar.xz -C /tmp;
export PATH="/usr/local/opt/gettext/bin:$PATH";
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile;
wget http://s.sudre.free.fr/Software/files/Packages.dmg;
hdiutil attach Packages.dmg;
sudo installer -pkg "/Volumes/Packages 1.2.4/Install Packages.pkg" -target "/";
fi
# We install cairo and libarchive from Homebrew to pull in the dependencies, but use the custom Lion compatible build later.

- sudo apt-get -qq update
- sudo apt-get install libwxgtk3.0-dev libwxgtk3.0-0 libgps-dev libglu1-mesa-dev libgtk2.0-dev libbz2-dev libtinyxml-dev
- sudo apt-get install libportaudio2 portaudio19-dev libcurl4-openssl-dev libexpat1-dev libcairo2-dev librtlsdr-dev
- sudo apt-get install rpm
script:
- if [[ "${COVERITY_SCAN_BRANCH}" == 1 ]];
then
echo "Don't build on coverty_scan branch.";
exit 0;
fi
- mkdir build && cd build
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
cmake -DCMAKE_BUILD_TYPE=Release ../;
make -sj2 package;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
cmake -DOCPN_USE_LIBCPP=ON -DwxWidgets_CONFIG_EXECUTABLE=/tmp/wx_opencpn_macos107/bin/wx-config -DwxWidgets_CONFIG_OPTIONS="--prefix=/tmp/wx_opencpn_macos107" -DLibArchive_INCLUDE_DIR=/tmp/libarchive_macos107/include -DLibArchive_LIBRARY=/tmp/libarchive_macos107/lib/libarchive.dylib -DCAIRO_INCLUDE_DIR=/tmp/cairo_macos107/include -DCAIRO_LIBRARY=/tmp/cairo_macos107/lib/libcairo.dylib -DCMAKE_INSTALL_PREFIX=/tmp/opencpn ..;
make -s;
mkdir -p /tmp/opencpn/bin/OpenCPN.app/Contents/MacOS/;
chmod 644 /usr/local/lib/lib*.dylib;
cp /usr/local/lib/libportaudio.2.dylib .;
cp /tmp/libarchive_macos107/lib/libarchive.16.dylib /tmp/opencpn/bin/OpenCPN.app/Contents/MacOS/;
cp /tmp/cairo_macos107/lib/libcairo.2.dylib /tmp/opencpn/bin/OpenCPN.app/Contents/MacOS/;
make install;
# librtlsdr.0.dylib still missing
#make create-pkg;
fi
- cmake -DCMAKE_BUILD_TYPE=Release ../
- make -j2 package

notifications:
email: false
Expand Down
4 changes: 4 additions & 0 deletions src/WeatherFaxUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ WeatherFaxBase::WeatherFaxBase( wxWindow* parent, wxWindowID id, const wxString&

// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WeatherFaxBase::OnClose ) );
#ifdef __OCPN__ANDROID__
m_lFaxes->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( WeatherFaxBase::OnLeftDown ), NULL, this );
m_lFaxes->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( WeatherFaxBase::OnLeftUp ), NULL, this );
#endif
m_lFaxes->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( WeatherFaxBase::OnFaxes ), NULL, this );
m_lFaxes->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( WeatherFaxBase::OnEdit ), NULL, this );
this->Connect( m_menuItem61->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( WeatherFaxBase::OnInternet ) );
Expand Down Expand Up @@ -219,8 +221,10 @@ WeatherFaxBase::~WeatherFaxBase()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( WeatherFaxBase::OnClose ) );
#ifdef __OCPN__ANDROID__
m_lFaxes->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( WeatherFaxBase::OnLeftDown ), NULL, this );
m_lFaxes->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( WeatherFaxBase::OnLeftUp ), NULL, this );
#endif
m_lFaxes->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( WeatherFaxBase::OnFaxes ), NULL, this );
m_lFaxes->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( WeatherFaxBase::OnEdit ), NULL, this );
this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( WeatherFaxBase::OnInternet ) );
Expand Down
32 changes: 16 additions & 16 deletions src/libaudiofile/config.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#if defined(__MSVC__)
#if defined(__MSVC__)
#include <BaseTsd.h>
typedef int ssize_t;
#define snprintf _snprintf
#define HAVE_UNISTD_H 0

#pragma warning(disable: 4244)
#pragma warning(disable: 4800)

#else
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
#endif

#if (defined(__GNUC__) && defined(__STRICT_ANSI__)) || (defined(_MSC_VER) && !defined(__cplusplus)) /* Visual Studio */
# define inline __inline /* Visual C is not C99, but supports some kind of inline */
#endif
typedef int ssize_t;
#define snprintf _snprintf
#define HAVE_UNISTD_H 0
#pragma warning(disable: 4244)
#pragma warning(disable: 4800)
#else
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
#endif
#if (defined(__GNUC__) && defined(__STRICT_ANSI__)) || (defined(_MSC_VER) && !defined(__cplusplus)) /* Visual Studio */
# define inline __inline /* Visual C is not C99, but supports some kind of inline */
#endif