diff --git a/bin/bin.pro b/bin/bin.pro new file mode 100644 index 0000000000000000000000000000000000000000..f0352035b8a2bf39fade7c9328995e4e2221cc38 --- /dev/null +++ b/bin/bin.pro @@ -0,0 +1,16 @@ +IDE_BUILD_TREE = $$OUT_PWD/.. + +include(../qtcreator.pri) + +TEMPLATE = app +TARGET = $$IDE_APP_WRAPPER +OBJECTS_DIR = + +PRE_TARGETDEPS = $$PWD/qtcreator + +QMAKE_LINK = cp $$PWD/qtcreator $@ && : IGNORE REST + +QMAKE_CLEAN = $$IDE_APP_WRAPPER + +target.path = /bin +INSTALLS += target diff --git a/src/qworkbench.pri b/qtcreator.pri similarity index 54% rename from src/qworkbench.pri rename to qtcreator.pri index 17df81d9655ee099fbdbeb734418b6234351f74f..0166ab6c969c834c635a234030fdaab1b333cf01 100644 --- a/src/qworkbench.pri +++ b/qtcreator.pri @@ -1,4 +1,22 @@ -IDE_SOURCE_TREE = $$PWD/../ +IDE_SOURCE_TREE = $$PWD + +defineReplace(cleanPath) { + win32:1 ~= s|\\\\|/|g + contains(1, ^/.*):pfx = / + else:pfx = + segs = $$split(1, /) + out = + for(seg, segs) { + equals(seg, ..):out = $$member(out, 0, -2) + else:!equals(seg, .):out += $$seg + } + return($$join(out, /, $$pfx)) +} + +defineReplace(targetPath) { + win32:1 ~= s|/|\|g + return($$1) +} isEmpty(TEST):CONFIG(debug, debug|release) { !debug_and_release|build_pass { @@ -18,33 +36,35 @@ equals(TEST, 1) { } isEmpty(IDE_BUILD_TREE) { - error("qworkbench.pri: including file must define IDE_BUILD_TREE (probably a relative path)") + error("qtcreator.pri: including file must define IDE_BUILD_TREE (probably a relative path)") } +IDE_BUILD_TREE = $$cleanPath($$IDE_BUILD_TREE) macx { IDE_APP_TARGET = QtCreator IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/PlugIns - IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH + IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH + IDE_DATA_PATH = $$IDE_BUILD_TREE/bin/$${IDE_APP_TARGET}.app/Contents/Resources contains(QT_CONFIG, ppc):CONFIG += ppc x86 } else { - IDE_APP_WRAPPER = qtcreator - IDE_APP_TARGET = qtcreator.bin + win32 { + IDE_APP_TARGET = qtcreator + } else { + IDE_APP_WRAPPER = qtcreator + IDE_APP_TARGET = qtcreator.bin + } IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator - IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins/ + IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins + IDE_DATA_PATH = $$IDE_BUILD_TREE/share/qtcreator } IDE_APP_PATH = $$IDE_BUILD_TREE/bin -win32 { - IDE_APP_TARGET = qtcreator - IDE_LIBRARY_PATH ~= s|/+|\| - IDE_APP_PATH ~= s|/+|\| -} INCLUDEPATH += \ $$IDE_SOURCE_TREE/src/libs \ - $$IDE_SOURCE_TREE/tools \ + $$IDE_SOURCE_TREE/tools DEPENDPATH += \ $$IDE_SOURCE_TREE/src/libs \ - $$IDE_SOURCE_TREE/tools \ + $$IDE_SOURCE_TREE/tools LIBS += -L$$IDE_LIBRARY_PATH @@ -58,8 +78,8 @@ unix { debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared release:MOC_DIR = $${OUT_PWD}/.moc/release-shared - RCC_DIR = $${OUT_PWD}/.rcc/ - UI_DIR = $${OUT_PWD}/.uic/ + RCC_DIR = $${OUT_PWD}/.rcc + UI_DIR = $${OUT_PWD}/.uic } linux-g++-* { diff --git a/qtcreator.pro b/qtcreator.pro index d9d0eb46c06faf2ed743e63fd02d39ebd4becaf7..b2d042cd1ada0d41eb7fe70ff9edafac43176e3a 100644 --- a/qtcreator.pro +++ b/qtcreator.pro @@ -10,7 +10,8 @@ include(doc/doc.pri) TEMPLATE = subdirs CONFIG += ordered -SUBDIRS = src +SUBDIRS = src share +unix:!macx:!equals(_PRO_FILE_PWD_, $$OUT_PWD):SUBDIRS += bin # for Qt Creator translations QTC_BUILD_ROOT = $$PWD diff --git a/share/qtcreator/static.pro b/share/qtcreator/static.pro new file mode 100644 index 0000000000000000000000000000000000000000..bf72fc0844819e480c9ca2c1beea61a7b9a5be20 --- /dev/null +++ b/share/qtcreator/static.pro @@ -0,0 +1,74 @@ +IDE_BUILD_TREE = $$OUT_PWD/../.. + +include(../../qtcreator.pri) + +win32:i_flag = i +defineReplace(stripSrcDir) { + win32 { + !contains(1, ^.:.*):1 = $$OUT_PWD/$$1 + } else { + !contains(1, ^/.*):1 = $$OUT_PWD/$$1 + } + out = $$cleanPath($$1) + out ~= s|^$$re_escape($$PWD/)||$$i_flag + return($$out) +} + +contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1 + +TEMPLATE = app +TARGET = phony_target + +isEmpty(vcproj) { + QMAKE_LINK = : IGNORE REST + OBJECTS_DIR = + win32:CONFIG -= embed_manifest_exe +} else { + PHONY_DEPS = . + phony_src.input = PHONY_DEPS + phony_src.output = phony.c + phony_src.commands = echo int main() { return 0; } > phony.c + phony_src.CONFIG += combine + QMAKE_EXTRA_COMPILERS += phony_src +} + +DATA_DIRS = \ + snippets \ + templates \ + designer \ + schemes \ + gdbmacros + +macx|!equals(_PRO_FILE_PWD_, $$OUT_PWD) { + + for(data_dir, DATA_DIRS) { + files = $$files($$PWD/$$data_dir/*.*, true) + win32:files ~= s|\\\\|/|g + FILES += $$files + } + + copy2build.input = FILES + copy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcDir} + isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS + copy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\" + copy2build.name = COPY ${QMAKE_FILE_IN} + copy2build.CONFIG += no_link + QMAKE_EXTRA_COMPILERS += copy2build + + macx { + run_in_term.target = $$IDE_DATA_PATH/runInTerminal.command + run_in_term.depends = $$PWD/runInTerminal.command + run_in_term.commands = $$QMAKE_COPY $< $@ + QMAKE_EXTRA_TARGETS += run_in_term + PRE_TARGETDEPS += $$run_in_term.target + QMAKE_CLEAN += $$run_in_term.target + } +} + +unix:!macx { + for(data_dir, DATA_DIRS) { + eval($${data_dir}.files = $$quote($$PWD/$$data_dir)) + eval($${data_dir}.path = /share/qtcreator) + INSTALLS += $$data_dir + } +} diff --git a/share/share.pri b/share/share.pri deleted file mode 100644 index 653f2ed24215baa0cc4cee9ca9ff80567e0809af..0000000000000000000000000000000000000000 --- a/share/share.pri +++ /dev/null @@ -1,74 +0,0 @@ -macx { - SNIPPETS.path = Contents/Resources - SNIPPETS.files = $$PWD/qtcreator/snippets - TEMPLATES.path = Contents/Resources - TEMPLATES.files = $$PWD/qtcreator/templates - DESIGNER.path = Contents/Resources - DESIGNER.files = $$PWD/qtcreator/designer - SCHEMES.path = Contents/Resources - SCHEMES.files = $$PWD/qtcreator/schemes - GDBDEBUGGER.path = Contents/Resources - GDBDEBUGGER.files = $$PWD/qtcreator/gdbmacros - RUNINTERMINAL.path = Contents/Resources - RUNINTERMINAL.files = $$PWD/qtcreator/runInTerminal.command - QMAKE_BUNDLE_DATA += SNIPPETS TEMPLATES DESIGNER SCHEMES GDBDEBUGGER RUNINTERMINAL - QMAKE_INFO_PLIST = $$PWD/qtcreator/Info.plist -} else { - # make sure the resources are in place - !exists($$OUT_PWD/app.pro) { - # we are shadow build - unix:SEPARATOR = ; - win32:SEPARATOR = & - COPYSRC = snippets \ - templates \ - designer \ - schemes \ - gdbmacros - COPYDEST = $${OUT_PWD}/../../share/qtcreator - win32:COPYDEST ~= s|/+|\| - QMAKE_POST_LINK += $${QMAKE_MKDIR} $$COPYDEST $$SEPARATOR - for(tmp,COPYSRC) { - REALSRC = $$PWD/qtcreator/$$tmp - REALDEST = $$COPYDEST/$$tmp - win32:REALSRC ~= s|/+|\| - win32:REALDEST ~= s|/+|\| - QMAKE_POST_LINK += $${QMAKE_COPY_DIR} $${REALSRC} $${REALDEST} $$SEPARATOR - } - } -} - -linux-* { - keymaps.files += $$PWD/qtcreator/schemes/MS_Visual_C++.kms - keymaps.files += $$PWD/qtcreator/schemes/Xcode.kms - keymaps.path = /share/qtcreator/schemes - - gdbsupport.files += $$PWD/qtcreator/gdbmacros/LICENSE.LGPL - gdbsupport.files += $$PWD/qtcreator/gdbmacros/LGPL_EXCEPTION.TXT - gdbsupport.files += $$PWD/qtcreator/gdbmacros/gdbmacros.cpp - gdbsupport.files += $$PWD/qtcreator/gdbmacros/gdbmacros.pro - gdbsupport.path = /share/qtcreator/gdbmacros - - designertemplates.files += $$PWD/qtcreator/designer/templates.xml - designertemplates.files += $$PWD/qtcreator/designer/templates/* - designertemplates.path = /share/qtcreator/designer/templates - - snippets.files += $$PWD/qtcreator/snippets/*.snp - snippets.path = /share/qtcreator/snippets - - projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget_form.h - projecttemplates.files += $$PWD/qtcreator/templates/qt4project/main.cpp - projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget.cpp - projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget.h - projecttemplates.files += $$PWD/qtcreator/templates/qt4project/widget.ui - projecttemplates.files += $$PWD/qtcreator/templates/qt4project/mywidget_form.cpp - projecttemplates.path = /share/qtcreator/templates/qt4project - - INSTALLS += \ - keymaps \ - gdbsupport \ - designertemplates \ - snippets \ - projecttemplates - -} - diff --git a/share/share.pro b/share/share.pro new file mode 100644 index 0000000000000000000000000000000000000000..a997a8183fa1ed706227885e6cc5939aecca059c --- /dev/null +++ b/share/share.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = qtcreator/static.pro diff --git a/share/qtcreator/Info.plist b/src/app/Info.plist similarity index 100% rename from share/qtcreator/Info.plist rename to src/app/Info.plist diff --git a/src/app/app.pro b/src/app/app.pro index 0894b2a7261e8b1c5e579e8722e687a4fde928c4..31864cc8b7fdf90844a54d3f2271f7838fed676a 100644 --- a/src/app/app.pro +++ b/src/app/app.pro @@ -1,6 +1,6 @@ -IDE_BUILD_TREE = $$OUT_PWD/../../ +IDE_BUILD_TREE = $$OUT_PWD/../.. -include(../qworkbench.pri) +include(../../qtcreator.pri) include(../shared/qtsingleapplication/qtsingleapplication.pri) TEMPLATE = app @@ -18,6 +18,7 @@ win32 { macx { ICON = qtcreator.icns + QMAKE_INFO_PLIST = Info.plist } macx { @@ -31,25 +32,6 @@ win32 { unix:!macx { LIBS *= -lExtensionSystem -lAggregation - # make sure the wrapper is in place - !exists($$OUT_PWD/app.pro) { - # we are shadow build - COPYSRC = $$PWD/$$DESTDIR/$$IDE_APP_WRAPPER - COPYDEST = $$OUT_PWD/$$DESTDIR/$$IDE_APP_WRAPPER - win32:COPYSRC ~= s|/+|\| - win32:COPYDEST ~= s|/+|\| - unix:SEPARATOR = ; - win32:SEPARATOR = & - QMAKE_POST_LINK += $${QMAKE_COPY_FILE} $${COPYSRC} $${COPYDEST} $$SEPARATOR - } - - wrapper.files = $$OUT_PWD/$$DESTDIR/$$IDE_APP_WRAPPER - wrapper.path = /bin - target.path = /bin - - INSTALLS += target wrapper - + INSTALLS += target } - -include(../../share/share.pri) diff --git a/src/libs/utils/process_stub.pro b/src/libs/utils/process_stub.pro index 996aecea91a5a7af32951c3de2047b18aece07f0..8057f49b4152961fc803ffe539d7db15579c522b 100644 --- a/src/libs/utils/process_stub.pro +++ b/src/libs/utils/process_stub.pro @@ -1,5 +1,5 @@ -IDE_BUILD_TREE=../../../ -include(../../qworkbench.pri) +IDE_BUILD_TREE=../../.. +include(../../../qtcreator.pri) TEMPLATE = app TARGET = qtcreator_process_stub diff --git a/src/qworkbenchlibrary.pri b/src/qworkbenchlibrary.pri index 7a04fe45558581ed98d492f36173844ae3175287..7d260b6a4a701d1023d42c4293eca84b026e1f64 100644 --- a/src/qworkbenchlibrary.pri +++ b/src/qworkbenchlibrary.pri @@ -1,5 +1,5 @@ -IDE_BUILD_TREE = $$OUT_PWD/../../../ -include(qworkbench.pri) +IDE_BUILD_TREE = $$OUT_PWD/../../.. +include(../qtcreator.pri) win32 { DLLDESTDIR = $$IDE_APP_PATH diff --git a/src/qworkbenchplugin.pri b/src/qworkbenchplugin.pri index d7c9a64b68b181b03bf2ea058e0812fb41d7ac1f..a6143a9c77b1a485451e63e21875e45436fd1c6f 100644 --- a/src/qworkbenchplugin.pri +++ b/src/qworkbenchplugin.pri @@ -1,13 +1,13 @@ isEmpty(IDE_BUILD_TREE) { - IDE_BUILD_TREE = $$OUT_PWD/../../../ + IDE_BUILD_TREE = $$OUT_PWD/../../.. } -include(qworkbench.pri) +include(../qtcreator.pri) isEmpty(PROVIDER) { PROVIDER = Nokia } -DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER/ +DESTDIR = $$IDE_PLUGIN_PATH/$$PROVIDER LIBS += -L$$DESTDIR INCLUDEPATH += $$IDE_SOURCE_TREE/src/plugins DEPENDPATH += $$IDE_SOURCE_TREE/src/plugins diff --git a/src/tools/qdebugger/qdebugger.pro b/src/tools/qdebugger/qdebugger.pro index a4ff3e3bf939f792f00ea07912a1f5ff1716c218..0b28902f2ce478df33ebd555aa360282a71a7e02 100644 --- a/src/tools/qdebugger/qdebugger.pro +++ b/src/tools/qdebugger/qdebugger.pro @@ -1,5 +1,5 @@ -QTCREATOR = ../../plugins/ +QTCREATOR = ../../plugins TARGET = ../../../bin/qdebugger @@ -115,9 +115,9 @@ SOURCES += \ unix { - OBJECTS_DIR = .tmp/ - MOC_DIR = .tmp/ - RCC_DIR = .tmp/ - UI_DIR = .tmp/ + OBJECTS_DIR = .tmp + MOC_DIR = .tmp + RCC_DIR = .tmp + UI_DIR = .tmp } diff --git a/src/tools/qtlibspatcher/qtlibspatcher.pro b/src/tools/qtlibspatcher/qtlibspatcher.pro index fb0b51c9c9ee893e9e760f0f2cf1569122850524..453c4fc7df9522ecc392023f9ff4ae387a01f5c9 100644 --- a/src/tools/qtlibspatcher/qtlibspatcher.pro +++ b/src/tools/qtlibspatcher/qtlibspatcher.pro @@ -8,7 +8,7 @@ TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . -DESTDIR = ./ +DESTDIR = . # Input HEADERS += binpatch.h diff --git a/src/tools/texteditor/texteditor.pro b/src/tools/texteditor/texteditor.pro index fd4db878264dc12d810d17819cb6d089faad3cec..9e118dba4e2445a5350f278ba18f3a1fcf5fe967 100644 --- a/src/tools/texteditor/texteditor.pro +++ b/src/tools/texteditor/texteditor.pro @@ -1,5 +1,5 @@ -QTCREATOR = ../../plugins/ +QTCREATOR = ../../plugins TARGET = ../../../bin/texteditor @@ -39,8 +39,8 @@ SOURCES += \ # $${QTCREATOR}/gdbdebugger/gdbdebugger.qrc unix { - OBJECTS_DIR = .tmp/ - MOC_DIR = .tmp/ - RCC_DIR = .tmp/ - UI_DIR = .tmp/ + OBJECTS_DIR = .tmp + MOC_DIR = .tmp + RCC_DIR = .tmp + UI_DIR = .tmp }