Re: Deco calculation for repetitive dive - strange effect

2017-02-06 Thread Robert Helling
Hi,

> On 06 Feb 2017, at 19:30, Robert Helling  wrote:
> 
> a no progress report: I guessed it’s the max_ambient_pressure but now I know, 
> it is not. Tonight, I will not have further time to look into this (we have 
> visitors), so if someone else wants to give it a try: There are a few other 
> state variables of VPM-B, all defined as global variables in deco.c. I would 
> next try max_crushing pressure (by resetting this between dives and see if 
> this makes the deco almost independent of the day. In Buehlmann, one can see, 
> that the difference in saturation is only minimal).
> 

I think I understand this now. This is a „feature“ of the VPM-B model. (For 
some background on this model see http://euve10195.vserver.de/wp/?p=27 
 or the German version 
http://euve10195.vserver.de/wp/?p=46 )

One of the state variables of this model is the „crushing radius“ (here r_reg) 
defined by

2(γc−γ)rreg=pmax+2(γc−γ)rcrit
which enters the calculation of the allowed gradient (at least in the first 
iteration) as

G0=2γγcγc–γrreg.

If you are doing repetitive diving, this is tracked between dives and since 
p_max (the maximal over pressure during the dives) enters the maximal depth 
encountered is relevant for the deco. Your first dive has a depth of 60m so it 
sets this variable also for the second dive which is only 40m. Thus, according 
to these formulas, it allows for a bigger gradient which means it is more 
liberal with respect to over pressure in the tissues which results in shorter 
deco.

And no, I don’t think this makes sense. But it is the model. It is not the 
first oddity of this model we come across.

As far as Subsurface is concerned, I guess we should leave it as is (after all, 
people want „the real model“, if we would change the behaviour of Subsurface we 
would break with the original Baker code and people will hate us for this).

Thanks for finding this out. Once I have a bit more time, I will write about 
this in my blog.

Best
Robert


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH] Fix syntax error in android/build.sh

2017-02-06 Thread Anton Lundin
On 07 February, 2017 - Willem Ferguson wrote:

> diff --git a/packaging/android/build.sh b/packaging/android/build.sh
> index 3cfaf47..57f94ca 100644
> --- a/packaging/android/build.sh
> +++ b/packaging/android/build.sh
> @@ -379,7 +379,7 @@ else
>  
>   # android-mobile is hardcoded in CMakeLists.txt nowadays.
>   rm -rf android-mobile
> - cp -a "$SUBSURFACE_SOURCE/android android-mobile"
> + cp -a "$SUBSURFACE_SOURCE/android" android-mobile
>   sed -i -e 
> "s/@SUBSURFACE_VERSION@/\"$SUBSURFACE_VERSION\"/;s/@BUILD_NR@/$BUILD_NR/" 
> android-mobile/AndroidManifest.xml
>  fi

Wops. LGTM


//Anton


-- 
Anton Lundin+46702-161604
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] Fix syntax error in android/build.sh

2017-02-06 Thread Willem Ferguson

Subject: [PATCH] Fix syntax error in android/build.sh


Signed-off-by: Willem Ferguson 

>From 413479abaa3d03861762107534bba1de10bced21 Mon Sep 17 00:00:00 2001
From: Willem Ferguson 
Date: Tue, 7 Feb 2017 08:15:33 +0200
Subject: [PATCH 5/5] [PATCH] Fix syntax error in android/build.sh

Signed-off-by: Willem Ferguson 
---
 packaging/android/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 3cfaf47..57f94ca 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -379,7 +379,7 @@ else
 
 	# android-mobile is hardcoded in CMakeLists.txt nowadays.
 	rm -rf android-mobile
-	cp -a "$SUBSURFACE_SOURCE/android android-mobile"
+	cp -a "$SUBSURFACE_SOURCE/android" android-mobile
 	sed -i -e "s/@SUBSURFACE_VERSION@/\"$SUBSURFACE_VERSION\"/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml
 fi
 
-- 
2.7.4

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 05/12] android-wrapper: Quiet down wget

2017-02-06 Thread Dirk Hohndel
On Mon, Feb 06, 2017 at 03:55:35PM +0100, Anton Lundin wrote:
> Signed-off-by: Anton Lundin 
> ---
>  packaging/android/android-build-wrapper.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/packaging/android/android-build-wrapper.sh 
> b/packaging/android/android-build-wrapper.sh
> index 3eadf92..60325c8 100644
> --- a/packaging/android/android-build-wrapper.sh
> +++ b/packaging/android/android-build-wrapper.sh
> @@ -55,7 +55,7 @@ fi
>  
> QT_DOWNLOAD_URL=https://download.qt.io/archive/qt/${QT_VERSION}/${LATEST_QT}/${QT_BINARIES}
>  if [ ! -d Qt${LATEST_QT} ] ; then
>   if [ ! -f ${QT_BINARIES} ] ; then
> - wget ${QT_DOWNLOAD_URL}
> + wget -q ${QT_DOWNLOAD_URL}

I took this (because I find the MASSIVELY verbose output annoying, too),
but we should at least have a warning for the interactive user that says
something like "downloading 700+MB of data - depending on your internet
speed this could take a while. And similar warnings (with smaller sizes,
of course) below...

/D

