diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 9aaee3d9..9fa92c3e 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -5,7 +5,9 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 CONFIG += nokey -APP_NAME = RedPandaIDE +isEmpty(APP_NAME) { + APP_NAME = RedPandaCPP +} gcc { QMAKE_CXXFLAGS_RELEASE += -Werror=return-type @@ -341,9 +343,13 @@ linux: { TRANSLATIONS += \ RedPandaIDE_zh_CN.ts +isEmpty(PREFIX) { + PREFIX = /usr/local +} + # Default rules for deployment. -qnx: target.path = /tmp/$${APP_NAME}/bin -else: unix:!android: target.path = /opt/$${APP_NAME}/bin +qnx: target.path = $${PREFIX}/bin +else: unix:!android: target.path = $${PREFIX}/bin !isEmpty(target.path): INSTALLS += target RESOURCES += \ diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index 1aa23937..2de7fa96 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -5,14 +5,26 @@ SUBDIRS += \ astyle \ consolepauser -APP_NAME = RedPandaIDE +APP_NAME = RedPandaCPP linux: { - resources.path = /opt/$${APP_NAME} - resources.files += linux/* - resources.files += NEWS.md - resources.files += LICENSE - resources.files += README.md + isEmpty(PREFIX) { + PREFIX = /usr/local + } + + resources.path = $${PREFIX}/share/$${APP_NAME} + resources.files += linux/templates INSTALLS += resources + + docs.path = $${PREFIX}/share/docs/$${APP_NAME} + docs.files += README.md + docs.files += NEWS.md + docs.files += LICENSE + INSTALLS += docs + + pixmaps.path = $${PREFIX}/share/pixmaps + pixmaps.files += linux/redpandaide.png + + } diff --git a/astyle/astyle.pro b/astyle/astyle.pro index 25a5c25c..39b40a45 100644 --- a/astyle/astyle.pro +++ b/astyle/astyle.pro @@ -1,6 +1,8 @@ QT -= gui -APP_NAME = RedPandaIDE +isEmpty(APP_NAME) { + APP_NAME = RedPandaCPP +} CONFIG += c++11 console CONFIG -= app_bundle @@ -17,9 +19,14 @@ SOURCES += \ ASResource.cpp \ astyle_main.cpp +isEmpty(PREFIX) { + PREFIX = /usr/local +} + # Default rules for deployment. -qnx: target.path = /tmp/$${APP_NAME}/bin -else: unix:!android: target.path = /opt/$${APP_NAME}/bin +qnx: target.path = $${PREFIX}/libexec/$${APP_NAME} +else: unix:!android: target.path = $${PREFIX}/libexec/$${APP_NAME} + !isEmpty(target.path): INSTALLS += target HEADERS += \ diff --git a/consolepauser/consolepauser.pro b/consolepauser/consolepauser.pro index 9d9a4c69..31679d60 100644 --- a/consolepauser/consolepauser.pro +++ b/consolepauser/consolepauser.pro @@ -3,7 +3,9 @@ QT -= gui CONFIG += c++11 console CONFIG -= app_bundle -APP_NAME = RedPandaIDE +isEmpty(APP_NAME) { + APP_NAME = RedPandaCPP +} # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. @@ -24,7 +26,11 @@ SOURCES += \ CONFIG += lrelease CONFIG += embed_translations +isEmpty(PREFIX) { + PREFIX = /usr/local +} + # Default rules for deployment. -qnx: target.path = /tmp/$${APP_NAME}/bin -else: unix:!android: target.path = /opt/$${APP_NAME}/bin +qnx: target.path = /tmp/$${PREFIX}/libexec/$${APP_NAME} +else: unix:!android: target.path = /usr/$${PREFIX}/libexec/$${APP_NAME} !isEmpty(target.path): INSTALLS += target