Ticket #885: myth-version.diff

File myth-version.diff, 5.0 KB (added by willu.mailingLists@…, 14 years ago)

a svn diff of the changes

  • configure

     
    7474valgrind="no"
    7575frontend="yes"
    7676backend="no"
     77svn_revision=`( svnversion . 2>/dev/null ) || echo "Release 0.19.0"`
     78 
     79echo "Source revision: $svn_revision"
    7780
     81cat > libs/libmyth/vers.cpp <<EOF
     82#include "vers.h"
     83
     84const char *myth_source_version = "$svn_revision";
     85EOF
     86
    7887if test x"$CC" != x"" ; then
    7988    cc="$CC"
    8089fi
  • libs/libmyth/libmyth.pro

     
    1717HEADERS += uilistbtntype.h generictree.h screensaver.h
    1818HEADERS += managedlist.h DisplayRes.h volumebase.h audiooutputbase.h
    1919HEADERS += dbsettings.h screensaver-null.h output.h visual.h
    20 HEADERS += langsettings.h audiooutputnull.h
     20HEADERS += langsettings.h audiooutputnull.h vers.h
    2121HEADERS += DisplayResScreen.h util-x11.h mythdeque.h qmdcodec.h
    2222HEADERS += exitcodes.h virtualkeyboard.h mythobservable.h mythevent.h
    2323
     
    3131SOURCES += dbsettings.cpp screensaver.cpp screensaver-null.cpp output.cpp
    3232SOURCES += langsettings.cpp mythdbcon.cpp audiooutputnull.cpp
    3333SOURCES += DisplayResScreen.cpp util-x11.cpp qmdcodec.cpp
    34 SOURCES += virtualkeyboard.cpp mythobservable.cpp
     34SOURCES += virtualkeyboard.cpp mythobservable.cpp vers.cpp
    3535
    3636INCLUDEPATH += ../libmythsamplerate ../libmythsoundtouch ../..
    3737DEPENDPATH += ../libmythsamplerate ../libmythsoundtouch
     
    5858inc.files += uilistbtntype.h generictree.h managedlist.h
    5959inc.files += visual.h volumebase.h output.h langsettings.h qmdcodec.h
    6060inc.files += exitcodes.h mythconfig.h mythconfig.mak virtualkeyboard.h
    61 inc.files += mythevent.h mythobservable.h
     61inc.files += mythevent.h mythobservable.h vers.h
    6262
    6363using_oss {
    6464    DEFINES += USING_OSS
  • libs/libmyth/vers.h

     
     1#ifndef VERS_H_
     2#define VERS_H_
     3
     4extern const char *myth_source_version;
     5
     6#endif
     7
  • programs/mythfrontend/main.cpp

     
    4747#include "langsettings.h"
    4848#include "livetvchain.h"
    4949
     50#include "vers.h"
     51
    5052#define NO_EXIT  0
    5153#define QUIT     1
    5254#define HALT     2
     
    840842        }
    841843        else if (!strcmp(a.argv()[argpos],"--version"))
    842844        {
    843             cout << MYTH_BINARY_VERSION << endl;
     845            cout << "Source version: " << myth_source_version << endl;
     846            cout << "API version: " << MYTH_BINARY_VERSION << endl;
    844847#ifdef MYTH_BUILD_CONFIG
    845848            cout << "Options compiled in:" <<endl;
    846849            cout << MYTH_BUILD_CONFIG << endl;
     
    987990        return FRONTEND_EXIT_DB_OUTOFDATE;
    988991    }
    989992
    990     VERBOSE(VB_ALL, QString("%1 version: %2 www.mythtv.org")
    991                             .arg(binname).arg(MYTH_BINARY_VERSION));
     993    VERBOSE(VB_ALL, QString("%1 version: %2, %3 www.mythtv.org")
     994                            .arg(binname).arg(myth_source_version)
     995                            .arg(MYTH_BINARY_VERSION));
    992996
    993997    VERBOSE(VB_ALL, QString("Enabled verbose msgs: %1").arg(verboseString));
    994998
  • programs/mythbackend/main.cpp

     
    3030#include "libmyth/mythcontext.h"
    3131#include "libmyth/mythdbcon.h"
    3232#include "libmyth/exitcodes.h"
     33#include "libmyth/vers.h"
    3334#include "libmythtv/programinfo.h"
    3435#include "libmythtv/dbcheck.h"
    3536#include "libmythtv/jobqueue.h"
     
    323324        }
    324325        else if (!strcmp(a.argv()[argpos],"--version"))
    325326        {
    326             cout << MYTH_BINARY_VERSION << endl;
     327            cout << "Source version: " << myth_source_version << endl;
     328            cout << "API version: " << MYTH_BINARY_VERSION << endl;
    327329#ifdef MYTH_BUILD_CONFIG
    328330            cout << "Options compiled in:" <<endl;
    329331            cout << MYTH_BUILD_CONFIG << endl;
     
    517519    else
    518520        jobqueue = new JobQueue(ismaster);
    519521
    520     VERBOSE(VB_ALL, QString("%1 version: %2 www.mythtv.org")
    521                             .arg(binname).arg(MYTH_BINARY_VERSION));
     522    VERBOSE(VB_ALL, QString("%1 version: %2, %3 www.mythtv.org")
     523                            .arg(binname).arg(myth_source_version)
     524                            .arg(MYTH_BINARY_VERSION));
    522525
    523526    VERBOSE(VB_ALL, QString("Enabled verbose msgs: %1").arg(verboseString));
    524527
  • settings.pro

     
    4242QMAKE_CFLAGS += $$ARCHFLAGS
    4343QMAKE_CFLAGS_SHLIB = -DPIC -fPIC
    4444QMAKE_CFLAGS_RELEASE = $${QMAKE_CXXFLAGS_RELEASE}
     45QMAKE_CFLAGS_DEBUG = $${QMAKE_CXXFLAGS_DEBUG}
    4546QMAKE_CFLAGS += $$ECFLAGS
    4647
    4748profile {