>   fi
>   echo "In the binary installer select $(pwd)/${LATEST_QT} as install 
> directory"
>   chmod +x ./${QT_BINARIES}
> @@ -70,14 +70,14 @@ sed -i 's/set_property(TARGET Qt5::Core PROPERTY 
> INTERFACE_COMPILE_FEATURES cxx_
>  # next we need to get the Android SDK and NDK
>  if [ ! -d $ANDROID_NDK ] ; then
>   if [ ! -f $NDK_BINARIES ] ; then
> - wget https://dl.google.com/android/repository/$NDK_BINARIES
> + wget -q https://dl.google.com/android/repository/$NDK_BINARIES
>   fi
>   unzip $NDK_BINARIES
>  fi
>  
>  if [ ! -d $ANDROID_SDK ] ; then
>   if [ ! -f $SDK_TOOLS ] ; then
> - wget https://dl.google.com/android/repository/$SDK_TOOLS
> + wget -q https://dl.google.com/android/repository/$SDK_TOOLS
>   fi
>   mkdir $ANDROID_SDK
>   pushd $ANDROID_SDK
> -- 
> 2.9.3
> 
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Subsurface on FOSDEM

2017-02-06 Thread Philip Balister
I failed to escape the sdr devrrom, but I see the link to the video is
live in the link below.

Philip

On 01/29/2017 10:02 PM, Philip Balister wrote:
> On 01/29/2017 04:50 PM, Tomaz Canabrava wrote:
>> Desktop room I think
> 
> Yep. I'll try and escape the sdr room.
> 
> https://fosdem.org/2017/schedule/event/desktops_from_gtk_to_qt_subsurface_mobile/
> 
> Philip
> 
>>
>> On Sun, 29 Jan 2017 at 22:09, Philip Balister  wrote:
>>
>>> I'll be in the SDR devroom and the OpenEmbedded stand. Where will the
>>> talk be?
>>>
>>> Philip
>>>
>>> On 01/29/2017 03:05 PM, Tomaz Canabrava wrote:
 People,

 Just stating that I'm finishing my talk about subsurface on FOSDEM, if
 anyone of you will be there in brussells, please come to me for a hug.

 Tomaz



 ___
 subsurface mailing list
 subsurface@subsurface-divelog.org
 http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

>>>
>>
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
> 
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 07/12] android-wrapper: Auto accept android sdk license

2017-02-06 Thread Cristian Ionescu-Idbohrn
On Mon, 6 Feb 2017, Anton Lundin wrote:
> On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > > > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > > > On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > > > > > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > > > > > 
> > > > > > > Signed-off-by: Anton Lundin 
> > > > > > > ---
> > > > > > >  packaging/android/android-build-wrapper.sh | 2 +-
> > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > > 
> > > > > > > diff --git a/packaging/android/android-build-wrapper.sh 
> > > > > > > b/packaging/android/android-build-wrapper.sh
> > > > > > > index c8dd1e1..6242809 100644
> > > > > > > --- a/packaging/android/android-build-wrapper.sh
> > > > > > > +++ b/packaging/android/android-build-wrapper.sh
> > > > > > > @@ -82,7 +82,7 @@ if [ ! -d $ANDROID_SDK ] ; then
> > > > > > >   mkdir $ANDROID_SDK
> > > > > > >   pushd $ANDROID_SDK
> > > > > > >   unzip -q ../$SDK_TOOLS
> > > > > > > - bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > > > > + ( sleep 5 && while true ; do sleep 1; echo y; done ) | bash 
> > > > > > > tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > > > 
> > > > > > Can it be so that the simplier:
> > > > > > 
> > > > > > yes y | bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > > > 
> > > > > > is all you need?
> > > > > 
> > > > > Nope. sdk updater does read(0, dest, 1024) or something, so if yes 
> > > > > have
> > > > > pushed too many y\n into the buffer, it will fail when doing
> > > > > strcmp(dest, "y\n") or something alike.
> > > > > 
> > > > > Thats why odd one here.
> > > > 
> > > > I guess you've tested `yes', that's why you know ;)
> > > 
> > > Yep =)
> > 
> > Weird.  I'll do that too...  Example script: /tmp/yes.sh:
> > 
> > ---8<---
> > #!/bin/bash
> > 
> > set -eu
> > 
> > i=0
> > while read in && [ $i -lt 10 ]; do
> > i=$(($i + 1))
> > echo $i: $in
> > done
> > --->8---
> > 
> > Run with:
> > 
> > $ yes | /tmp/yes.sh;echo $?
> > 
> > output:
> > 
> > 1: y
> > 2: y
> > 3: y
> > 4: y
> > 5: y
> > 6: y
> > 7: y
> > 8: y
> > 9: y
> > 10: y
> > 0
> > 
> > Exactly what's expected.  What kind of beast is that `sdk updater' 
> > anyway?  As I read the code:
> > 
> > bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > 
> > it's a bash script.  What OS (+bash version) are you on?
> 
> The bash script is just a launcher for a java application.

I see...  Java...


Cheers,

-- 
Cristian
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 07/12] android-wrapper: Auto accept android sdk license

2017-02-06 Thread Anton Lundin
On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:

