Commit graph

15 commits

Author SHA1 Message Date
Dirk Hohndel
2b8043b82b Create better version numbering for Windows
I don't think this will be a problem for the other OSs, but it needs a bit
more testing, especially on the Mac.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-29 13:01:26 -07:00
Dirk Hohndel
a0fc0d5125 make clean should also remove ssrf-version.h
Regardless if we are building from git or from a tar file.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21 06:00:46 -05:00
Anton Lundin
a73f00dcac Fix building in git shallow clones
If we are building from a shallow clone, just guess the version based on
whats hard-coded in VERSION and append a -git to show thats it somwhere
behind that.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-21 11:35:31 -08:00
Lubomir I. Ivanov
1f7f5e18e2 qmake: use real tabs for all .pri files
subsurface.pro already useses that.

For consistency with the app, we use swap 4 spaces with
a tab character for indentation.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03 13:03:46 -08:00
Lubomir I. Ivanov
639f12cc42 qmake: fix a 'GIT_DIR' issue
"'GIT_DIR' is not recognized as an internal or external command",
is reported if qmake is runned on Win32.

To solve that we set a explicit syntax for Win32 that uses "Set.."

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03 13:03:29 -08:00
Dirk Hohndel
9383693928 Create installer with qmake
This is seriously flawed. makensis is run twice for some reason. I also
noticed that the data and xslt directories under packaging/windows aren't
created when running make install. Running
	make -f Makefile.Release install_marbledir install_deploy
works, but obviously this should be taken care of by the dependency.

The installed binary under Windows is not finding its icon, the
translations are missing... lots of work left to do here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-05 13:05:14 +09:00
Thiago Macieira
eff5d0ce50 Set GIT_DIR when calling out to Git from the Makefile
This is necessary for out-of-source builds to work.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-16 06:56:48 -07:00
Thiago Macieira
b3db9bb48a Use git rev-parse --symbolic-full-name to get the HEAD target ref
This will prevent us trying to depend on a file that doesn't exist in
case someone goes on a detached HEAD. For example, this could happen
during a bisect.

  (detached head) $ git rev-parse --symbolic-full-name HEAD
  HEAD
  (master) $ git rev-parse --symbolic-full-name HEAD
  refs/heads/master

This will break on a packed ref, though.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15 20:24:14 -07:00
Dirk Hohndel
f96299ea94 Dependencies are too aggressive for version.h
Apparently qmake can't tell that #include "version.h" and #include
"libdivecomputer/version.h" are not the same thing. Instead of spending
another bunch of hours on fixing the buildsystem I decided to just cleanup
the spots where we actually use the version file and rename it to
ssrf-version.h.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15 19:54:15 -07:00
Dirk Hohndel
dba4245075 Make sure version.h is updated whenever the git version changes
The easiest way to do this seems to make it depend on the correct git
reference. qmake will do the right thing (and create a fixed version.h based on
the VERSION variable) if the user is working from a tar ball.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15 03:53:33 -07:00
Dirk Hohndel
03f4089acb Get the version at make time, not qmake time
Let's see how many tries it will take me to get this one right...
The name of the .dmg needs to be determined when running make, not qmake.
Otherwise we'd have to force the user to run qmake every time version.h
changes. This looks better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15 02:49:46 -07:00
Dirk Hohndel
5477c1ffa0 Actually get the correct full version for DMG
This is what I get for trying to be smart and pushing a change from the Linux
box because the fix was 'obvious'. Duh. It was not. In order to get the real
full version including the git hash we always have to pass 'linux' to the
gen-version script, even on a Mac.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14 22:43:50 -07:00
Dirk Hohndel
9dbf5a6daa Use full version for Mac dmg file
Only tagged releases should get the short version number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14 22:39:29 -07:00
Lubomir I. Ivanov
6d75d82ab9 subsurface-gen-version.pri: pass the current OS to get-version
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-10 07:15:39 -07:00
Thiago Macieira
67e49d6480 Implement a qmake-based build for Subsurface
This is working for me, but requires a bit more testing. To build,
run:
  qmake [options]

Where options might be:
  V=1               disable "silent" build
  LIBDCDEVEL=1      use side-by-side libdivecomputer
  INCLUDEPATH+=xxx  add -Ixxx (e.g., INCLUDEPATH+=/usr/local/marble/include)
  LIBS+=xxx         add xxx to the linker flags (e.g. LIBS+=-L/usr/local/marble/lib)
  or any other qmake option, including debug and release options

If your distribution is already using qtchooser in place of qmake, you
may need to pass an extra option to qmake to select the a
cross-build. For example:

  qmake -qt=i686-w64-mingw32-qt4

If your distribution is not yet using qtchooser, then you need to file
a bug report requesting it and you need to run the full path to qmake.

Note:
 - there are some ### left in the buildsystem

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:29:33 -07:00