aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-10-12Fix two issues with directory searches on WindowsGravatar Thiago Macieira
First, make sure we actually match /c/windows from the beginning, not if it occurs in the middle of the path. Second, make sure that directories containing the binaries are searched first. Do that by using unshift (prepend) instead of push (append). Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix dive planner sidebar depth unitsGravatar Linus Torvalds
The dive planner always showed the depth in our internal units, ie millimeter, in the sidebar that showed the plan points. That made little sense in metric mode, and none at all in imperial. The _graph_ showed things in meter and feet. So make the DivePlannerPointsModel always convert things to and from the user units. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Install qt translations into Mac bundleGravatar Dirk Hohndel
This is much harder than it should be... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Better diagnostic message when not finding translationsGravatar Dirk Hohndel
This way we know where the program was looking for the files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Ignore the Subsurface.app folderGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Get cross build to work againGravatar Dirk Hohndel
...and re-enable silent mode by default for cross builds Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Tabify win-ldd.pl - subsurface coding styleGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Ignore the Windows system directories when searching for DLLsGravatar Thiago Macieira
We don't want to deploy kernel32.dll or such. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix the DLL search path orderGravatar Thiago Macieira
The correct order on Windows is: 1. Local directory (relative to the binary) 2. $PATH 3. System dirs We insert our -L flags between 1 and 2 above. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Set the objdump default to "objdump" in win-ldd.plGravatar Thiago Macieira
The environment variable is to be used if the caller knows that the default objdump can't parse Windows DLL files (COFF-PE). On Fedora, Debian, and OpenSUSE, the default objdump can, and obviously the native one on Windows can too. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix deployment: make isn't expanding $(DESTDIR_TARGET) for meGravatar Thiago Macieira
I don't know why. Working around the issue by using $^ (all dependencies) and listing the files to be processed as dependencies for the rule. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>