> On Mon, 6 Feb 2017, Anton Lundin wrote:
> > On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > > On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > > > > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > > > > 
> > > > > > Signed-off-by: Anton Lundin 
> > > > > > ---
> > > > > >  packaging/android/android-build-wrapper.sh | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > 
> > > > > > diff --git a/packaging/android/android-build-wrapper.sh 
> > > > > > b/packaging/android/android-build-wrapper.sh
> > > > > > index c8dd1e1..6242809 100644
> > > > > > --- a/packaging/android/android-build-wrapper.sh
> > > > > > +++ b/packaging/android/android-build-wrapper.sh
> > > > > > @@ -82,7 +82,7 @@ if [ ! -d $ANDROID_SDK ] ; then
> > > > > > mkdir $ANDROID_SDK
> > > > > > pushd $ANDROID_SDK
> > > > > > unzip -q ../$SDK_TOOLS
> > > > > > -   bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > > > +   ( sleep 5 && while true ; do sleep 1; echo y; done ) | bash 
> > > > > > tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > > 
> > > > > Can it be so that the simplier:
> > > > > 
> > > > >   yes y | bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > > 
> > > > > is all you need?
> > > > 
> > > > Nope. sdk updater does read(0, dest, 1024) or something, so if yes have
> > > > pushed too many y\n into the buffer, it will fail when doing
> > > > strcmp(dest, "y\n") or something alike.
> > > > 
> > > > Thats why odd one here.
> > > 
> > > I guess you've tested `yes', that's why you know ;)
> > 
> > Yep =)
> 
> Weird.  I'll do that too...  Example script: /tmp/yes.sh:
> 
> ---8<---
> #!/bin/bash
> 
> set -eu
> 
> i=0
> while read in && [ $i -lt 10 ]; do
> i=$(($i + 1))
> echo $i: $in
> done
> --->8---
> 
> Run with:
> 
>   $ yes | /tmp/yes.sh;echo $?
> 
> output:
> 
> 1: y
> 2: y
> 3: y
> 4: y
> 5: y
> 6: y
> 7: y
> 8: y
> 9: y
> 10: y
> 0
> 
> Exactly what's expected.  What kind of beast is that `sdk updater' 
> anyway?  As I read the code:
> 
>   bash tools/android update sdk --no-ui -a -t 1,2,3,33
> 
> it's a bash script.  What OS (+bash version) are you on?

The bash script is just a launcher for a java application.


//Anton


-- 
Anton Lundin+46702-161604
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 07/12] android-wrapper: Auto accept android sdk license

2017-02-06 Thread Cristian Ionescu-Idbohrn
On Mon, 6 Feb 2017, Anton Lundin wrote:
> On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > > > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > > > 
> > > > > Signed-off-by: Anton Lundin 
> > > > > ---
> > > > >  packaging/android/android-build-wrapper.sh | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/packaging/android/android-build-wrapper.sh 
> > > > > b/packaging/android/android-build-wrapper.sh
> > > > > index c8dd1e1..6242809 100644
> > > > > --- a/packaging/android/android-build-wrapper.sh
> > > > > +++ b/packaging/android/android-build-wrapper.sh
> > > > > @@ -82,7 +82,7 @@ if [ ! -d $ANDROID_SDK ] ; then
> > > > >   mkdir $ANDROID_SDK
> > > > >   pushd $ANDROID_SDK
> > > > >   unzip -q ../$SDK_TOOLS
> > > > > - bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > > + ( sleep 5 && while true ; do sleep 1; echo y; done ) | bash 
> > > > > tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > 
> > > > Can it be so that the simplier:
> > > > 
> > > > yes y | bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > 
> > > > is all you need?
> > > 
> > > Nope. sdk updater does read(0, dest, 1024) or something, so if yes have
> > > pushed too many y\n into the buffer, it will fail when doing
> > > strcmp(dest, "y\n") or something alike.
> > > 
> > > Thats why odd one here.
> > 
> > I guess you've tested `yes', that's why you know ;)
> 
> Yep =)

Weird.  I'll do that too...  Example script: /tmp/yes.sh:

---8<---
#!/bin/bash

set -eu

i=0
while read in && [ $i -lt 10 ]; do
i=$(($i + 1))
echo $i: $in
done
--->8---

Run with:

$ yes | /tmp/yes.sh;echo $?

output:

1: y
2: y
3: y
4: y
5: y
6: y
7: y
8: y
9: y
10: y
0

Exactly what's expected.  What kind of beast is that `sdk updater' 
anyway?  As I read the code:

bash tools/android update sdk --no-ui -a -t 1,2,3,33

it's a bash script.  What OS (+bash version) are you on?


Cheers,

-- 
Cristian
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Deco calculation for repetitive dive - strange effect

2017-02-06 Thread Robert Helling
Hi,

> On 06 Feb 2017, at 08:55, Robert Helling  wrote:
> 
> I haven’t completely understood this, but this seems to be specific to VPM-B 
> (no oddity for Buehlmann). The VPM-B model has all kinds of strange state 
> data (like what was the total time in deco, at which point do we switch from 
> bottom time to ascent etc etc). My guess it’s somewhere there where 
> repetitive dives have weird effects. Will investigate further but now day job 
> calls.
> 

a no progress report: I guessed it’s the max_ambient_pressure but now I know, 
it is not. Tonight, I will not have further time to look into this (we have 
visitors), so if someone else wants to give it a try: There are a few other 
state variables of VPM-B, all defined as global variables in deco.c. I would 
next try max_crushing pressure (by resetting this between dives and see if this 
makes the deco almost independent of the day. In Buehlmann, one can see, that 
the difference in saturation is only minimal).

Best
Robert


signature.asc
Description: Message signed with OpenPGP using GPGMail
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 07/12] android-wrapper: Auto accept android sdk license

2017-02-06 Thread Anton Lundin
On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:

> On Mon, 6 Feb 2017, Anton Lundin wrote:
> > On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > > 
> > > > Signed-off-by: Anton Lundin 
> > > > ---
> > > >  packaging/android/android-build-wrapper.sh | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/packaging/android/android-build-wrapper.sh 
> > > > b/packaging/android/android-build-wrapper.sh
> > > > index c8dd1e1..6242809 100644
> > > > --- a/packaging/android/android-build-wrapper.sh
> > > > +++ b/packaging/android/android-build-wrapper.sh
> > > > @@ -82,7 +82,7 @@ if [ ! -d $ANDROID_SDK ] ; then
> > > > mkdir $ANDROID_SDK
> > > > pushd $ANDROID_SDK
> > > > unzip -q ../$SDK_TOOLS
> > > > -   bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > > +   ( sleep 5 && while true ; do sleep 1; echo y; done ) | bash 
> > > > tools/android update sdk --no-ui -a -t 1,2,3,33
> > > 
> > > Can it be so that the simplier:
> > > 
> > >   yes y | bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > 
> > > is all you need?
> > 
> > Nope. sdk updater does read(0, dest, 1024) or something, so if yes have
> > pushed too many y\n into the buffer, it will fail when doing
> > strcmp(dest, "y\n") or something alike.
> > 
> > Thats why odd one here.
> 
> I guess you've tested `yes', that's why you know ;)

