Commit graph

249 commits

Author SHA1 Message Date
jan Iversen
3c3729711c core: remove QSettings in qPref* and use a shared variable
Add qPrefPrivate class which contains one QSettings variable,
delete QSettings from qPref* class definitions

this secures there are only instance of QSettings
(QSettings needs to be in a QObject class to work)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-18 10:40:08 -07:00
jan Iversen
3a314c3dec core: copy Animations from SettingsObjectWrapper to qPref as its own class
Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name in struct preferences>
- signal function have <name in struct preferences>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper
handles it) secures the same storage name is used. Having the set/get/load/sync
functions grouped together makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production
Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:07:49 +02:00
jan Iversen
fe38a768f2 ssrf: move functions from mobile-helper to mobile-main
Move few mobile only functions from mobile-helper to mobile-main

remove subsurface-mobile-helper

file structure is now subsurface-*-main.cpp + subsurface-helper.cpp

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
jan Iversen
e5dace2233 core: copy Display from SettingsObjectWrapper to qPref as its own class
copy Display from SettingsObjectWrapper to qPref as its own class
file. Update Display to use a common load/sync scheme.

Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name in struct preferences>
- signal function have <name in struct preferences>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper
handles it) secures the same storage name is used. Having the set/get/load/sync
functions grouped together makes it easier to get an overview.

REMARK: this commit are made to show the use of the low level LOADSYNC macros, which will
be used for special cases. This class is NOT linked into the live system.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-07 09:44:06 -07:00
Dirk Hohndel
63297562e6 iOS: find translations again
commit ec0511e824 ("ios: concentrate build dirs") moved the translations around
without updating the way they are accessed, causing our release 2.1.0 on iOS to
not be localized.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-03 14:58:00 -07:00
jan Iversen
d02a03983d core: add qPref.h_and qPrefprivate.h
add 2 header files and 1 cpp file (qPrefPrivate does not have an implementation)

The rewrite/consoliadation of SettingsObjectWrapper, qmlmanager, qmlpref and planner
needs a place to put common private parts (qPrefPrivate) and 1 common class (qPref).

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-04 05:32:30 +08:00
jan Iversen
ff88e7ee99 mobile: remove MapWidget from mobile-resources.qrc
remove MapWidget entries from mobile-resources.qrc, and
reference map-widget.qrc in Subsurface-mobile.pro for iOS

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-21 20:27:58 -07:00
jan Iversen
38bf351cc1 mobile/ios: correct whitespaces to coding standard
correct whitespaces to coding standard
in translations.qrc, qml.qrc and deployment.pri

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-21 04:25:21 +09:00
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
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
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
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
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
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
Dirk Hohndel
9e457e092c iOS: add MapLocationModel and corresponding helper
Thanks to Murillo Bernardes for reminding me to add the .h files as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:34:46 -07:00
Dirk Hohndel
ce8cad615a iOS: build googlemaps
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:33:54 -07:00
Dirk Hohndel
6c3cd24ef8 Android/iOS build: get libxml2 and libxslt from GitHub
The xmlsoft.org links sometimes time out. Sadly, GitHub API gives us an
oddly named top level directory in the tar file, so lets strip that and
replace it with the "usual" name.

