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>
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>
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>
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>
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>
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>
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>
-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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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")
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>
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>
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>
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>
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>
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>