Yep =)

-- 
Anton Lundin+46702-161604
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


What? Tomaz finally managed to code again?

2017-02-06 Thread Tomaz Canabrava
Hey people,

I'm preparing a bomb patch here. currently it's 15 patches and I don't plan
to stop. ;)

0001-Boilerplate-to-unmess-the-MainTab.patch
0002-Base-class-for-the-Tabs.patch
0003-Boilerplate-for-the-classes.patch
0004-Add-KMessageWidget-from-KDE-Upstream.patch
0005-Base-code-for-the-TabWidget-that-will-handle-all-the.patch
0006-Fix-Style.patch
0007-Finished-the-add-Tab-implementation.patch
0008-Finished-the-implementation-of-the-startEditionMode.patch
0009-Finish-setCurrentDives-implementation.patch
0010-cancel-and-end-edition-implemented.patch
0011-Fix-position-of-function.patch
0012-Implement-DiscoverCurrentDives.patch
0013-Setups-the-UI-correctly-in-the-screen.patch
0014-Implement-setTabBar-method.patch
0015-Constructor-for-the-DiveTabWidget.patch

-- not attaching them because I still didn't finished.

Tomaz
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: TestParse fails

2017-02-06 Thread Miika Turkia
I'll try to check it out tomorrow

miika

> On 6 Feb 2017, at 14.51, Dirk Hohndel  wrote:
> 
> Miika,
> 
> It looks like it has been a while that TestParse has been failing, lately
> it even started crashing. I fixed the crashes (on a failed parse of CSV
> data we should try to access a non-existing dive), but I can't quite
> figure out why we no longer parse these files.
> 
> I think you are still traveling, but it would be great if you could take a
> loook.
> 
> /D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 07/12] android-wrapper: Auto accept android sdk license

2017-02-06 Thread Cristian Ionescu-Idbohrn
On Mon, 6 Feb 2017, Anton Lundin wrote:
> On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:
> > On Mon, 6 Feb 2017, Anton Lundin wrote:
> > > 
> > > Signed-off-by: Anton Lundin 
> > > ---
> > >  packaging/android/android-build-wrapper.sh | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/packaging/android/android-build-wrapper.sh 
> > > b/packaging/android/android-build-wrapper.sh
> > > index c8dd1e1..6242809 100644
> > > --- a/packaging/android/android-build-wrapper.sh
> > > +++ b/packaging/android/android-build-wrapper.sh
> > > @@ -82,7 +82,7 @@ if [ ! -d $ANDROID_SDK ] ; then
> > >   mkdir $ANDROID_SDK
> > >   pushd $ANDROID_SDK
> > >   unzip -q ../$SDK_TOOLS
> > > - bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > > + ( sleep 5 && while true ; do sleep 1; echo y; done ) | bash 
> > > tools/android update sdk --no-ui -a -t 1,2,3,33
> > 
> > Can it be so that the simplier:
> > 
> > yes y | bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > 
> > is all you need?
> 
> Nope. sdk updater does read(0, dest, 1024) or something, so if yes have
> pushed too many y\n into the buffer, it will fail when doing
> strcmp(dest, "y\n") or something alike.
> 
> Thats why odd one here.

I guess you've tested `yes', that's why you know ;)


Cheers,

-- 
Cristian
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 07/12] android-wrapper: Auto accept android sdk license

2017-02-06 Thread Anton Lundin
On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:

> On Mon, 6 Feb 2017, Anton Lundin wrote:
> > 
> > Signed-off-by: Anton Lundin 
> > ---
> >  packaging/android/android-build-wrapper.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/packaging/android/android-build-wrapper.sh 
> > b/packaging/android/android-build-wrapper.sh
> > index c8dd1e1..6242809 100644
> > --- a/packaging/android/android-build-wrapper.sh
> > +++ b/packaging/android/android-build-wrapper.sh
> > @@ -82,7 +82,7 @@ if [ ! -d $ANDROID_SDK ] ; then
> > mkdir $ANDROID_SDK
> > pushd $ANDROID_SDK
> > unzip -q ../$SDK_TOOLS
> > -   bash tools/android update sdk --no-ui -a -t 1,2,3,33
> > +   ( sleep 5 && while true ; do sleep 1; echo y; done ) | bash 
> > tools/android update sdk --no-ui -a -t 1,2,3,33
> 
> Can it be so that the simplier:
> 
>   yes y | bash tools/android update sdk --no-ui -a -t 1,2,3,33
> 
> is all you need?

Nope. sdk updater does read(0, dest, 1024) or something, so if yes have
pushed too many y\n into the buffer, it will fail when doing
strcmp(dest, "y\n") or something alike.

Thats why odd one here.


//Anton


-- 
Anton Lundin+46702-161604
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 03/12] android-wrapper: Add wget as prerequisite

2017-02-06 Thread Anton Lundin
On 06 February, 2017 - Cristian Ionescu-Idbohrn wrote:

