source: tspsg-svn/trunk/tspsg.pro @ 102

Last change on this file since 102 was 100, checked in by laleppa, 15 years ago

+ Added Installation Guide.

  • Updated translations.
  • Updated documentaion.

NB: This will be the second public alpha release.

  • Property svn:keywords set to Id URL
File size: 4.6 KB
RevLine 
[1]1######################################################################
[17]2#
[90]3#  TSPSG: TSP Solver and Generator
4#  Copyright (C) 2007-2010 Lёppa <contacts[at]oleksii[dot]name>
[17]5#
[90]6#  $Id: tspsg.pro 100 2010-04-08 21:02:26Z laleppa $
7#  $URL: https://tspsg.svn.sourceforge.net/svnroot/tspsg/trunk/tspsg.pro $
[17]8#
[90]9#  This file is part of TSPSG.
[17]10#
[1]11######################################################################
12
[98]13#QT += svg
[71]14
[36]15TEMPLATE = app
[1]16
[96]17# Versioning
18BUILD_VERSION_MAJOR = 0
19BUILD_VERSION_MINOR = 1
20BUILD_RELEASE = 2
21
[98]22# These are only defined on releases
[100]23DEFINES += TSPSG_RELEASE_BUILD
24!symbian {
25        DEFINES += BUILD_STATUS="\"(alpha 2)\""
26} else {
27        # Symbian doesn't handle spaces in defines well
28        DEFINES += BUILD_STATUS="(alpha2)"
29}
[96]30
[100]31#REVISION = $$system(svnversion)
32#REVISION = $$replace(REVISION,"M","")
33REVISION = 100
34VERSION = $$sprintf("%1.%2.%3.%4",$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE,$$REVISION)
[96]35
36DEFINES += BUILD_VERSION_MAJOR=$$BUILD_VERSION_MAJOR \
37        BUILD_VERSION_MINOR=$$BUILD_VERSION_MINOR \
38        BUILD_RELEASE=$$BUILD_RELEASE \
39        BUILD_NUMBER=$$REVISION
40
[71]41# A hack to determine whether we have static or dynamic Qt build
[96]42unix:!symbian {
43        PRL = $$[QT_INSTALL_LIBS] libQtCore.prl
44} else:unix {
45        PRL = $$[QT_INSTALL_LIBS] QtCore.prl
[97]46} else {
47        PRL = $$[QT_INSTALL_LIBS] QtCore.prl
[96]48}
[71]49include($$join(PRL, "/"))
50contains(QMAKE_PRL_CONFIG, static) {
51# We "embed" SVG and JPEG support on static build
[98]52#       QTPLUGIN += qjpeg qsvg
[71]53        DEFINES += STATIC_BUILD
54}
55
[100]56CONFIG(release, debug|release) {
[36]57        OBJECTS_DIR = release
58        DESTDIR = release
[99]59        D =
[36]60} else {
61        OBJECTS_DIR = debug
62        DESTDIR = debug
[96]63        DEFINES += DEBUG
[99]64        D = d
[36]65}
[99]66TARGET = tspsg$${D}
[36]67
[20]68# Saving all intermediate files to tmp directory.
69MOC_DIR = ./tmp
70RCC_DIR = ./tmp
71UI_DIR = ./tmp
72
[96]73# Include file(s)
[17]74include(tspsg.pri)
75
[96]76# Installation and deployment
77# Common rules
[97]78l10n.files = l10n/*.qm
[96]79#share.files =
80docs.files = COPYING README
81INSTALLS += target l10n share docs
82
[57]83# For *nix:
[96]84#   - executable goes to /usr/bin
[97]85#   - COPYING and README go to /usr/share/TSPSG
86#   - translations go to /usr/share/TSPSG/l10n
87#   - docs go to /usr/share/doc/TSPSG-x.x.x
[93]88unix:!symbian {
[96]89        PREFIX = /usr
90        CONFIG(release, debug|release) {
[97]91                DEFINES += PATH_L10N=\\\"$$PREFIX/share/TSPSG/l10n\\\"
92                DEFINES += PATH_DOCS=\\\"$$PREFIX/share/TSPSG/docs\\\"
[96]93        }
94
95        target.path = $$PREFIX/bin
[97]96        share.path = $$PREFIX/share/TSPSG
97        l10n.path = $$PREFIX/share/TSPSG/l10n
98        docs.path = $$PREFIX/share/doc/TSPSG-$$VERSION
[98]99        apps.files = resources/tspsg.desktop
[96]100        apps.path = $$PREFIX/share/applications/
[98]101        icon.files = resources/tspsg.png
[96]102        icon.path = $$PREFIX/share/pixmaps
103        INSTALLS += apps icon
[57]104}
[20]105
[96]106# TODO: MacOSX
107
[98]108# For win32: everything goes to "%PROGRAMFILES%\TSPSG" and subfolders.
[57]109win32 {
[98]110        PREFIX = "$$(PROGRAMFILES)"
[97]111
[100]112        share.files = $$[QT_INSTALL_BINS]/QtCore$${D}4.dll \
113                $$[QT_INSTALL_BINS]/QtGui$${D}4.dll
114#               $$[QT_INSTALL_BINS]/QtSvg$${D}4.dll
115        l10n.files += $$[QT_INSTALL_TRANSLATIONS]/*.qm
116        win32-g++ {
117                share.files += $$[QT_INSTALL_BINS]/mingwm10.dll \
118                        $$[QT_INSTALL_BINS]/libgcc_s_dw2-1.dll
119        }
[98]120        imageformats.files = $$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${D}4.dll \
121                $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${D}4.dll
[97]122        imageformats.path = $$PREFIX/TSPSG/imageformats
123        INSTALLS += imageformats
[57]124}
125
[97]126# For wince: we are deploying to \Program Files\TSPSG.
[57]127wince {
[97]128        PREFIX = "\Program Files"
[98]129        share.sources = $$share.files
[100]130        l10n.sources = $$l10n.files \
131                $$[QT_INSTALL_TRANSLATIONS]/*.qm
[98]132        docs.sources = $$docs.files
133
[96]134        DEPLOYMENT += target share l10n docs
[98]135#       DEPLOYMENT_PLUGIN += qjpeg qsvg
[57]136}
137
[96]138# win32 and wince common
139win* {
[97]140        target.path = $$PREFIX/TSPSG
141        share.path = $$PREFIX/TSPSG
142        l10n.path = $$PREFIX/TSPSG/l10n
143        docs.path = $$PREFIX/TSPSG
[96]144
145        RC_FILE = resources/tspsg.rc
146}
147
[93]148# Symbian
149symbian {
[98]150        # qmake for Symbian (as of Qt 4.6.2) has a bug: file masks doesn't work, so we need to specify all files manually
151        share.sources = $$share.files
[100]152        l10n.sources = $$[QT_INSTALL_TRANSLATIONS]/qt_ru.qm \
153                $$[QT_INSTALL_TRANSLATIONS]/qt_uk.qm \
154                l10n/tspsg_en.qm l10n/tspsg_ru.qm l10n/tspsg_uk.qm
[96]155        l10n.path = l10n
[98]156        docs.sources = $$docs.files
[96]157        docs.pkg_prerules = \
[93]158                "\"README\" - \"\", FILETEXT, TEXTCONTINUE" \
159                "\"COPYING\" - \"\", FILETEXT, TEXTEXIT"
[96]160        DEPLOYMENT += share l10n docs
[98]161#       DEPLOYMENT_PLUGIN += qjpeg qsvg
[93]162
163        ICON = resources/tspsg.svg
164
165        appinfo = \
[98]166                "$$LITERAL_HASH{\"TSPSG\"},(0xEb9dce0e),$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE"
[93]167        vendorinfo = \
168                "%{\"l-homes.org\"}" \
169                ":\"l-homes.org\""
170        default_deployment.pkg_prerules = appinfo vendorinfo
171        DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"TSPSG Installer\"},(0xA000D7CE),1,0,0"
172}
Note: See TracBrowser for help on using the repository browser.