Changeset 96 in tspsg-svn for trunk/tspsg.pro


Ignore:
Timestamp:
Mar 1, 2010, 2:13:23 PM (15 years ago)
Author:
laleppa
Message:
  • Fixed some wrong defines that prevented successful compilation under *nix.
  • Renamed i18n to l10n to follow common standards.
  • Translation and documentation paths are now synchronized between .pro and source.
  • Moved some versioning information to .pro file.
  • Updated translations.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tspsg.pro

    r95 r96  
    1717DEPENDPATH += .
    1818INCLUDEPATH += .
    19 VERSOIN = 0.1.2
     19
     20# Versioning
     21BUILD_VERSION_MAJOR = 0
     22BUILD_VERSION_MINOR = 1
     23BUILD_RELEASE = 2
     24
     25# This one is only defined on releases
     26#DEFINES += TSPSG_RELEASE_BUILD
     27
     28REVISION = $$system(svnversion)
     29REVISION = $$replace(REVISION,"M","")
     30VERSION = $$sprintf("%1.%2.%3",$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE)
     31
     32DEFINES += BUILD_VERSION_MAJOR=$$BUILD_VERSION_MAJOR \
     33        BUILD_VERSION_MINOR=$$BUILD_VERSION_MINOR \
     34        BUILD_RELEASE=$$BUILD_RELEASE \
     35        BUILD_NUMBER=$$REVISION
    2036
    2137# A hack to determine whether we have static or dynamic Qt build
    22 PRL = $$[QT_INSTALL_LIBS] QtCore.prl
     38unix:!symbian {
     39        PRL = $$[QT_INSTALL_LIBS] libQtCore.prl
     40} else:unix {
     41        PRL = $$[QT_INSTALL_LIBS] QtCore.prl
     42}
    2343include($$join(PRL, "/"))
    2444contains(QMAKE_PRL_CONFIG, static) {
     
    3454        OBJECTS_DIR = debug
    3555        DESTDIR = debug
     56        DEFINES += DEBUG
    3657}
    3758
     
    4162UI_DIR = ./tmp
    4263
    43 #Include file(s)
     64# Include file(s)
    4465include(tspsg.pri)
    4566
     67# Installation and deployment
     68# Common rules
     69#share.files =
     70l10n.files = l10n/*.qm
     71docs.files = COPYING README
     72INSTALLS += target l10n share docs
     73
    4674# For *nix:
    47 #   - executable goes to $(INSTALL_ROOT)/bin
    48 #   - COPYING and README go to $(INSTALL_ROOT)/share/tspsg
    49 #   - translations go to $(INSTALL_ROOT)/share/tspsg/i18n
    50 #   - docs (none, yet) go to $(INSTALL_ROOT)/share/doc/tspsg
    51 # Usually, $(INSTALL_ROOT) is /usr or /usr/local
     75#   - executable goes to /usr/bin
     76#   - COPYING and README go to /usr/share/tspsg
     77#   - translations go to /usr/share/tspsg/l10n
     78#   - docs (none, yet) go to /usr/share/doc/tspsg
    5279unix:!symbian {
    53         target.path = /bin
    54         share.path = /share/tspsg
    55         share.files = COPYING README
    56         i18n.path = /share/tspsg/i18n
    57         i18n.files = i18n/*.qm
    58         docs.path = /share/doc/tspsg
    59 #       docs.files = docs/*
    60         apps.path = /share/applications/
     80        PREFIX = /usr
     81        CONFIG(release, debug|release) {
     82                DEFINES += PATH_L10N=\\\"$$PREFIX/share/tspsg/l10n\\\"
     83                DEFINES += PATH_DOCS=\\\"$$PREFIX/share/tspsg/docs\\\"
     84        }
     85
     86        target.path = $$PREFIX/bin
     87        share.path = $$PREFIX/share/tspsg
     88        l10n.path = $$PREFIX/share/tspsg/l10n
     89        docs.path = $$PREFIX/share/doc/tspsg-$$VERSION
     90        apps.path = $$PREFIX/share/applications/
    6191        apps.files = resources/tspsg.desktop
    62         icon.path = /share/pixmaps
     92        icon.path = $$PREFIX/share/pixmaps
    6393        icon.files = resources/tspsg.png
    64         INSTALLS += target i18n docs share icon apps
     94        INSTALLS += apps icon
    6595}
    6696
    67 # For win32: everything goes to $(INSTALL_ROOT)\tspsg and subfolders.
    68 # Usually, $(INSTALL_ROOT) is "C:\Program Files"
     97# TODO: MacOSX
     98
     99# For win32: everything goes to "C:\Program Files\tspsg" and subfolders.
    69100win32 {
    70         target.path = "\tspsg"
    71         share.path = "\tspsg"
    72         share.files = COPYING README
    73         i18n.path = "\tspsg\i18n"
    74         i18n.files = i18n/*.qm
    75         docs.path = "\tspsg\help"
    76 #       docs.files = docs\*
    77         INSTALLS += target i18n docs share
     101        PREFIX = "C:\Program Files"
     102}
     103
     104# For wince: we are deploying to \Storage Card\Program Files\tspsg.
     105wince {
     106        PREFIX = "\Storage Card\Program Files"
     107        DEPLOYMENT += target share l10n docs
     108}
     109
     110# win32 and wince common
     111win* {
     112        target.path = "$$PREFIX\tspsg"
     113        share.path = "$$PREFIX\tspsg"
     114        l10n.path = "$$PREFIX\tspsg\l10n"
     115        docs.path = "$$PREFIX\tspsg"
    78116
    79117        RC_FILE = resources/tspsg.rc
    80118}
    81119
    82 # TODO: MacOSX
    83 
    84 # For wince: we are deploying to \Storage Card\Program Files\tspsg.
    85 wince {
    86         deploy.path = "\Storage Card\Program Files\tspsg"
    87         share.sources = COPYING README
    88         share.path = "\Storage Card\Program Files\tspsg"
    89         i18n.sources = i18n/*.qm
    90         i18n.path = "\Storage Card\Program Files\tspsg\i18n"
    91 #       docs.sources = docs\*
    92 #       docs.path = "\Storage Card\Program Files\tspsg\help"
    93         DEPLOYMENT += deploy share i18n # docs
    94 }
    95 
    96120# Symbian
    97121symbian {
    98         share.pkg_prerules = \
     122        l10n.path = l10n
     123        docs.pkg_prerules = \
    99124                "\"README\" - \"\", FILETEXT, TEXTCONTINUE" \
    100125                "\"COPYING\" - \"\", FILETEXT, TEXTEXIT"
    101         share.sources = COPYING README
    102         i18n.sources = i18n/*.qm
    103         i18n.path = i18n
    104 #       docs.sources = docs/*
    105 #       docs.path = help
    106         DEPLOYMENT += share i18n # docs
     126        DEPLOYMENT += share l10n docs
    107127
    108128        ICON = resources/tspsg.svg
Note: See TracChangeset for help on using the changeset viewer.