> On Mon, 6 Feb 2017, Anton Lundin wrote:
> > 
> > Signed-off-by: Anton Lundin 
> > ---
> >  packaging/android/android-build-wrapper.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/packaging/android/android-build-wrapper.sh 
> > b/packaging/android/android-build-wrapper.sh
> > index c1afcfb..03e4d5c 100644
> > --- a/packaging/android/android-build-wrapper.sh
> > +++ b/packaging/android/android-build-wrapper.sh
> > @@ -35,7 +35,7 @@ fi
> >  
> >  # make sure we have the required commands installed
> >  MISSING=""
> > -for i in git cmake autoconf libtool java ant; do
> > +for i in git cmake autoconf libtool java ant wget; do
> > which $i > /dev/null 2>&1 ||
> 
> Much better to use `command' (shell builtin and available in all POSIX 
> complient shells), instead of `which' (fork and possible not available 
> on all distributions):
> 
>   command -v $i >/dev/null $$
> 
> > if [ "$i" = "libtool" ] ; then
>^  ^   ^   ^
> No quotes needed.
> 

I blame Dirk for those =)

Feel free to send patches!


//Anton


-- 
Anton Lundin+46702-161604
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 07/12] android-wrapper: Auto accept android sdk license

2017-02-06 Thread Cristian Ionescu-Idbohrn
On Mon, 6 Feb 2017, Anton Lundin wrote:
> 
> Signed-off-by: Anton Lundin 
> ---
>  packaging/android/android-build-wrapper.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/packaging/android/android-build-wrapper.sh 
> b/packaging/android/android-build-wrapper.sh
> index c8dd1e1..6242809 100644
> --- a/packaging/android/android-build-wrapper.sh
> +++ b/packaging/android/android-build-wrapper.sh
> @@ -82,7 +82,7 @@ if [ ! -d $ANDROID_SDK ] ; then
>   mkdir $ANDROID_SDK
>   pushd $ANDROID_SDK
>   unzip -q ../$SDK_TOOLS
> - bash tools/android update sdk --no-ui -a -t 1,2,3,33
> + ( sleep 5 && while true ; do sleep 1; echo y; done ) | bash 
> tools/android update sdk --no-ui -a -t 1,2,3,33

Can it be so that the simplier:

yes y | bash tools/android update sdk --no-ui -a -t 1,2,3,33

is all you need?


Cheers,

-- 
Cristian
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 03/12] android-wrapper: Add wget as prerequisite

2017-02-06 Thread Cristian Ionescu-Idbohrn
On Mon, 6 Feb 2017, Anton Lundin wrote:
> 
> Signed-off-by: Anton Lundin 
> ---
>  packaging/android/android-build-wrapper.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/packaging/android/android-build-wrapper.sh 
> b/packaging/android/android-build-wrapper.sh
> index c1afcfb..03e4d5c 100644
> --- a/packaging/android/android-build-wrapper.sh
> +++ b/packaging/android/android-build-wrapper.sh
> @@ -35,7 +35,7 @@ fi
>  
>  # make sure we have the required commands installed
>  MISSING=""
> -for i in git cmake autoconf libtool java ant; do
> +for i in git cmake autoconf libtool java ant wget; do
>   which $i > /dev/null 2>&1 ||

Much better to use `command' (shell builtin and available in all POSIX 
complient shells), instead of `which' (fork and possible not available 
on all distributions):

command -v $i >/dev/null $$

>   if [ "$i" = "libtool" ] ; then
 ^  ^   ^   ^
No quotes needed.

>   MISSING="${MISSING}libtool-bin "


Cheers,

-- 
Cristian
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 02/12] android-wrapper: Fail fast and at point

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index bc604c6..c1afcfb 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -eu
 
 # run this in the top level folder you want to create Android binaries in
 #
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 01/12] android-wrapper: Give a negative exit code on error

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index 41e4125..bc604c6 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -48,7 +48,7 @@ done
 if [ "$MISSING" != "" ] ; then
echo "The following packages are missing: $MISSING"
echo "Please install via your package manager."
-   exit
+   exit 1
 fi
 
 # download the Qt installer including Android bits and unpack / install
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 08/12] android: Move suggested/expected Qt install to just Qt

2017-02-06 Thread Anton Lundin
In the Qt installer, there is a MaintenanceTool which can upgrade your
install, so don't install in a "versioned" directory, just install in a
plain Qt-directory.

Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 8 +++-
 packaging/android/build.sh | 6 +++---
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index 6242809..02d80f1 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -53,19 +53,17 @@ fi
 
 # download the Qt installer including Android bits and unpack / install
 
QT_DOWNLOAD_URL=https://download.qt.io/archive/qt/${QT_VERSION}/${LATEST_QT}/${QT_BINARIES}
-if [ ! -d Qt${LATEST_QT} ] ; then
+if [ ! -d Qt ] ; then
if [ ! -f ${QT_BINARIES} ] ; then
wget -q ${QT_DOWNLOAD_URL}
fi
-   echo "In the binary installer select $(pwd)/${LATEST_QT} as install 
directory"
+   echo "In the binary installer select $(pwd)/Qt as install directory"
chmod +x ./${QT_BINARIES}
./${QT_BINARIES}
 fi
 
-[ -e Qt ] || ln -s Qt${LATEST_QT} Qt
-
 # patch the cmake / Qt5.7.1 incompatibility mentioned above
-sed -i 's/set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES 
cxx_decltype)/# set_property(TARGET Qt5::Core PROPERTY 
INTERFACE_COMPILE_FEATURES cxx_decltype)/' 
Qt/5.7/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake
+sed -i 's/set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES 
cxx_decltype)/# set_property(TARGET Qt5::Core PROPERTY 
INTERFACE_COMPILE_FEATURES cxx_decltype)/' 
Qt/${QT_VERSION}/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake
 
 # next we need to get the Android SDK and NDK
 if [ ! -d $ANDROID_NDK ] ; then
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 3cfaf47..0a705ba 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -7,15 +7,15 @@
 # You need to have a version of Qt that contains the Android bits
 # installed. You should be able to find the correct installer for
 # Linux or Mac here:
-# http://download.qt.io/official_releases/qt/5.7/
+# http://download.qt.io/official_releases/qt/
 # make sure you pick one with 'android' in its name.
 #
 # Install this wherever you want - and then have a link named ~/src/Qt that
 # points to it.
