the following are needed in subsurface-install.pri
FULL_VERSION
VERSION (this one is previously set in subsurface.pro)
PRODVERSION_STRING
VERSION_STRING
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- added ./scripts/write-version
- subsurface-gen-version.pri is much simpler now
- .git/HEAD is no longer used explicitly in .pro/.pri files
- the version_h rule is called on each 'make' invocation
but recompilation will occur only if ssrf-version.h
is updated by ./scripts/write-version
- qmake now depends on the existence of ssrf-version.h
so it creates an empty one on Makefile generation so
that a warning is not shown
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
VERSION_STRING is the one most appropriate for the target OS
GIT_VERSION_STRING is the full version string with the git hash
CANONICAL_VERSION_STRING is major.minor.submior.number_of_commits
Mac allows only three components to the version
Windows allows four
Linux doesn't care
This way we always know the full git hash (unless tagged or from tar)
AND we can always have a version that can be easily compared / sorted.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
"'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>
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>
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>
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>
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>
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>
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>
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>
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>
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>