Commit graph

518 commits

Author SHA1 Message Date
jan Iversen
d0e9f62624 mobile: add qmlprefs class
add class to cmake and pro
register class

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15 14:12:14 -07:00
jan Iversen
abc3125b8e ios: add -all to build.sh
-all will build debug and release for the choosen architectures
armv7,arm64,x86_64 without extra parameter and only
x86_64 with -simulator

Use -all to prebuild all 6 variants we support.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-11 09:45:12 -07:00
jan Iversen
ec0511e824 ios: concentrate build dirs
update build.sh to make all builds in build-ios
to keep the git dir as clean as possible

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:18:41 +02:00
jan Iversen
fe7655155f ios: share clones with desktop
Change src dir for clones to subsurface/.. in order to share with
desktop

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:18:41 +02:00
jan Iversen
aab8f0dcf6 profile: make profile self contained
move qmlprofile.* to profile dir, to keep all parts of the
widget in one place.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:16:53 +02:00
jan Iversen
64c0881e9f mobile: decoupled ssrf.qrc and mobile.qrc
remove /subsurface.qrc from .pro
copy missing mapwidget icon references to mobile-resources.pro

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08 17:04:43 +02:00
jan Iversen
771bd4bce4 iOS: move get-dep-lib outside ARCH loop
Fetch all 3rd party libs before entering ARCH loop

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-07 18:43:17 +02:00
Berthold Stoeger
36b9e5e31e Cleanup: fold core/helpers.h into core/qthelper.h
helpers.h included qthelper.h and all functions declared in helpers.h
were defined in qthelper.h. Therefore fold the former into the latter,
since the split seems completely arbitrary.

While doing so, change the return-type of get_dc_nichname from
"const QString" to "QString".

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-06-04 08:50:10 -07:00
jan Iversen
a658f80e27 iOS: updated launchscreen so it is more centered.
The text and icon was so low, that the page started to scroll on
an iPhone (at least on a model 6s).

Anchored Text to top, and icon to text.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-24 10:19:08 -07:00
jan Iversen
46ff506096 build-system: iOS only turn off specific warnings
Turning off all warnings (-w) was too radical.

Only turning off specific warnings.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21 07:26:56 -07:00
jan Iversen
d7e31ebbcd iOS: get rid of ios/Subsurface-mobile
Having a split between ios and ios/Subsurface-mobile is just confusing
and without a practical reason

Move files from ios/Subsurface-mobile to ios and update .gitignore

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-20 11:35:28 -07:00
jan Iversen
16555e663b iOS: remove duplicate of deployment.pri
one deployment.pri is enough

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-20 11:35:28 -07:00
Dirk Hohndel
dce7e46766 Mac: don't try to copy libraries we got from Homebrew
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-19 21:22:31 -07:00
jan Iversen
95bfd3af29 iOS, supress warnings.
Changed .pro file to supress warnings
clang does not allow all of the issued warnings to be
supressed with -Wno-foo, so instead doing -w

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-19 14:05:23 -07:00
jan Iversen
090eb1ee34 iOS, remove linker warnings (version mismatch).
The Qt libraries are compiled as iOS 10.0, we link
as iOS 8.0, this is a problem waiting to happen. First
time we use a Qt function that uses a iOS 10.0 specific
function the app will crash.

Bumping iOS minimum version from 8.0 to 10.0
Removing the 76x icon, which are not valid from 10.0 and forward

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-19 14:05:23 -07:00
jan Iversen
ffdaba6c84 build-system: added get-dep-lib to android/build.sh
Integrated get-dep-lib in android/build.sh

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-18 16:58:16 -07:00
jan Iversen
77b9a62f7f iOS: added get-dep-lib to build.sh
Removed all 3rd party download/clone, and used common
get-dep-lib instead

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17 11:16:50 -07:00
Anton Lundin
a2065334bb android-build: Remove old libgit2 special handling
And replace it with something that works on a modern cmake.

The upside with using the right linker, we get the symbols resolved
correctly so we don't need to regex the code.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
75205240df android-build: Stop installing ant, we're using grade
Since about a year ago qt-android-cmake shifted to using gradle instead
of ant, and the android sdk's stopped supporting ant to.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
05e6c2dfaa android-build: Simplify and correct
This simplifies the code and uses correct quoting for variables.

This also fixes the sha1-stampfile handling so that we don't build
libdivecomputer every time.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
a8c47cb75d android-build: Build googlemaps plugin same way as others
This reworks the googlemaps build to be more like the other builds, with
the same pattern and way of detecting what we need to do, and when we
need to rebuild it.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
d12e842c68 android-build: Use sed -i instead of home rolled variant
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
Anton Lundin
fa95a7c56a android-build: Use subsurface source variable
We already have a variable pointing to the source dir for subsurface, so
use it.

This way we can build out of tree, in any directory.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17 07:36:44 -07:00
jan Iversen
facb524585 iOS, update Info.plist.in note
Info.plist is no longer generated by qmake but by build.sh,
and it is more interesting to highlight the fact that it is
open software

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17 07:29:49 -07:00
jan Iversen
b39e7ac281 iOS: update weigth... weight to avoid warning
Seems the pro file was forgotten with the rename of weightsysteminfomodel.h

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-11 07:37:18 -07:00
jan Iversen
8341165999 iOS: corrected ^space to tab
Corrected to use correct code style.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-11 07:23:08 -07:00
Dirk Hohndel
2c29cc96a3 Whitespace
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-10 20:46:02 -07:00
jan Iversen
1d5d7d0c47 iOS: cleaned/bumped versions
Made versioning identical to scripts/build.sh