-# So let's assume that you are installing the package above in ~/Qt5.7.1
+# So let's assume that you are installing the package above in ~/Qt
 # (which I think is the default location), then simply do
 # cd ~/src
-# ln -s ~/Qt5.7.1 Qt
+# ln -s ~/Qt Qt
 #
 # you also need to have the current Android SDK and NDK installed under ~/src
 #
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 10/12] android-wrapper: Auto install Qt

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index 3db0284..cb98fc9 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -24,6 +24,10 @@ ANDROID_SDK=android-sdk-linux
 
 PLATFORM=$(uname)
 
+pushd "$(dirname "$0")/../../"
+export SUBSURFACE_SOURCE=$PWD
+popd
+
 if [ "$PLATFORM" = "Linux" ] ; then
QT_BINARIES=qt-opensource-linux-x64-android-${LATEST_QT}.run
NDK_BINARIES=${ANDROID_NDK}-linux-x86_64.zip
@@ -57,9 +61,8 @@ if [ ! -d Qt ] ; then
if [ ! -f ${QT_BINARIES} ] ; then
wget -q ${QT_DOWNLOAD_URL}
fi
-   echo "In the binary installer select $(pwd)/Qt as install directory"
chmod +x ./${QT_BINARIES}
-   ./${QT_BINARIES}
+   ./${QT_BINARIES} -platform minimal --script 
"$SUBSURFACE_SOURCE"/qt-installer-noninteractive.qs --no-force-installations
 fi
 
 # patch the cmake / Qt5.7.1 incompatibility mentioned above
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 12/12] android: Add android build on travis-ci

2017-02-06 Thread Anton Lundin
This adds a android-apk-build which runs on travis-ci. This is using a
quite ugly trick, building in a docker container, basically just to get
a newer cmake. The cmake in trusty is way to old to work with android
builds.

A good side-effect is that this is a complete copy-paste for anyone who
would like to build android-binaries them self on Linux. All the
uglyness is hidden away in a docker container.

This is _NOT_ ment to go into master, but rather into a separate branch,
which can be rebased on top of master. I haven't really figured out how
to combine these two quite different builds in the same .travis.yml

Signed-off-by: Anton Lundin 
---
 .travis.yml | 61 +++--
 1 file changed, 23 insertions(+), 38 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 6240ffe..6fadf54 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,47 +1,32 @@
+notifications:
+email:
+recipients:
+- gla...@acc.umu.se
+
 language: c++
 
-dist: trusty
+sudo: required
+
+services:
+- docker
 
 cache:
 directories:
-- Qt
-
-addons:
-apt:
-packages:
-- git
-- g++
-- make
-- autoconf
-- automake
-- libtool
-- cmake
-- pkg-config
-- libxml2-dev
-- libxslt1-dev
-- libzip-dev
-- libsqlite3-dev
-- libusb-1.0-0-dev
-- libssl-dev
-- libssh2-1-dev
-- libcurl4-openssl-dev
-# Not a subsurface dependency, but a Qt dependency
-- mesa-common-dev
+- 3pp
 
 before_install:
-- if [ ! -e Qt/5.8 ] ; then
-  rm -rf Qt ;
-  wget 
http://download.qt.io/official_releases/qt/5.8/5.8.0/qt-opensource-linux-x64-android-5.8.0.run
 ;
-  chmod +x ./qt-opensource-linux-x64-android-5.8.0.run ;
-  ./qt-opensource-linux-x64-android-5.8.0.run -platform minimal 
--script qt-installer-noninteractive.qs --no-force-installations ;
-  fi
+- docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d 
ubuntu /bin/sleep 60m
+- docker exec -t builder apt-get update
+  # subsurface android build dependencies
+- docker exec -t builder apt-get install -y git cmake autoconf libtool-bin 
openjdk-8-jdk-headless ant wget unzip python bzip2 pkg-config
+  # Qt installer dependencies
+- docker exec -t builder apt-get install -y libx11-xcb1 libgl1-mesa-glx 
libglib2.0-0
+  # Inject cached 3pp's (if none exists in 3pp dir, we inject zero ones, 
and all is downloaded in the container)
+- docker cp 3pp builder:/workspace
 
 script:
-- perl -pi -e 's/BUILDGRANTLEE=1/BUILDGRANTLEE=0/' scripts/build.sh
-- perl -pi -e 's/BUILDMARBLE=1/BUILDMARBLE=0/' scripts/build.sh
-- perl -pi -e 's/-DNO_PRINTING=OFF/-DNO_PRINTING=ON -DNO_MARBLE=ON 
-DUSE_WEBENGINE=ON/' scripts/build.sh
-- export CMAKE_PREFIX_PATH=$PWD/Qt/5.8/gcc_64/lib/cmake ;
-  cd .. ;
-  bash -e ./subsurface/scripts/build.sh
-#- cd subsurface/build ; env CTEST_OUTPUT_ON_FAILURE=1 make check
-#- cd subsurface/build-mobile ; env CTEST_OUTPUT_ON_FAILURE=1 make check
+- docker exec -t builder bash 
subsurface/packaging/android/android-build-wrapper.sh
+# Yank Qt, android-sdk, android-ndk and other 3pp source tar balls out from 
the container and cache them.
+- docker exec builder mkdir 3pp
+- docker exec builder sh -c 'mv Qt android-sdk-linux android-ndk-* 
*.tar.gz *.tar.bz2 3pp/'
+- docker cp builder:/workspace/3pp .
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 05/12] android-wrapper: Quiet down wget

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index 3eadf92..60325c8 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -55,7 +55,7 @@ fi
 
