Commit graph

156 commits

Author SHA1 Message Date
Dirk Hohndel
9320db96ec Bump Makefile version to 3.1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13 17:33:57 -05:00
Cristian Ionescu-Idbohrn
901fd81ea4 Capitalize package name and add capitalized tar-ball prefix
Name and capitalized name of the project are set in the first two lines of
the Makefile and referenced everywhere else through variabled instead.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13 09:20:04 -07:00
Dirk Hohndel
cf8f0be00d Make silent make optional
Backport of Thiago's commit 612a6ee2f793 ("Make the "silent mode"
compilation be optional only.") from the Qt branch.

Requested-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13 09:07:25 -07:00
Cristian Ionescu-Idbohrn
f7001929d0 Nuke debian patch disable-git-version.diff.
Running:

$ git describe

in a code tree lacking dir .git (unpacked release tar-ball, for
example) throws an error:

	fatal: Not a git repository ...

and that's noise that can be avoided.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13 08:52:53 -07:00
Cristian Ionescu-Idbohrn
a6819e636d Use git archive' instead of tar'.
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-12 07:25:53 -07:00
Cristian Ionescu-Idbohrn
6d37d8ee46 A release includes a tar-ball.
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-12 07:23:59 -07:00
Dirk Hohndel
b90ea68fd1 Disable non-functional Cochran code
There's no point in compiling this into the binary. It does not work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-11 22:02:35 -07:00
Dirk Hohndel
5775905727 Try to add required dependencies to get https working on Windows
This clearly isn't enough. But I simply can't seem to get this to work...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-11 21:54:04 -07:00
Henrik Brautaset Aronsen
e6130f4c24 Make sure .xsl files are installed
xslt/commonTemplates.xsl was missing from the install targets

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-09 10:21:36 -07:00
Cristian Ionescu-Idbohrn
de101410cf A lame start for a `make release' helper.
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-09 08:19:58 -07:00
Dirk Hohndel
f23297d5a1 Separate pushing a new pot file to Transifex from pulling translations
This avoids all the unnecessary updates to the POT date.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-02 08:39:47 -07:00
Dirk Hohndel
d25de98b7c Separate Gtk related code from core logic: statistics
Fairly straight forward, so far just one tiny bit of code restructuring,
everything else separated cleanly.

Added statistics-gtk.c and statistics.h

This should make no difference to functionality.

Cherry-picked from Qt branch; fixed merge issues mostly caused by
dive_tags and Makefile changes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-15 21:52:41 -07:00
Dirk Hohndel
4c775289a7 Separate Gtk related code from core logic: info
Surprisingly straight forward, just a couple of places where we really mix
significant logic with UI code (for example setting the window title).

I had to move amount_selected from display-gtk.h to display.h - I guess
the number of dives that are selected is UI independent. But I wonder if
we still will track this as a global variable in a Qt UI (since the Gtk
selection logic is the main reason this existed in the first place).

Added a new info.h files for the necessary declarations.

This should make no difference to functionality.

Cherry-picked from Qt branch; fixed merge issues mostly caused by
dive_tags and Makefile changes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-15 21:49:14 -07:00
Dirk Hohndel
f86b13102c Separate Gtk related code from core logic: planner
Relatively straight forward, just a handful of places where we call
show_error() (a UI function) from the logic code. In the process I noticed
a few places where error returns weren't dealt with correctly.

Added a new planner.h files for the necessary declarations.

This should make no difference to functionality.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-08 09:37:38 +02:00
Dirk Hohndel
983a77780c Separate Gtk related code from core logic: divelist
This is simplistic & brute force: any function that touches Gtk related
data structures is moved to divelist-gtk.c, everything else stays in
divelist.c.

Header files have been adjusted so that this still compiles and appears to
work. More thought is needed to truly abstract this out, but this seems to
be a good point to commit this change.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-07 17:37:09 +02:00
Henrik Brautaset Aronsen
9187415124 Revert "Only include .po files that has a companion .aliases file"
Commit 6044c22741 wrongly assumed that a disabled .po file had a companion
.disabled file instead of an .aliases file.

Running make after "tx pull -af" generated errors which I tried to fix.  I
shouldn't have, because the Makefile did the right thing. It warned about a
missing .aliases file for a brand new translation.

So, I'm reverting the commit and use "tx pull -f" instead the next time I
need to test existing translations.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-14 06:55:24 -07:00
Henrik Brautaset Aronsen
6044c22741 Only include .po files that has a companion .aliases file
Disabled translations have a .disabled file instead of
an .aliases file.  Without this patch I couldn't make
subsurface after a tx pull (when testing translations).

This patch makes the .aliases file an explicit requirement
for a valid translation.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-13 23:27:01 -07:00
Sylvestre Ledru
87fe20600f Fix the build under Kfreebsd & HURD.
Ensure that Kfreebsd and HURD are recognized as "like Linux"

Signed-off-by: Sylvestre Ledru <sylvestre@debian.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-12 21:50:45 -07:00
Miika Turkia
a94f7807f8 Limited support for Suunto DM4 import
Basic functionality is implemented but at least support for multiple
cylinders is missing. Event/alarm support is only partial.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-04 22:08:03 -08:00
Sylvestre Ledru
134355cb63 Fix the permission of the ICONFILE and the locale files
Lintian, the Debian package static analyzer, was complaining about the
"wrong" permissions on these files.

Signed-off-by: Sylvestre Ledru <sylvestre@debian.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-04 09:11:56 -08:00
Dirk Hohndel
a5a3e0a72e Update README, ReleaseNotes and Makefile for 3.0.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-03 23:49:32 -08:00
Kévin Raymond
cfdde3ff63 Move translations to transifex.com
Translation management is done through Transifex now for easy translations.
Translators should note that fuzzy strings are not used any more since
Transifex does not handle it (by choice).

In order to pull translations, you need a transifex.com account.

Signed-off-by: Kévin Raymond <shaiton@fedoraproject.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 15:25:47 -08:00
Dirk Hohndel
6855be0f1c OSX: also need to add the CoreServices framework to linker
We had this before - it appears that some versions of OSX need us to explicitly
list the frameworks we are using during the linking stage while others are
perfectly happy without that. But since listing them doesn't appear to hurt
this commit should be safe.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28 05:56:23 -08:00
Cristian Ionescu-Idbohrn
eb3376d612 Suppress the "/bin/sh: 1: cannot open version.h: No such file" noise.
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 07:44:10 -08:00
Cristian Ionescu-Idbohrn
6a29da800b Add target `all' to avoid "target order is important" confusion.
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27 07:43:57 -08:00
Dirk Hohndel
fd9a927ded Update versions to 3.0.1
almost forgot

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 12:57:59 -08:00
Dirk Hohndel
1fd2091759 Get make to rebuild Subsurface by default again
To quote Linus:

  Move the rule for the new version thing down.

  Plain "make" will try to make the first target in the Makefile.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 12:19:01 -08:00