Also, for the "raw" tar files from GitHub we need to run autoreconf
ourselves.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 12:03:22 -07:00
Berthold Stoeger
cd5e17cf79 Cleanup: Unify qthelper.h and qthelperfromc.h
Since all qt-helpers are defined in qthelper.cpp, there seems to be
no reason to have two include files. By unifying the two files,
duplication and inconsistencies are removed. The C++-only part is
simply compiled away with #ifdefs.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-02-26 19:06:02 +02:00
Dirk Hohndel
23ac269a0a iOS build: add new file to qmake build
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-02-12 12:23:56 -08:00
Dirk Hohndel
4e2e48a8fb iOS build: install sqlite3.pc
Otherwise this gets rebuilt every time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-02-12 12:23:40 -08:00
Dirk Hohndel
1c87925ab0 iOS build: remove desktop only models
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-02-12 12:23:18 -08:00
Dirk Hohndel
8d42d804ed iOS build: automatically build matching libdc
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-02-12 12:22:55 -08:00
Dirk Hohndel
b03c5a98d4 A few more updates to Copyright notices
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-30 08:25:13 -08:00
Stefan Fuchs
a11622623a Remove unused divesitepicturemodel from qt-models
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-12-13 05:48:20 -08:00
Dirk Hohndel
03e14fa2c3 Cleanup: constructLocationTags isn't used in Subsurface-mobile
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-08 16:29:49 +01:00
Dirk Hohndel
ef8b2e6bb7 Cleanup: rename file to avoid confusion
Depending on the tooling, both divesite.c and divesite.cpp would compile
into divesite.o.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-08 16:29:49 +01:00
Dirk Hohndel
14348a8d9a iOS build: next attempt to sort versions
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-06 06:46:10 -06:00
Dirk Hohndel
afc1847591 iOS build: more robust way to determine Qt version
Suggested-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-05 20:05:16 -08:00
Dirk Hohndel
ee0341fd97 Enable building BLE dive computers on iOS
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-04 13:54:07 -08:00
Dirk Hohndel
31641c19bf libdc: fix iOS build script
Mis-counted directories and missed the submodule init call.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-04 12:53:43 -08:00
Dirk Hohndel
0ce44b8ed1 libdc: update the iOS build script for submodule
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-03 14:12:06 -08:00
Murillo Bernardes
f6d13374bd iOS: Enable location updates
Add Info.plist entries to enable location updates even in background.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2017-12-03 08:19:00 -08:00
Dirk Hohndel
2c9beec775 iOS build: clean up the launch screen
This contained left-overs from failed attempts to make it work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-02 12:30:54 -08:00
Dirk Hohndel
625298a7b8 iOS build: add icon to launch screen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 22:32:03 -08:00
Dirk Hohndel
87e05f4db8 iOS build: add option to build.sh to only update version
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:53:11 -08:00
Dirk Hohndel
31c005fa06 iOS build: enable BLE support in the code
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:52:09 -08:00
Dirk Hohndel
16607a66c4 iOS buils: new Launch xib
This still doesn't actually SHOW the logo...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:49:59 -08:00
Dirk Hohndel
38789f5a01 iOS build: add required explanation of BLE access permission
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:49:42 -08:00
Dirk Hohndel
c1bc77d086 iOS build: add iTunes artwork
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:49:01 -08:00
Dirk Hohndel
bca858a5d9 iOS build: call qmake in build.sh
This way we can avoid having to use Qt Creator (in preparation for
eventually testing the iOS build in Travis CI).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 21:48:15 -08:00
Dirk Hohndel
18d044d9dc iOS build: update icons
Latest xcode requires more and different(?) icons.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Dirk Hohndel
016b73872f iOS build: add a couple more imports to the build
The build process uses the dummy.qml file to determine which QML modules
to package. This ensures that Subsurface-mobile includes all its
dependencies.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Dirk Hohndel
252fc94c67 iOS build: use libgit2 0.26.0
Just like on all the other platforms.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Dirk Hohndel
6d5144451d iOS build: only use annotated tags for version
This avoids picking the continuous tag.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29 14:56:39 -08:00
Miika Turkia
8f16ae6289 Move Divinglog DB import into its own file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-29 01:22:17 +01:00
Miika Turkia
c2342304db Move Cobalt DB import to its own file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-29 01:22:17 +01:00
Miika Turkia
4325ae8d24 Move Shearwater DB import into its own file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-29 01:22:17 +01:00
Miika Turkia
1a9484207b Move Suunto DB import into its own file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-29 01:22:17 +01:00
Dirk Hohndel
a3754ecada iOS build fix
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-27 21:06:57 -08:00
Miika Turkia
1c6e189c2b Move Suunto DB imports into parse-db.c
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27 13:42:10 -08:00
Miika Turkia
02c80a60b0 Refactore parse-xml.c into parse.c and parse-xml.c
This should help us to move parsing that is not XML related to other
files, hopefully making the code cleaner.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27 13:42:10 -08:00
Dirk Hohndel
303e7c4982 iOS build: update dummy.qml to match all the imports
I don't think we need all the versions, but it shouldn't hurt.
Now they are alphabetical, that should make it easier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-14 07:47:03 -04:00
Dirk Hohndel
38243be44d iOS build: add include path for Kirigami
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-14 04:15:17 -07:00
Dirk Hohndel
f1baa575e6 iOS build: we don't use ssh and can't use OpenSSL
On iOS we don't need to enable ssh-based git access - and we can
no longer build against OpenSSL (instead use the platform SSL libraries.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-11 05:45:12 -07:00
Dirk Hohndel
3f75059a77 Add connectionlistmodel.cpp/h to iOS qmake file
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-07 10:06:47 -07:00
Dirk Hohndel
f940104a33 iOS build: add BLE support files
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-19 06:21:23 -07:00
Dirk Hohndel
9beb445d44 iOS build: update dummy file to include Controls 2 Material
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-17 20:32:04 -07:00
Dirk Hohndel
071e3f9933 iOS build: allow building against Qt 5.9.1 and later
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-17 16:49:02 -07:00
Dirk Hohndel
25cf741f70 iOS build: add bluetooth capability to Info.plist
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-17 14:26:02 -07:00
Robert C. Helling
bdd1a35c01 Add new sources to ios .pro file
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-07-04 06:12:09 +09:00
Dirk Hohndel
ba2b5d8505 Add en_US translation for plurals
This way in the en_US locale we no longer get shown the odd "dive(s)"
and instead get correct singular and plural forms.

Most of the patch is just a reindentation as it removes the if clause
that used to do the special case of NOT loading a translation for the
en_US case.

Right now we start with a trivial en_US translation file. My guess is
that this will be overwritten once we do the next round of "new strings,
new translations".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-22 04:19:23 -07:00
Robert C. Helling
ec34ebfb04 Enable BT for iOS build
and add some new source files to .pro file

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-01 14:33:41 -07:00
Stefan Fuchs
d82f8cbd3f Change protocoll for any git clone from Github to https
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-16 07:41:24 -07:00
Stefan Fuchs
d661189b54 Change remotes for git clone for libdc, marble and Subsurface to Github
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-16 07:41:24 -07:00
Dirk Hohndel
5641d6d490 QML UI: need major.minor versions, apparently
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-12 20:33:27 -07:00
Dirk Hohndel
35e48a490b QML UI: fix iOS build script
Syntax for one of the libdivecomputer configure options was wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-07 17:07:55 -07:00
Dirk Hohndel
c443576181 QML UI: enable embed code for iOS
This should help us with better iOS apps as it allows Apple to run
llvm against our code to improve performance.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-07 17:07:21 -07:00
Dirk Hohndel
924370c0e4 QML UI: modify dummy.qml to bring the correct plugins
Our qmake based build for iOS still requires the dummy.qml to trigger
inclusion of the correct plugins in the iOS app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-07 17:06:11 -07:00
Dirk Hohndel
8a53cf8e64 QML UI: update qmake file to include Controls.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06 21:29:09 -07:00
Henrik Brautaset Aronsen
ba23989e6b Update from 2016 to 2017. Happy new year!
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 10:28:25 -08:00
Dirk Hohndel
fd27c3fa23 iOS build: add required key for iOS 10
This one's weird. We actually don't access the Photo Library. But
maybe it's the access to the local files (in order to store the
dive data) that causes this?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 07:36:33 -07:00
Dirk Hohndel
e1a2074cb3 iOS build: adjust configure flag for libdivecomputer
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-19 17:09:27 -07:00
Dirk Hohndel
33f006194b iOS build: no longer request location information
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-10 08:38:19 -07:00
Dirk Hohndel
f40d5ff0a1 Update the README for building the iOS version
This still isn't quite straight forward, but at least now the README matches
the process that I use again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 11:17:44 -07:00
Dirk Hohndel
055276f1ba iOS build: re-enable building libraries for the simulator
We now build Kirigami as part of Subsurface-mobile itself, so the simulator
builds work again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 07:54:22 -07:00
Dirk Hohndel
2779f9198a iOS build: no need to build kirigami library anymore
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-16 07:51:35 -07:00
Dirk Hohndel
81166bc971 iOS build: directly include Kirigami
Instead of building a library that we link against, let's just use the .pri
file and include Kirigami in the primary build.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-16 07:50:45 -07:00
Dirk Hohndel
f23c2d8192 Remove hacks around Kirigami issues
Those were fixed upstream.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-15 13:42:03 -07:00
Dirk Hohndel
d408939076 IOS build: compile kirigami plugin
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-14 15:48:48 -07:00
Dirk Hohndel
545c60a517 Add new files to qmake
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-13 20:11:20 -07:00
Dirk Hohndel
24bd2eab43 iOS build: add another dependency to dummy.qml
This way the required plugins get automagically added to the bundle.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-17 04:07:37 -07:00
Dirk Hohndel
10833e32ed iOS build: use the Qt version that is available
Simply have the Qt link in packagin/ios point to whatever Qt version
you want to build against and the script picks the right one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-17 04:06:51 -07:00
Dirk Hohndel
329a632ed9 iOS build: dummy qml file to pull in the right dependencies
The iOS build process is rather stupid - it scans all .qml files
in the root directory of the project to determine which QML dependencies
are required.