QT_DOWNLOAD_URL=https://download.qt.io/archive/qt/${QT_VERSION}/${LATEST_QT}/${QT_BINARIES}
 if [ ! -d Qt${LATEST_QT} ] ; then
if [ ! -f ${QT_BINARIES} ] ; then
-   wget ${QT_DOWNLOAD_URL}
+   wget -q ${QT_DOWNLOAD_URL}
fi
echo "In the binary installer select $(pwd)/${LATEST_QT} as install 
directory"
chmod +x ./${QT_BINARIES}
@@ -70,14 +70,14 @@ sed -i 's/set_property(TARGET Qt5::Core PROPERTY 
INTERFACE_COMPILE_FEATURES cxx_
 # next we need to get the Android SDK and NDK
 if [ ! -d $ANDROID_NDK ] ; then
if [ ! -f $NDK_BINARIES ] ; then
-   wget https://dl.google.com/android/repository/$NDK_BINARIES
+   wget -q https://dl.google.com/android/repository/$NDK_BINARIES
fi
unzip $NDK_BINARIES
 fi
 
 if [ ! -d $ANDROID_SDK ] ; then
if [ ! -f $SDK_TOOLS ] ; then
-   wget https://dl.google.com/android/repository/$SDK_TOOLS
+   wget -q https://dl.google.com/android/repository/$SDK_TOOLS
fi
mkdir $ANDROID_SDK
pushd $ANDROID_SDK
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 07/12] android-wrapper: Auto accept android sdk license

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index c8dd1e1..6242809 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -82,7 +82,7 @@ if [ ! -d $ANDROID_SDK ] ; then
mkdir $ANDROID_SDK
pushd $ANDROID_SDK
unzip -q ../$SDK_TOOLS
-   bash tools/android update sdk --no-ui -a -t 1,2,3,33
+   ( sleep 5 && while true ; do sleep 1; echo y; done ) | bash 
tools/android update sdk --no-ui -a -t 1,2,3,33
popd
 fi
 
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 06/12] android-wrapper: Quiet down unzip

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index 60325c8..c8dd1e1 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -72,7 +72,7 @@ if [ ! -d $ANDROID_NDK ] ; then
if [ ! -f $NDK_BINARIES ] ; then
wget -q https://dl.google.com/android/repository/$NDK_BINARIES
fi
-   unzip $NDK_BINARIES
+   unzip -q $NDK_BINARIES
 fi
 
 if [ ! -d $ANDROID_SDK ] ; then
@@ -81,7 +81,7 @@ if [ ! -d $ANDROID_SDK ] ; then
fi
mkdir $ANDROID_SDK
pushd $ANDROID_SDK
-   unzip ../$SDK_TOOLS
+   unzip -q ../$SDK_TOOLS
bash tools/android update sdk --no-ui -a -t 1,2,3,33
popd
 fi
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 09/12] android: Upgrade Qt to 5.8

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 4 ++--
 packaging/android/build.sh | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index 02d80f1..3db0284 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -14,8 +14,8 @@ USE_X=$(case "$-" in *x*) echo "-x" ;; esac)
 
 # these are the current versions for Qt, Android SDK & NDK:
 
-QT_VERSION=5.7
-LATEST_QT=5.7.1
+QT_VERSION=5.8
+LATEST_QT=5.8.0
 NDK_VERSION=r13b
 SDK_VERSION=r25.2.3
 
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 0a705ba..e271af2 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -53,6 +53,8 @@ export 
ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT-$SUBSURFACE_SOURCE/../android-ndk-r13
 
 if [ ! -z "$QT5_ANDROID" ] ; then
echo "Using Qt5 in $QT5_ANDROID"
+elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.8" ] ; then
+   export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.8
 elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.7" ] ; then
export QT5_ANDROID=$SUBSURFACE_SOURCE/../Qt/5.7
 elif [ -d "$SUBSURFACE_SOURCE/../Qt/5.6" ] ; then
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 04/12] android-wrapper: Add unzip as prerequisite

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index 03e4d5c..3eadf92 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -35,7 +35,7 @@ fi
 
 # make sure we have the required commands installed
 MISSING=""
-for i in git cmake autoconf libtool java ant wget; do
+for i in git cmake autoconf libtool java ant wget unzip; do
which $i > /dev/null 2>&1 ||
if [ "$i" = "libtool" ] ; then
MISSING="${MISSING}libtool-bin "
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH 03/12] android-wrapper: Add wget as prerequisite

2017-02-06 Thread Anton Lundin
Signed-off-by: Anton Lundin 
---
 packaging/android/android-build-wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packaging/android/android-build-wrapper.sh 
b/packaging/android/android-build-wrapper.sh
index c1afcfb..03e4d5c 100644
--- a/packaging/android/android-build-wrapper.sh
+++ b/packaging/android/android-build-wrapper.sh
@@ -35,7 +35,7 @@ fi
 
 # make sure we have the required commands installed
 MISSING=""
-for i in git cmake autoconf libtool java ant; do
+for i in git cmake autoconf libtool java ant wget; do
which $i > /dev/null 2>&1 ||
if [ "$i" = "libtool" ] ; then
MISSING="${MISSING}libtool-bin "
-- 
2.9.3

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 2/2] Add a travis build of subsurface

2017-02-06 Thread Anton Lundin
On 06 February, 2017 - Henrik B A wrote:

> Fantastic work Anton.  This is a great step forward :)
> 

There's a android thingie in the works to. I'm not really sure on how to
integrate all of the different build envs into a matrix yet...

Someone else might take up osx building and wintendo building?

If we have a official autotest system, others can look at those configs,
and figure out all our assumptions on how our build-envs is supposed to
look and work.


//Anton


-- 
Anton Lundin+46702-161604
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


TestParse fails

2017-02-06 Thread Dirk Hohndel
Miika,

