Tried to improve the determination of the musredit/musrgui installation path (in case ROOTSYS is not set). If no path is specified using PREFIX and neither MUSRFITPATH nor ROOTSYS is set, the default path at the moment is /usr/local/bin even though I am not sure that this is the best choice...

This commit is contained in:
Bastian M. Wojek 2011-06-15 11:23:09 +00:00
parent 8dc31cad54
commit e244d2093a
2 changed files with 59 additions and 9 deletions

View File

@ -1,9 +1,33 @@
TEMPLATE = app TEMPLATE = app
TARGET = musredit TARGET = musredit
# install path for musredit # install path for musredit
unix:target.path = $$(ROOTSYS)/bin count( PREFIX, 1 ) {
MUSREDIT_INSTALL_PATH = $${PREFIX}/bin
}
isEmpty( MUSREDIT_INSTALL_PATH ) {
MUSR_FIT_PATH = $$(MUSRFITPATH)
count( MUSR_FIT_PATH, 1 ) {
MUSREDIT_INSTALL_PATH = $$(MUSRFITPATH)
}
}
isEmpty( MUSREDIT_INSTALL_PATH ) {
ROOT_SYS_PATH = $$(ROOTSYS)
count( ROOT_SYS_PATH, 1 ) {
MUSREDIT_INSTALL_PATH = $$(ROOTSYS)/bin
}
}
isEmpty( MUSREDIT_INSTALL_PATH ) {
MUSREDIT_INSTALL_PATH = /usr/local/bin
}
unix {
message( "Determined installation path: $${MUSREDIT_INSTALL_PATH}" )
}
unix:target.path = $${MUSREDIT_INSTALL_PATH}
macx:target.path = /Applications macx:target.path = /Applications
win32:target.path = c:/musrfit/bin win32:target.path = c:/musrfit/bin
INSTALLS += target INSTALLS += target
@ -21,8 +45,8 @@ QMAKE_CC = gcc
QMAKE_CXX = g++ QMAKE_CXX = g++
# install path for the XML configuration file # install path for the XML configuration file
unix:xml.path = $$(ROOTSYS)/bin/ unix:xml.path = $${MUSREDIT_INSTALL_PATH}
macx:xml.path = $$(ROOTSYS)/bin/ macx:xml.path = $${MUSREDIT_INSTALL_PATH}
win32:xml.path = c:/musrfit/bin win32:xml.path = c:/musrfit/bin
xml.files = musredit_startup.xml xml.files = musredit_startup.xml
INSTALLS += xml INSTALLS += xml
@ -32,7 +56,7 @@ CONFIG += qt \
debug debug
QT += xml QT += xml
QT += webkit QT += webkit
QT += network QT += network
HEADERS = musredit.h \ HEADERS = musredit.h \

View File

@ -1,10 +1,36 @@
TEMPLATE = app TEMPLATE = app
TARGET = musrgui TARGET = musrgui
unix:target.path = $$(ROOTSYS)/bin
# install path for musrgui
count( PREFIX, 1 ) {
MUSRGUI_INSTALL_PATH = $${PREFIX}/bin
}
isEmpty( MUSRGUI_INSTALL_PATH ) {
MUSR_FIT_PATH = $$(MUSRFITPATH)
count( MUSR_FIT_PATH, 1 ) {
MUSRGUI_INSTALL_PATH = $$(MUSRFITPATH)
}
}
isEmpty( MUSRGUI_INSTALL_PATH ) {
ROOT_SYS_PATH = $$(ROOTSYS)
count( ROOT_SYS_PATH, 1 ) {
MUSRGUI_INSTALL_PATH = $$(ROOTSYS)/bin
}
}
isEmpty( MUSRGUI_INSTALL_PATH ) {
MUSRGUI_INSTALL_PATH = /usr/local/bin
}
unix {
message( "Determined installation path: $${MUSRGUI_INSTALL_PATH}" )
}
unix:target.path = $${MUSRGUI_INSTALL_PATH}
macx:target.path = /Applications macx:target.path = /Applications
exists( /usr/bin/cygwin1.dll ) { exists( /usr/bin/cygwin1.dll ) {
QMAKE_LFLAGS_SHAPP = -Wl,--enable-auto-import QMAKE_LFLAGS_SHAPP = -Wl,--enable-auto-import
} }
INSTALLS += target INSTALLS += target
@ -12,8 +38,8 @@ QMAKE_CC = gcc
QMAKE_CXX = g++ QMAKE_CXX = g++
# install path for the XML configuration file # install path for the XML configuration file
unix:xml.path = $$(ROOTSYS)/bin/ unix:xml.path = $${MUSRGUI_INSTALL_PATH}
macx:xml.path = $$(ROOTSYS)/bin/ macx:xml.path = $${MUSRGUI_INSTALL_PATH}
xml.files = musrgui_startup.xml xml.files = musrgui_startup.xml
INSTALLS += xml INSTALLS += xml