aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-10-11Fix the sed regexp: we want to match "lib" followed by : or at the endGravatar Thiago Macieira
There was one extra backslash that got passed to sed, which meant it matched a literal dollar sign. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix non-expansion of some Makefile variablesGravatar Thiago Macieira
Apparently SED isn't set on Windows-native Makefiles. And for some reason, $(CC) wasn't getting expanded properly -- it expanded to "cc", even though it is set at the beginning of the Makefile to "gcc". Reported-by: Lubomir I. Ivanov Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Advise people to compile libdivecomputer only staticallyGravatar Thiago Macieira
Because Linus says so. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Remove some arguments, that we find in plot_dataGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Remove unused arg in plot_cylinder_pressureGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix bug in Documentation make invocationGravatar Dirk Hohndel
Without the trailing slash the Makefile in Documentation would create the wrong target name (with run-together path / filename) and therefore would always recompile the documentation. And we don't need to check that the Documentation directory exists - it's part of our sources... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11We no longer use the .translation fileGravatar Dirk Hohndel
This was a broken workaround, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix translation compilationGravatar Dirk Hohndel
Now the Makefile should automatically detect when it needs to create a specific .qm file and do the right thing to create it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Finish clearing up the TableModelsGravatar Tomaz Canabrava
There are other models ( Tree Models and Model Items ) that are not affected by this commits, this is already a good cleanup but it can be extended to also fix those two other possibilities. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Another Model CleanupGravatar Tomaz Canabrava
Conversion of the WSInfoModel, that populates the list of weigthsystems in the Equipment tab. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Second model converted to be less boilerplated.Gravatar Tomaz Canabrava
Second model converted to be less boilerplated, there are right now 7 models that will need to be ported. each model can remove around 30 to 40 LOC, so this is not such a bigger improvement, but it's an 'keeping an eye on the future'. Also fixed a bug where the returned value was dummy. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Begin to Cleanup the Models, trying to reduce boilerplate.Gravatar Tomaz Canabrava
The Model View system in Qt is *very* verbose, this is the beginning of a series of patches that will concentrate the boilerplate somewhere and reduce the amount of lines and will also try to make the code cleaner and easyer to understand, Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Good deal of whitespace fixes and code cleanup.Gravatar Tomaz Canabrava
I just went thru all of subsurface code removing some whitespaces issues and trying to make the code prettyer, I also removed a few QString issues.d Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Added rules on gitignore for the Translations generation.Gravatar Tomaz Canabrava
Added rules on the gitignore file for ignoring the translations that are generated during compile time. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-10Automatically build translationsGravatar Dirk Hohndel
This runs lrelease against the .ts files and automatically recreates the .qm files if any of the .ts files changes. This also moves the .ts files into the translations directory. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Try harder to find the translation filesGravatar Dirk Hohndel
They could be below the data directory ("share") or next to it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Work around a Qt Locale bug on MacGravatar Dirk Hohndel
With Qt4.8.5 Locale::uiLanguages() sometimes doesn't return the country, just the language. This works around this by recreating the locale if this has happened. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Fix some paths for Mac and add translations to bundleGravatar Dirk Hohndel
'share' is under Subsurface.app - you don't need a 'subsurface' directory under 'share'. This also installs the processed translations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Fix typo in the Mac build instructionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10subsurface-gen-version.pri: pass the current OS to get-versionGravatar Lubomir I. Ivanov
We check the current OS and pass it as 'darwin' (osx), 'linux' or 'win' to the get-version shell script. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10subsurface-configure.pri: disable auto-"silent" mode for win32Gravatar Lubomir I. Ivanov
Certain versions of mingw32-make will try to "CreateProcess" passing the contents of CC and CXX. On win32, with CONFIG += silent CC and CXX become composite containing multiple commands such as "@echo... && gcc", which produces undesired results. For the time being, do not automatically enable "silent" mode if the current OS is win32. Possibly a better solution can be found later on. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Added salinity to the Dive Info tab.Gravatar Patrick Valsecchi
Took the opportunity to remove some copy&paste. Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
2013-10-10Fixed mix of spaces and tabs in maintab.uiGravatar Patrick Valsecchi
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
2013-10-10Add translation filesGravatar Dirk Hohndel
These were created by converting the exting translations from po to ts lconvert po/xx_yy.po -o subsurface_xx_yy.ts and then merging in the new strings lupdate subsurface.pro You convert those into .qm files with lrelease and then localization should work. Of course a good bit of new strings are still untranslated - and lots of Gtk strings are still included. This still needs to be included in the build system. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10Dismbiguate gettextGravatar Dirk Hohndel
Just to make sure there's no confusion - we are NOT calling gettext. We are calling tr from a gettext like interface. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Next step towards working translationsGravatar Dirk Hohndel
This may seem like a really odd change - but with this change the Qt tools can correctly parse the C files (and qt-gui.cpp) and get the context for the translatable strings right. It's not super-pretty (I'll admit that _("string literal") is much easier on the eye than translate("gettextFromC", "string literal") ) but I think this will be the price of success. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Make sure we handle untranslated Subsurface correctlyGravatar Dirk Hohndel
At least on the Mac we otherwise switch to the next language which is not what the user likely intended. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Try to read the libdivecomputer.la file (created by GNU libtool)Gravatar Thiago Macieira
Getting dependency information for static libraries requires extra files. Libtool creates .la files, which are "industry standard". qmake has its own .prl files, but it can create .la in a pinch if necessary. This change allows us to get the actual dependency information from libdivecomputer, without having to guess whether it linked to something else or not. If it changes in the future, we shouldn't have to do anything. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09We already try to link against libusb anywayGravatar Dirk Hohndel
No need for the special case here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Try hard not to link against a shared libdivecomputerGravatar Dirk Hohndel
Versioning is wrong. It's not a library shared with other projects. And at least on Mac and Windows we bundle it with the app, anyway. Requested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09subsurface-configure.pri: add a libiconv dependencyGravatar Lubomir I. Ivanov
This is a bit crude of a solution, but the Win32 version of libxml (or at least some versions) seem to require libiconv, thus we add the library with pkg-config if it is available. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09subsurface-configure.pri: add another libxml/libxslt detection stageGravatar Lubomir I. Ivanov
libxml and libxslt use custom -config scripts which brake qmake and make on Win32. The output of executing a .sh or .cmd script with the same name produces garbled output. The output of executables with the same name is untested, but a bit excessive as a solution. To work around the issue add another detection stage, which checks if the previous output from (e.g.) xml2-config is empty and try to use pkg-config instead. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09subsurface-configure.pri: enable the libusb detection stageGravatar Lubomir I. Ivanov
The commented out step should work as expected (in theory). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09subsurface-configure.pri: pkg-config detection changeGravatar Lubomir I. Ivanov
This is a small change, but it seems to work as expected on both Linux and Win32. What happens if 2> NUL > NUL is used on Win32 for cmd.exe is that the output of both stdout and stderr seems to pipe into NUL and pkg-config is always reported as missing. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Now bundle install on the Mac works without sudoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Correct Mac bundle pathGravatar Dirk Hohndel
Should be /Applications (plural) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Don't set -Wno-maybe-uninitialized for clangGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Small fixes to the build notes for MacGravatar Dirk Hohndel
Use the correct git tree for libdivecomputer. Only build libmarble, not all of marble Don't try make install for libmarble - it's bogus Copy the correct marble headers Only use sudo to write into /Applications Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Turn down warnings with Clang tooGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Turn down warnings (after going through them)Gravatar Dirk Hohndel
This was getting way too noisy with tons of false positives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Link static to libdivecomputerGravatar Anton Lundin
In previous build system we linked static to libdivecomputer, so start doing that again. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Only define TRUE and FALSE if they aren't defined alreadyGravatar Dirk Hohndel
We did this for some situations but not for all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09windows.c: use the USERNAME enviroment variableGravatar Lubomir I. Ivanov
system_default_filename(): Use USERNAME, which should work for Windows XP and above. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Remove unnecessary moc includeGravatar Sergey Starosek
This fixes compilation issues with the new build system. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Fix potential uninitialized variableGravatar Dirk Hohndel
Most of the "possibly unitialized" warnings are bogus, but this one is a potential real bug. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09Disable unused functionGravatar Dirk Hohndel
I am not removing this but leaving it around as this is useful for a feature that we still need to enable - the ability to filter out which events to display. This existed in 3.1 but is missing in the Qt version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-08Merge http://github.com/thiagomacieira/subsurfaceGravatar Dirk Hohndel
2013-10-08Turn off exceptions in C++Gravatar Thiago Macieira
We don't use them in our code and Qt doesn't throw either, so save a few bytes and maybe a few setjump() calls on Windows. Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08Don't turn warnings on in Subsurface's buildGravatar Thiago Macieira
We're getting a ton of them and they're mostly harmless. I've already turned on the ones that are problematic (with -Werror even). Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08Update the README and create an INSTALL file.Gravatar Thiago Macieira
Let the README contain generic information and move the build instructions to the INSTALL file. Signed-off-by: Thiago Macieira <thiago@macieira.org>