Commit [be54f4] Maximize Restore History

From: mstsxfx@gmail.com

To: pdfedit-devel@lists.sourceforge.net
Subject: [PATCH @num@/@total@] version manipulation in gui updated

This patch changes implementation of version handling in gui. We don't rely
on hardcoded version in src/gui/version.h, but we use the output from
getversion script instead.

The second big change is that we don't have version defined as a macro in
the header file. Macro approach has one big disadvantage that we have to
rebuild all sources which use it each time when the version is changed.

In this patch we have changed VERSION to the extern variable defined in the
version.cc module which is generated on demand by Makefile.gui. TARGET
binary depends on this cc module and Makefile.gui takes care that it
contains the current full version value (from getversion -v -r). File is
generated during first compilation and whenever some of the version
important files (getversion -f) is modified.

Implementation of cc module doesn't have above macro (rebuild all sources
including version.h) problem because the real value of extern variable for
version is used in the link time. So only necessary minimum is recompiled.

* dist-exclude, version_exclude
- version.cc is generated and shouldn't be distributed
* version.cc.tmpl
- template for version.cc added
- this file is used by Makefile.gui to generate version.cc
- currently only defines PDFEDIT_VERSION extern variable
* Makefile.gui
- generates version.cc - simply substitute version with the current
FULL_VERSION (./getversion -v -r). Generation target depends on
all version important files
* pdfedit.pro
- TARGET depends on version.cc
* version.h
- VERSION -> PDFEDIT_VERSION (for disambiguate)
- PDFEDIT_VERSION is variable rather than macro
* gui/aboutwindow.cc, gui/args.cc, gui/base.cc, gui/main.cc
- sync with above changes

Michal Hocko Michal Hocko 2008-10-30

added src/gui/version.cc.tmpl
changed src/gui/Makefile.gui
changed src/gui/aboutwindow.cc
changed src/gui/args.cc
changed src/gui/base.cc
changed src/gui/main.cc
changed src/gui/pdfedit.pro
changed src/gui/version.h
changed dist-exclude
changed version_exclude
src/gui/version.cc.tmpl Diff Switch to side-by-side view
Loading...
src/gui/Makefile.gui Diff Switch to side-by-side view
Loading...
src/gui/aboutwindow.cc Diff Switch to side-by-side view
Loading...
src/gui/args.cc Diff Switch to side-by-side view
Loading...
src/gui/base.cc Diff Switch to side-by-side view
Loading...
src/gui/main.cc Diff Switch to side-by-side view
Loading...
src/gui/pdfedit.pro Diff Switch to side-by-side view
Loading...
src/gui/version.h Diff Switch to side-by-side view
Loading...
dist-exclude Diff Switch to side-by-side view
Loading...
version_exclude Diff Switch to side-by-side view
Loading...