Cristian Ionescu-Idbohrn
42fa5a6368 Generate/update a version.h header file.
This is dedicated to Lubomir ;)

Should work (tm).  Not sure though if you want target
'gen_version_file' as a pre-requisite to $(NAME) or some other target.

[Dirk Hohndel: minor adjustments to make it work with gtk-gui.c]

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26 10:47:04 -08:00
Dirk Hohndel
ce659407a8 Add correct XSLT search path for Windows
And report error if XSLT stylesheet not found

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-22 11:20:46 -08:00
Dirk Hohndel
59a39e4901 Updating versions for 3.0
Most of the actual version numbers are derived from the git tag, but we do
have the fallback hard-coded in the Makefile (e.g. for people building
from a source tar-ball).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-20 21:54:16 -08:00
Cristian Ionescu-Idbohrn
727ee3aa98 Unified handling of version extraction.
Removed oddly named and ridiculously outdated documentation text (scripts).

Created new directory 'scripts'.

Added unified version extraction script (scripts/get-version). Yes, it's
more shell script code but faster and more maintainable than the sed commands
and the swearwords/regexps repeated over and over again.

Makefile and packaging/macosx/make-package.sh modified accordingly.

I don't do windos neither macos but, AFAICS my tests show, it should be safe.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-16 15:41:58 -08:00
Dirk Hohndel
41256531b8 Further automization of the Mac build process
This improves the Plist.info and automates the version data that it uses
utilizing the same git magic that the Makefile uses.

It also makes the complete DMG creation a matter of simply running
packaging/macosx/make-package.sh

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-15 22:30:02 -08:00
Dirk Hohndel
0972d0c13e Fix sha1 build for Windows
This works at least when cross compiling.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-15 19:53:07 -08:00
Linus Torvalds
a0558a87b4 Get the SHA1 routines from git instead of openssl
..they are of a higher quality anyway, and this way we have one less
library to worry about.  And this way there is nobody who can claim that
openssl is not a system library and thus not compatible with the GPL.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-15 19:26:39 -08:00
Dirk Hohndel
249482cf2f Add support for signing Mac applications to the Makefile
Maybe I should comment out the target that requires my private key to work...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-14 09:19:28 -08:00
Dirk Hohndel
16dda3ec12 New Makefile target to create smaller diffs for translations
Simply run

make prepare-po-files