This is why we had the weird leftover fake QML project in our sources.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04 14:42:07 -07:00
Dirk Hohndel
42eee8a2e1 iOS build: create the translations to be bundled
And add them to the bundle.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04 14:00:43 -07:00
Dirk Hohndel
5e42909964 iOS build: include the libraries for the phone simulator
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17 22:36:29 -07:00
Robert C. Helling
c0a4ffead8 Build instructions to deplay on you own iOS device
... so others might have less trouble.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-11 12:42:59 -07:00
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.

And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.

This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04 22:33:58 -07:00
Dirk Hohndel
246422d03f iOS build: fix typos
Can't believe I didn't notice them earlier... I must have stared at these
strings countless times.

Reported-by: Scott Ireland <scott@sdj.ca>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 21:36:42 -07:00
Dirk Hohndel
dc1cd40721 Revert "iOS build: enable access to GPS location"
This reverts commit 78a8137963.

These keys don't enable access, they require the device to have GPS support.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 17:28:47 -07:00
Dirk Hohndel
2a65eab745 iOS build: add another Info.plist key to enable positioning
This key is needed so that the iOS app asks the user for permission to use the
GPS position information.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 07:54:48 -07:00
Dirk Hohndel
78a8137963 iOS build: enable access to GPS location
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 05:41:44 -07:00
Dirk Hohndel
f9e68f13f3 iOS build: add missing icon
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 23:31:12 -07:00
Dirk Hohndel
fb157b873a iOS build: fix executable name
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 19:45:07 -07:00
Dirk Hohndel
41bc8003d5 iOS build: update the README
A lot of this is still black magic, but at least this now documents what I
understand about the process.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 17:26:46 -07:00
Dirk Hohndel
a4a9edcd0f iOS build: create Info.plist with correct version information
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 17:26:46 -07:00
Dirk Hohndel
9028c807b2 Change names of iOS build files
The name subsurface-ios was used in many places and that was just not helpful
to fight against. This should work much better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 17:26:46 -07:00
Dirk Hohndel
1e8b0874ab iOS build: show correct program name on launch screen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 19:35:37 -08:00
Dirk Hohndel
8a96f6e90b iOS build: bundle application icons and Info.plist
This way the iDevice will show the correct name and icon for
Subsurface-mobile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 17:51:09 -08:00
Dirk Hohndel
ba8014eb5c iOS build: restructure build.sh to create fat libraries
This way QtCreator can successfully link and deploy the app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 17:49:35 -08:00
Dirk Hohndel
7ae4eed734 iOS build: more build.sh hacking
This now can create all the support libraries in armv7, but that isn't
sufficient for QtCreator which wants fat libraries with both armv7 and arm64 in
them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 15:11:49 -08:00
Dirk Hohndel
8a6728eb08 Revert "iOS build: add the pri file for generating the version"
This reverts commit 7fac2a38b2.