It looks like it has been a while that TestParse has been failing, lately
it even started crashing. I fixed the crashes (on a failed parse of CSV
data we should try to access a non-existing dive), but I can't quite
figure out why we no longer parse these files.

I think you are still traveling, but it would be great if you could take a
loook.

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: [PATCH 2/2] Add a travis build of subsurface

2017-02-06 Thread Henrik B A
Fantastic work Anton.  This is a great step forward :)

Henrik

On Sun, Feb 5, 2017 at 11:26 PM, Anton Lundin  wrote:
> This runs a subsurface script/build.sh build in travis-ci, and runs the
> tests afterwards.
>
> The build runs on the Ubuntu Trusty image, but due to the fact that the
> Qt shipped there is to old, it installs a Qt 5.8 from qt.io , and with
> some trickery caches it.
>
> Hacked out are things that doesn't build with Qt 5.8, and the rest is
> built against WebEngine.
>
> The tests currently fail, and I really don't know why, but its a clear
> indication that they aren't run that often. This cam makes sure they are
> run at least. The actual testing is just commented out for that reason.
>
> Signed-off-by: Anton Lundin 
> ---
>  .travis.yml| 47 +
>  qt-installer-noninteractive.qs | 60 
> ++
>  2 files changed, 107 insertions(+)
>  create mode 100644 .travis.yml
>  create mode 100644 qt-installer-noninteractive.qs
>
> diff --git a/.travis.yml b/.travis.yml
> new file mode 100644
> index 000..6240ffe
> --- /dev/null
> +++ b/.travis.yml
> @@ -0,0 +1,47 @@
> +language: c++
> +
> +dist: trusty
> +
> +cache:
> +directories:
> +- Qt
> +
> +addons:
> +apt:
> +packages:
> +- git
> +- g++
> +- make
> +- autoconf
> +- automake
> +- libtool
> +- cmake
> +- pkg-config
> +- libxml2-dev
> +- libxslt1-dev
> +- libzip-dev
> +- libsqlite3-dev
> +- libusb-1.0-0-dev
> +- libssl-dev
> +- libssh2-1-dev
> +- libcurl4-openssl-dev
> +# Not a subsurface dependency, but a Qt dependency
> +- mesa-common-dev
> +
> +before_install:
> +- if [ ! -e Qt/5.8 ] ; then
> +  rm -rf Qt ;
> +  wget 
> http://download.qt.io/official_releases/qt/5.8/5.8.0/qt-opensource-linux-x64-android-5.8.0.run
>  ;
> +  chmod +x ./qt-opensource-linux-x64-android-5.8.0.run ;
> +  ./qt-opensource-linux-x64-android-5.8.0.run -platform minimal 
> --script qt-installer-noninteractive.qs --no-force-installations ;
> +  fi
> +
> +script:
> +- perl -pi -e 's/BUILDGRANTLEE=1/BUILDGRANTLEE=0/' scripts/build.sh
> +- perl -pi -e 's/BUILDMARBLE=1/BUILDMARBLE=0/' scripts/build.sh
> +- perl -pi -e 's/-DNO_PRINTING=OFF/-DNO_PRINTING=ON -DNO_MARBLE=ON 
> -DUSE_WEBENGINE=ON/' scripts/build.sh
> +- export CMAKE_PREFIX_PATH=$PWD/Qt/5.8/gcc_64/lib/cmake ;
> +  cd .. ;
> +  bash -e ./subsurface/scripts/build.sh
> +#- cd subsurface/build ; env CTEST_OUTPUT_ON_FAILURE=1 make check
> +#- cd subsurface/build-mobile ; env CTEST_OUTPUT_ON_FAILURE=1 make check
> diff --git a/qt-installer-noninteractive.qs b/qt-installer-noninteractive.qs
> new file mode 100644
> index 000..b6c6c2a
> --- /dev/null
> +++ b/qt-installer-noninteractive.qs
> @@ -0,0 +1,60 @@
> +// http://stackoverflow.com/a/34032216/78204
> +
> +function Controller() {
> +installer.autoRejectMessageBoxes();
> +installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", 
> QMessageBox.Yes);
> +installer.installationFinished.connect(function() {
> +gui.clickButton(buttons.NextButton);
> +})
> +}
> +
> +Controller.prototype.WelcomePageCallback = function() {
> +gui.clickButton(buttons.NextButton);
> +}
> +
> +Controller.prototype.CredentialsPageCallback = function() {
> +gui.clickButton(buttons.NextButton);
> +}
> +
> +Controller.prototype.IntroductionPageCallback = function() {
> +gui.clickButton(buttons.NextButton);
> +}
> +
> +Controller.prototype.TargetDirectoryPageCallback = function()
> +{
> +
> //gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir")
>  + "/Qt");
> +
> gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("InstallerDirPath")
>  + "/Qt");
> +//gui.currentPageWidget().TargetDirectoryLineEdit.setText("/scratch/Qt");
> +gui.clickButton(buttons.NextButton);
> +}
> +
> +Controller.prototype.ComponentSelectionPageCallback = function() {
> +var widget = gui.currentPageWidget();
> +
> +widget.selectAll();
> +widget.deselectComponent('qt.58.src');
> +
> +gui.clickButton(buttons.NextButton);
> +}
> +
> +Controller.prototype.LicenseAgreementPageCallback = function() {
> +gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
> +gui.clickButton(buttons.NextButton);
> +}
> +
> +Controller.prototype.StartMenuDirectoryPageCallback = function() {
> +gui.clickButton(buttons.NextButton);
> +}
> +
> +Controller.prototype.ReadyForInstallationPageCallback = function()
> +{
> +gui.clickButton(buttons.NextButton);
> +}
> +
> +Controller.prototype.FinishedPageCallback = function() {
> +var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
> +if (che