and msgcat will be run over all po files to create consistent location
references. That plus the change I made earlier to how we update the po
files should create much smaller and easier to read diffs for translators.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09 10:52:01 -08:00
Dirk Hohndel
9d9eff718b Hopefully last change to po files
While this is a pain for everyone, I decided not to edit out the code
reference noise - after all this is supposed to help translators find
where the text is used in case it's unclear how to translate something.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09 10:39:11 -08:00
Henrik Brautaset Aronsen
312f553aee Enable XSLT transforms on OSX
We still need proper paths and install options for the install-macosx
and create-macosx-bundle targets.  This enables XSLT support when
running as ./subsurface, but doesn't hurt the other install targets.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09 09:48:16 -08:00
Henrik Brautaset Aronsen
eb7acc1d96 Add XSLT support for the macosx install and bundle targets
Works like it should for the install-macosx target.  I haven't tested
the create-macosx-bundle target, but it shouldn't be any different.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09 09:44:51 -08:00
Henrik Brautaset Aronsen
ce87c26c00 Move about icon to include file
Getting the about icon to display in various scenarios on MacOSX
was a pain.  Moving the icon to an include file solved the problem.

This commit also fixes the problem Dirk was having when converting
satellite.svg to a png in commit cf3c0266c2.  I couldn't
quite get ImageMagick to preserve transparency and color when
converting subsurface-icon.svg, though, so I used Gimp instead.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2013-02-02 21:27:19 +01:00
Henrik Brautaset Aronsen
459130009b Rename subsurface.svg to subsurface-icon.svg
In preparation for a subsurface-icon.h, this should avoid confusion
about whether "subsurface.h" is a core header file.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2013-02-02 21:27:15 +01:00
Dirk Hohndel
29e73be9f2 Fix the rules for creating the windows .nsi file
This was one of the reasons why I tagged version 2.9. I wanted to test all
the Makefile magic we added to get sane and automated versions on Windows
and Linux. And it turned out my sed script failed in rather obvious ways.

These changes appear to fix that - but of course you won't see that unless
you reset your git repository to the tag and manually apply this patch.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01 18:06:13 +11:00
Dirk Hohndel
5d9ed3f1b4 Bump version number to 2.9
This is intended as a visual sign that we are getting closer to 3.0.

We should consider this a "soft" code freeze / string freeze - I'm still
looking for a bunch of fixes, small additions and of course documentation,
but no new major features.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01 17:48:55 +11:00
Dirk Hohndel
cf3c0266c2 Move flag icon to include file
Just like with the satellite icon we are creating a pixdata structure for
the flag.

The Makefile cleanup in commit df6a9ddd8a21 ("Auto-generate C file
dependencies, and make the build more quiet") removed the rules for
generating the .h file by mistake (I hope).

This adds a more generic rule back in and also makes sure that the data
structures get more useful names.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01 17:25:41 +11:00
Dirk Hohndel
aef211030d Hide the error output from pkg_config if you don't have osm-gps-map
This became very obvious after commit df6a9ddd8a21 ("Auto-generate C file
dependencies, and make the build more quiet") went in; since not having
osm-gps-map is one of the few errors that aren't fatal for building it
seemed worth quieting this down.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-31 14:41:02 +11:00
Linus Torvalds
054abbaea2 Auto-generate C file dependencies, and make the build more quiet
This does some rough auto-generation of header file dependencies for all
the *.c files, rather than our file-by-file incomplete hardcoded ones.

It also stops showing the whole compile line, because it's ugly and
distracting.  Instead it just shows "CC file.c".  If you care about the
full thing, you still see them with "make -n".

Only tested on Linux.  It probably is missing some Windows or
OSX-specific header includes.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-31 14:35:41 +11:00
Linus Torvalds
32e497b574 Let's call them GTKCFLAGS, not GTK2CFLAGS
Maybe they will be for GTK3 some day.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-28 07:55:26 -08:00
Linus Torvalds
41027c2843 Make subsurface compile with -DGSEAL_ENABLE
This forces us to use the proper gtk accessor functions.  It may not be
worth it if people actually do the Qt conversion, but if we want to try
gtk3 at some point, this might help.

This all came about because I was trying to explain on G+ what an
immense pain this all was to even figure out, if you don't actually know
gtk at all.  Google and the gtk migration guide are almost useless, and
the gtk2 documentation itself actually uses the fields directly without
any accessor functions in several places.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-28 07:54:55 -08:00
Dirk Hohndel
002fe45dfd Try to automate the version number used in the windows installer
This adds a Makefile target to create the .nsi file from a template and to
hopefully create the right strings to magically get the correct version
strings in the Windows installer

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-24 15:58:35 -08:00
Linus Torvalds
f36693322c Include git revision in version number
This makes sure that it's easy to tell from the about box whether this is
a released version or a development build.

If it is compiled at the exact location of the tag, "git describe
--tags" will just return the tag-name. Otherwise it will return
something like this

    v2.1-393-ge03f31525aab

which means "v2.1 plus 393 commits, git SHA1 of tip is e03f31525aab",
which is a nice combination of git-readable (only the actual SHA1
matters) and human-readable (393 commits on top of v2.1).

And if you don't build from git sources, and don't have git installed,
it falls back on the old "v$(VERSION)" string.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-24 15:08:35 -08:00