Oops, that should have been dropped in the rebase before pushing the
changes. I did this instead in commit 99d1d8876e ("iOS build: create
ssrf-version.h by hand")
2016-03-06 11:13:04 -08:00
Dirk Hohndel
99d1d8876e iOS build: create ssrf-version.h by hand
It grabs the mobile version from the cmake file via grep.
🤦

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:03:11 -08:00
Tomaz Canabrava
7fac2a38b2 iOS build: add the pri file for generating the version
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:03:11 -08:00
Dirk Hohndel
8d9bffff64 iOS build: fix libdivecomputer build
This uses new configure options added to the Subsurface-branch of
libdivecomputer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:03:11 -08:00
Tomaz Canabrava
c27a2b47f4 iOS build: fix loading icons
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:03:00 -08:00
Tomaz Canabrava
710b3615fe iOS build: add various support files
It's unclear why the build fails if we don't add the sample app files as
well.

[Dirk Hohndel: refactored the patches]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:02:48 -08:00
Tomaz Canabrava
74e6e0ed37 iOS build: Updated build script
This now only builds all the prerequisits but not the actual Subsurface
binaries - that will be done with qmake (oh the irony) in a later commit.

[Dirk Hohndel: refactored the patches]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 11:02:31 -08:00
Dirk Hohndel
a7cf7eb967 iOS build: more progress
Most of the dependencies build now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 14:46:59 -08:00
Dirk Hohndel
0873d46a64 iOS build: only build the parts of openssl that we need
No point in creating the apps, etc.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 13:36:12 -08:00
Tomaz Canabrava
63b01b7510 iOS build: make it possible to compile openssl
It compiles but the link stage fails because of a missing -LSystem
but its a baby step.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 12:16:12 -08:00
Dirk Hohndel
813e49d202 iOS build: baby steps
Get a couple more dependencies built. These were easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 10:25:13 -08:00
Dirk Hohndel
8ddb2ebd6b iOS build: hack to build and install libsqlite3.a
Building the iOS command line utility fails. But frankly, we don't need that,
anyway. I cannot figure out how to tell sqlite that all I want is the library,
so I'm working around that by first building the library, then pretending that
sqlite3 was indeed built in order to be able to run make install. Horrible,
ugly, stupid. But it seems to work.

Also cleaned up the whitespace.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 10:25:10 -08:00
Dirk Hohndel
b5c30971b6 iOS build: make the README a bit more useful
Still not all that useful, though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:28:53 -08:00
Dirk Hohndel
55b6eaae0b iOS build: fix typo in CFLAGS argument
This way the gethostuuid workaround actually works. It still doesn't compile,
though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:26:30 -08:00
Tomaz Canabrava
2316390c1f Rework the env - variables to produce a working cross compile script
The cross compile script kind of works right now, it's missing
something that I'm really not sure where or what it is.

currently sqlite will not build because:
	error: gethostuuid is not defined in iOS

This bug was already opened on sqlite bugtracker for about a year, the
workaround is to pass -DDSQLITE_ENABLE_LOCKING_STYLE=0 to the compilation
flags, which I did but did not work for some reason.

Which is a good error - it shows us that we are actually trying to compile
for iOS.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:07:11 -08:00
Tomaz Canabrava
105d698759 Start the iOS cross compile
The build.sh and readme files are the same as the Android ones
and I'll be changing them over time.

The configure-for-ios.sh script is a file that manages to set
everything, compilers frameworks and such, for iOS compilation.

I'll probably dissecate the configure-for-ios.sh file and put it
back on the build.sh, but not now.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:06:29 -08:00