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

Last change on this file since 106 was 104, checked in by laleppa, 15 years ago
  • Improved the solution output generation algorithm. Now it works directly with QTextDocument instead of "feeding" it with HTML. Thanks to this the solution output generation is now about 1.65 times faster.
  • Added .txt extension to ChangeLog?, INSTALL and README files to simplify opening these files in Windows.
  • Made a small improvement to Settings Dialog to follow the current application palette.
  • Output text color if not set is now determmined based on the current application palette.
  • 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 104 2010-04-19 20:33:02Z 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
[103]20BUILD_RELEASE = 3
[96]21
[98]22# These are only defined on releases
[103]23#DEFINES += 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
[103]31#REVISION = 100
32REVISION = $$system(svnversion)
33REVISION = $$replace(REVISION,"M","")
[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
[104]64#       CONFIG += console
[99]65        D = d
[36]66}
[99]67TARGET = tspsg$${D}
[36]68
[20]69# Saving all intermediate files to tmp directory.
70MOC_DIR = ./tmp
71RCC_DIR = ./tmp
72UI_DIR = ./tmp
73
[96]74# Include file(s)
[17]75include(tspsg.pri)
76
[96]77# Installation and deployment
78# Common rules
[97]79l10n.files = l10n/*.qm
[96]80#share.files =
[104]81docs.files = COPYING README.txt
[96]82INSTALLS += target l10n share docs
83
[57]84# For *nix:
[96]85#   - executable goes to /usr/bin
[97]86#   - COPYING and README go to /usr/share/TSPSG
87#   - translations go to /usr/share/TSPSG/l10n
88#   - docs go to /usr/share/doc/TSPSG-x.x.x
[93]89unix:!symbian {
[96]90        PREFIX = /usr
91        CONFIG(release, debug|release) {
[97]92                DEFINES += PATH_L10N=\\\"$$PREFIX/share/TSPSG/l10n\\\"
93                DEFINES += PATH_DOCS=\\\"$$PREFIX/share/TSPSG/docs\\\"
[96]94        }
95
96        target.path = $$PREFIX/bin
[97]97        share.path = $$PREFIX/share/TSPSG
98        l10n.path = $$PREFIX/share/TSPSG/l10n
99        docs.path = $$PREFIX/share/doc/TSPSG-$$VERSION
[98]100        apps.files = resources/tspsg.desktop
[96]101        apps.path = $$PREFIX/share/applications/
[98]102        icon.files = resources/tspsg.png
[96]103        icon.path = $$PREFIX/share/pixmaps
104        INSTALLS += apps icon
[57]105}
[20]106
[96]107# TODO: MacOSX
108
[98]109# For win32: everything goes to "%PROGRAMFILES%\TSPSG" and subfolders.
[57]110win32 {
[98]111        PREFIX = "$$(PROGRAMFILES)"
[97]112
[100]113        share.files = $$[QT_INSTALL_BINS]/QtCore$${D}4.dll \
114                $$[QT_INSTALL_BINS]/QtGui$${D}4.dll
115#               $$[QT_INSTALL_BINS]/QtSvg$${D}4.dll
116        l10n.files += $$[QT_INSTALL_TRANSLATIONS]/*.qm
117        win32-g++ {
118                share.files += $$[QT_INSTALL_BINS]/mingwm10.dll \
119                        $$[QT_INSTALL_BINS]/libgcc_s_dw2-1.dll
120        }
[98]121        imageformats.files = $$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${D}4.dll \
122                $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${D}4.dll
[97]123        imageformats.path = $$PREFIX/TSPSG/imageformats
124        INSTALLS += imageformats
[57]125}
126
[97]127# For wince: we are deploying to \Program Files\TSPSG.
[57]128wince {
[97]129        PREFIX = "\Program Files"
[98]130        share.sources = $$share.files
[100]131        l10n.sources = $$l10n.files \
132                $$[QT_INSTALL_TRANSLATIONS]/*.qm
[98]133        docs.sources = $$docs.files
134
[96]135        DEPLOYMENT += target share l10n docs
[98]136#       DEPLOYMENT_PLUGIN += qjpeg qsvg
[57]137}
138
[96]139# win32 and wince common
140win* {
[97]141        target.path = $$PREFIX/TSPSG
142        share.path = $$PREFIX/TSPSG
143        l10n.path = $$PREFIX/TSPSG/l10n
144        docs.path = $$PREFIX/TSPSG
[96]145
146        RC_FILE = resources/tspsg.rc
147}
148
[93]149# Symbian
150symbian {
[98]151        # 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
152        share.sources = $$share.files
[100]153        l10n.sources = $$[QT_INSTALL_TRANSLATIONS]/qt_ru.qm \
154                $$[QT_INSTALL_TRANSLATIONS]/qt_uk.qm \
155                l10n/tspsg_en.qm l10n/tspsg_ru.qm l10n/tspsg_uk.qm
[96]156        l10n.path = l10n
[98]157        docs.sources = $$docs.files
[96]158        docs.pkg_prerules = \
[104]159                "\"README.txt\" - \"\", FILETEXT, TEXTCONTINUE" \
[93]160                "\"COPYING\" - \"\", FILETEXT, TEXTEXIT"
[96]161        DEPLOYMENT += share l10n docs
[98]162#       DEPLOYMENT_PLUGIN += qjpeg qsvg
[93]163
164        ICON = resources/tspsg.svg
165
166        appinfo = \
[98]167                "$$LITERAL_HASH{\"TSPSG\"},(0xEb9dce0e),$$BUILD_VERSION_MAJOR,$$BUILD_VERSION_MINOR,$$BUILD_RELEASE"
[93]168        vendorinfo = \
169                "%{\"l-homes.org\"}" \
170                ":\"l-homes.org\""
171        default_deployment.pkg_prerules = appinfo vendorinfo
172        DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"TSPSG Installer\"},(0xA000D7CE),1,0,0"
173}
Note: See TracBrowser for help on using the repository browser.