Having the same version of 3rd party libraries across platforms
secures a more stable product.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
6019688b98 iOS: removed local build of libxml2
script/build.sh uses the builtin libxml2 and do not build locally,
    updated build.sh and Subsurface-mobile.pro to to the same.

    sadly enough xslt is not distributed for iOS so it must be built.

    Apart from simplifying the script it saves build time

    Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
5aa5398624 iOS: removed local build of sqllite3
script/build.sh uses the builtin sqllite3 and do not build locally,
updated build.sh and Subsurface-mobile.pro to to the same.

Apart from simplifying the script it saves build time

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
a0030a488a iOS: build.sh does not run configure for libdivecomputer
In a "virgin" repo incl. libdivecomputer, starting by running
ios/build.sh caused an error in libdivecomputer,
because autoreconf was never run.

Changed build.sh to check if libdivecomputer/configure exist, if
not run autoreconf

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:43:22 -07:00
jan Iversen
ff15d48f69 iOS: Allow change of bundle identifier
This patch allows users to set a bundle identifier,
without opening Xcode (set as env. variable).

If the env. variable is not set (like e.g. on Travis) it defaults
to org....

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-10 20:40:45 -07:00
Murillo Bernardes
7d6a48b59f iOS: use recommended variable for bundle ID
We used to hard-code the bundle ID which meant that developers always had to
manually override the bundle ID in order to be able to sign the iOS app for
local testing.  With this change, the official builds will continue to work
without manually opening the project in Xcode, yet other developers will use
the Apple-recommended format in order to set their own bundle ID.

This is based on a suggestion by Murillo Bernardes.

See #1246

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-10 08:19:33 -07:00
jan Iversen
161e5e94fc iOS: update build script
Use git repos and checkout corresponding tags where possible.
Use more reliable servers to download source from.

[Dirk Hohndel: refactored Jan's original commit in #1241]

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-09 14:40:31 +02:00
jan Iversen
a351393739 iOS: update build instractions
Updated INSTALL to point at packaging/ios/README
Updated README to 'facts'
Deleted ios_build_instructions as they are covered in README

[Dirk Hohndel: refactored Jan's original commit in #1241]

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-09 14:40:31 +02:00
jan Iversen
c9cb95ba99 iOS, set lowest deployment target to 8.0
Define deployment target, instead of using user default.

iOS 8.0 is the oldest supported platform

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-09 06:28:25 +02:00
Dirk Hohndel
9ef90daf77 Ubuntu build script update
Make sure we list the currently supported releases.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-29 15:49:04 -07:00
Dirk Hohndel
ddd5ec7f56 Android: fix error in build script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-27 14:49:15 -07:00
Dirk Hohndel
b9e57dbeab iOS: fix typo in build script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-27 11:54:01 -07:00
Dirk Hohndel
1dfac4cb74 Android: rebuild libdivecomputer if SHA changes
Just like we already do for iOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-27 11:52:48 -07:00
Dirk Hohndel
2137b21e1b iOS: allow building for the simulator & switch debug/release builds
It makes sense to be able to control this with command line options.
On Travis this avoids the signing problem and makes the build much faster.
Still should be enough to catch iOS breakage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-24 15:47:25 -07:00
Dirk Hohndel
2cba24fa1a iOS: don't show all the libgit2 warnings
We aren't concerned about the code quality of libgit2 and with these warnings
the build log overflows.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-24 15:45:35 -07:00
Dirk Hohndel
09edf25366 iOS: build Release by default
And add -debug option to build.sh for debug builds.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-23 09:28:41 -07:00
Dirk Hohndel
f28266bb19 iOS: fix info.plist
Xcode happily accepted the incorrect plist syntax for a boolean and the app
did the right thing when installed locally - but once you upload to the
iTunes store the error causes that to fail.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-14 21:05:49 -07:00
Dirk Hohndel
27b921fb1d iOS: make logfile accessible to user
By creating it in the Documents path and setting the two magic keys,
iOS will make the log file available to the user.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13 17:07:43 -07:00
Dirk Hohndel
f693678235 iOS: create our own OS support file
Up until now we just reused the macos.c file for convenience, hard coding a
specific file path that may or may not work on iOS.  Instead get the preferred
path from Qt and for this we need to be able to call into Qt, so this needs to
be a C++ file.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13 17:07:43 -07:00
Dirk Hohndel
a529381af2 iOS: fix build script
The code for building libxml2 and libxslt was broken.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13 17:07:43 -07:00
Berthold Stoeger
5afe1a53d8 Cleanup: Move *_loc formatting functions into new format.cpp file
qthelper.cpp is already quite voluminous. Move the recently
introduced localized versions of (v)snprintf() and put_format()
into their own translation unit.

Moreover, adopt C-style semantics for asprintf_loc(). This function
will be used to remove fixed-size buffers in core/plannernotes.c.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-09 11:29:43 -07:00
Murillo Bernardes
b257b7a027 ios: Link to static googlemaps library
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Murillo Bernardes
882120ba65 ios: remove googlemaps unecessary multiple builds
googlemaps archive is a fat file already, containing
armv7, arm64 and x86-64, so no need to build it
multiple times.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00