From 047264b9920d293b64784c8b41047b139e0d908a Mon Sep 17 00:00:00 2001 From: pgScorpio Date: Fri, 8 Apr 2022 14:26:04 +0200 Subject: [PATCH 1/7] Place build generated files in separate folders Let's keep the root folder clean after a build... Place moc and ui files in ./src/Generated and object files in ./obj --- Jamulus.pro | 11 ++++++++++- src/util.cpp | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Jamulus.pro b/Jamulus.pro index a6d8dbc05c..b3e6cd6dbc 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -41,6 +41,8 @@ contains(CONFIG, "headless") { QT += widgets } +QMAKE_UIC_FLAGS += -o src/Generated/$@ + LRELEASE_DIR = src/res/translation TRANSLATIONS = src/res/translation/translation_de_DE.ts \ src/res/translation/translation_fr_FR.ts \ @@ -54,7 +56,14 @@ TRANSLATIONS = src/res/translation/translation_de_DE.ts \ src/res/translation/translation_sv_SE.ts \ src/res/translation/translation_zh_CN.ts -INCLUDEPATH += src +OBJECTS_DIR = obj + +MOC_DIR = src/Generated + +UI_DIR = src/Generated + +INCLUDEPATH += src/Generated \ + src INCLUDEPATH_OPUS = libs/opus/include \ libs/opus/celt \ diff --git a/src/util.cpp b/src/util.cpp index d2f7d6f78b..820c758de8 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -495,6 +495,7 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : CBaseDlg ( parent ) "

RobyDati (RobyDati)

" "

Rob-NY (Rob-NY)

" "

Thai Pangsakulyanont (dtinth)

" + "

Peter Goderie (pgScorpio)

" "
" + tr ( "For details on the contributions check out the %1" ) .arg ( "" + tr ( "Github Contributors list" ) + "." ) ); From 23b65edb5e01be09afb78e276d267fe6f596a2f6 Mon Sep 17 00:00:00 2001 From: pgScorpio Date: Fri, 8 Apr 2022 15:21:49 +0200 Subject: [PATCH 2/7] Bugfix QMAKE_UIC_FLAGS is not neccesary when setting MOC_DIR --- Jamulus.pro | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index b3e6cd6dbc..29ad35c5e8 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -41,8 +41,6 @@ contains(CONFIG, "headless") { QT += widgets } -QMAKE_UIC_FLAGS += -o src/Generated/$@ - LRELEASE_DIR = src/res/translation TRANSLATIONS = src/res/translation/translation_de_DE.ts \ src/res/translation/translation_fr_FR.ts \ From 4b14dcc9090e2ba39977f363dbf2c81447c23b11 Mon Sep 17 00:00:00 2001 From: pgScorpio Date: Fri, 8 Apr 2022 15:43:07 +0200 Subject: [PATCH 3/7] Add src/Generated and obj folders to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 22de5eeaf1..5c4a2b89c5 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,5 @@ Jamulus.xcodeproj jamulus_plugin_import.cpp autoLatestChangelog.md debian/ +src/Generated/ +obj/ From 8191032bdea78b5170209f43efcf6b218a672ee0 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Wed, 6 Apr 2022 13:49:13 +0200 Subject: [PATCH 4/7] Autobuild: Drop redundant github.workspace variable reference in workflow --- .github/workflows/autobuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 21a5bcba2d..4024a49971 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -88,7 +88,7 @@ jobs: with: tag_name: ${{ steps.get-build-vars.outputs.RELEASE_TAG }} release_name: ${{ steps.get-build-vars.outputs.RELEASE_TITLE }} - body_path: ${{ github.workspace }}/autoLatestChangelog.md + body_path: autoLatestChangelog.md prerelease: ${{ steps.get-build-vars.outputs.IS_PRERELEASE }} draft: false From d4619d5bf7767ab89fb6708a63b7273448b4f0ea Mon Sep 17 00:00:00 2001 From: Jonathan <4561747+gilgongo@users.noreply.github.com> Date: Mon, 11 Apr 2022 22:17:00 +0100 Subject: [PATCH 5/7] Add Steinberg rights statements --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1233d97bdb..13376ab3bd 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ to thank the maintainers of these projects for making their efforts available to [ccrma.stanford.edu/software/stk/](https://ccrma.stanford.edu/software/stk/) * Some pixmaps are from the Open Clip Art Library (OCAL): [openclipart.com](https://openclipart.org/) * Country flag icons from Mark James: [famfamfam.com](http://www.famfamfam.com) +* ASIO is a trademark and software of Steinberg Media Technologies GmbH We would also like to acknowledge the contributors listed in the From 3b75aadacb2d99cb342c74b625887d36c4c3141f Mon Sep 17 00:00:00 2001 From: pgScorpio Date: Fri, 15 Apr 2022 17:57:11 +0200 Subject: [PATCH 6/7] Fix for Android This solution should work for android builds too --- Jamulus.pro | 89 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 8 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index 29ad35c5e8..3825cc49ed 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -41,7 +41,59 @@ contains(CONFIG, "headless") { QT += widgets } -LRELEASE_DIR = src/res/translation +isEmpty(BUILD_DIR) BUILD_DIR = build + +# BUILD_DIR_BASE: base for BUID_DIR subfolders to prevent accessing root if BUILD_DIR is not set. +isEmpty(BUILD_DIR) { + BUILD_DIR_BASE= +} else { + BUILD_DIR_BASE= $$BUILD_DIR/ +} + +# DR_SUBDIR: subdir in BUILD_DIR for debug_and_release builds +debug_and_release { + # debug/release build subfolders + CONFIG(debug, debug|release) { + DR_SUBDIR = debug/ + } else { + DR_SUBDIR = release/ + } +} else { + unset(DR_SUBDIR) +} + +android { + # android is an exeption because it is a multi-target built + + # QT_ARCH: Another undocumented variable that is set during make. + # This one is needed for the multi-target android build + # use '$$QT_ARCH' (in single quotes!) to use the achitecture name in the created make file. + + + DESTDIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}lib # libJamulus_.so files are put here + UI_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}ui # ui_*.h files are put here + MOC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}moc/'$$QT_ARCH' # moc_*.cpp files must be in ABI subdirs ! + RCC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}rcc/'$$QT_ARCH' # qrc_*.cpp files must be in ABI subdirs ! + OBJECTS_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}obj/'$$QT_ARCH' # OBJ files must be in ABI subdirs ! + LRELEASE_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}translation # This folder will automatically have ABI subdirs generated by lrelease ! + QM_DIR = $$LRELEASE_DIR/'$$QT_ARCH'/ # So for android builds we have to pass expanding of (the undocumented) $$QT_ARCH to the makefile creation by single quoting it + +} else { + + DESTDIR = $${BUILD_DIR_BASE}$${DR_SUBDIR} + UI_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}ui + MOC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}moc + RCC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}rcc + OBJECTS_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}obj + LRELEASE_DIR = $${BUILD_DIR_BASE}translation # This folder will automatically have debug/release subdirs generated by lrelease on debug_and_release builds ! + QM_DIR = $${LRELEASE_DIR}/$${DR_SUBDIR} # so the qm files will be located here + +} + +# PRECOMPILED_DIR: An undocumented variable that must be set to an existing build folder +# to prevent creation of unused build folders for precompiled headers we don't have +PRECOMPILED_DIR = $$BUILD_DIR + TRANSLATIONS = src/res/translation/translation_de_DE.ts \ src/res/translation/translation_fr_FR.ts \ src/res/translation/translation_pt_PT.ts \ @@ -54,14 +106,35 @@ TRANSLATIONS = src/res/translation/translation_de_DE.ts \ src/res/translation/translation_sv_SE.ts \ src/res/translation/translation_zh_CN.ts -OBJECTS_DIR = obj - -MOC_DIR = src/Generated - -UI_DIR = src/Generated +!isEmpty(QM_DIR) { + DISTFILES += \ + $${QM_DIR}translation_de_DE.qm \ + $${QM_DIR}translation_fr_FR.qm \ + $${QM_DIR}translation_pt_PT.qm \ + $${QM_DIR}translation_pt_BR.qm \ + $${QM_DIR}translation_es_ES.qm \ + $${QM_DIR}translation_nl_NL.qm \ + $${QM_DIR}translation_pl_PL.qm \ + $${QM_DIR}translation_it_IT.qm \ + $${QM_DIR}translation_sv_SE.qm \ + $${QM_DIR}translation_sk_SK.qm \ + $${QM_DIR}translation_zh_CN.qm + + android { + # add QMAKE_CLEAN to the .Target makefiles ! + build_pass:QMAKE_CLEAN += $${QM_DIR}*.qm + } else { + debug_and_release { + # add QMAKE_CLEAN to the .Debug/.Release makefiles ! + build_pass:QMAKE_CLEAN += $${QM_DIR}*.qm + } else { + # add QMAKE_CLEAN to the Makefile + !build_pass:QMAKE_CLEAN += $${QM_DIR}*.qm + } + } +} -INCLUDEPATH += src/Generated \ - src +INCLUDEPATH += src INCLUDEPATH_OPUS = libs/opus/include \ libs/opus/celt \ From 54a249a5f8fa00de4fd2afb16d8d809f4f0a7435 Mon Sep 17 00:00:00 2001 From: pgScorpio Date: Fri, 15 Apr 2022 19:01:08 +0200 Subject: [PATCH 7/7] Fix deploy_windows build (I knew it. But trying to take too small steps I forgot about it...) --- Jamulus.pro | 82 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 30 deletions(-) diff --git a/Jamulus.pro b/Jamulus.pro index 3825cc49ed..2e5af8220e 100644 --- a/Jamulus.pro +++ b/Jamulus.pro @@ -41,16 +41,34 @@ contains(CONFIG, "headless") { QT += widgets } -isEmpty(BUILD_DIR) BUILD_DIR = build +######################################### +# Automatic build (sub)folder assignment: +######################################### -# BUILD_DIR_BASE: base for BUID_DIR subfolders to prevent accessing root if BUILD_DIR is not set. -isEmpty(BUILD_DIR) { - BUILD_DIR_BASE= -} else { - BUILD_DIR_BASE= $$BUILD_DIR/ +equals(OUT_PWD, $$_PRO_FILE_PWD_) { + # default enable Automatic build (sub)folder assignment if the generated makefile + # is in the same folder as the Jamulus.pro file (normal qmake run) + # unless specifically requested not to + + !no_auto_builddir:CONFIG *= auto_builddir + !no_auto_buildsubdirs:CONFIG *= auto_buildsubdirs +} + + +auto_builddir { + isEmpty(BUILD_DIR) BUILD_DIR = build + + # separate subdir for visual studio builds + equals(TEMPLATE, "vcapp") BUILD_DIR = $${BUILD_DIR}/vs + + # BUILD_DIR_BASE: base for BUID_DIR subfolders to prevent accessing root if BUILD_DIR is not set. + isEmpty(BUILD_DIR) { + BUILD_DIR_BASE= + } else { + BUILD_DIR_BASE= $$BUILD_DIR/ + } } -# DR_SUBDIR: subdir in BUILD_DIR for debug_and_release builds debug_and_release { # debug/release build subfolders CONFIG(debug, debug|release) { @@ -62,37 +80,41 @@ debug_and_release { unset(DR_SUBDIR) } -android { - # android is an exeption because it is a multi-target built +auto_buildsubdirs { + android { + # android is an exeption because it is a multi-target built - # QT_ARCH: Another undocumented variable that is set during make. - # This one is needed for the multi-target android build - # use '$$QT_ARCH' (in single quotes!) to use the achitecture name in the created make file. + # QT_ARCH: Another undocumented variable that is set during make. + # This one is needed for the multi-target android build + # use '$$QT_ARCH' (in single quotes!) to use the achitecture name in the created make file. - DESTDIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}lib # libJamulus_.so files are put here - UI_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}ui # ui_*.h files are put here - MOC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}moc/'$$QT_ARCH' # moc_*.cpp files must be in ABI subdirs ! - RCC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}rcc/'$$QT_ARCH' # qrc_*.cpp files must be in ABI subdirs ! - OBJECTS_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}obj/'$$QT_ARCH' # OBJ files must be in ABI subdirs ! - LRELEASE_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}translation # This folder will automatically have ABI subdirs generated by lrelease ! - QM_DIR = $$LRELEASE_DIR/'$$QT_ARCH'/ # So for android builds we have to pass expanding of (the undocumented) $$QT_ARCH to the makefile creation by single quoting it + DESTDIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}lib # libJamulus_.so files are put here + UI_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}ui # ui_*.h files are put here + MOC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}moc/'$$QT_ARCH' # moc_*.cpp files must be in ABI subdirs ! + RCC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}rcc/'$$QT_ARCH' # qrc_*.cpp files must be in ABI subdirs ! + OBJECTS_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}obj/'$$QT_ARCH' # OBJ files must be in ABI subdirs ! + LRELEASE_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}translation # This folder will automatically have ABI subdirs generated by lrelease ! + QM_DIR = $$LRELEASE_DIR/'$$QT_ARCH'/ # So for android builds we have to pass expanding of (the undocumented) $$QT_ARCH to the makefile creation by single quoting it -} else { + } else { - DESTDIR = $${BUILD_DIR_BASE}$${DR_SUBDIR} - UI_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}ui - MOC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}moc - RCC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}rcc - OBJECTS_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}obj - LRELEASE_DIR = $${BUILD_DIR_BASE}translation # This folder will automatically have debug/release subdirs generated by lrelease on debug_and_release builds ! - QM_DIR = $${LRELEASE_DIR}/$${DR_SUBDIR} # so the qm files will be located here + DESTDIR = $${BUILD_DIR_BASE}$${DR_SUBDIR} + UI_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}ui + MOC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}moc + RCC_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}rcc + OBJECTS_DIR = $${BUILD_DIR_BASE}$${DR_SUBDIR}obj + LRELEASE_DIR = $${BUILD_DIR_BASE}translation # This folder will automatically have debug/release subdirs generated by lrelease on debug_and_release builds ! + QM_DIR = $${LRELEASE_DIR}/$${DR_SUBDIR} # so the qm files will be located here + } + # PRECOMPILED_DIR: An undocumented variable that must be set to an existing build folder + # to prevent creation of unused build folders for precompiled headers we don't have + PRECOMPILED_DIR = $$BUILD_DIR +} else { + QM_DIR = $$OUT_PWD/$$DR_SUBDIR } -# PRECOMPILED_DIR: An undocumented variable that must be set to an existing build folder -# to prevent creation of unused build folders for precompiled headers we don't have -PRECOMPILED_DIR = $$BUILD_DIR TRANSLATIONS = src/res/translation/translation_de_DE.ts \ src/res/translation/translation_fr_FR.ts \