From 95af06720b536e0fc86fe4c0fa2a6206713081bd Mon Sep 17 00:00:00 2001 From: Lorenz Esch Date: Mon, 26 Oct 2020 18:06:18 -0400 Subject: [PATCH] MAINT: Add withAppBundles flag --- .../mne_analyze/mne_analyze/mne_analyze.pro | 5 +++- applications/mne_anonymize/mne_anonymize.pro | 5 ++-- .../mne_dipole_fit/mne_dipole_fit.pro | 5 +++- .../mne_forward_solution.pro | 5 +++- .../mne_rt_server/mne_rt_server.pro | 5 +++- applications/mne_scan/mne_scan/mne_scan.pro | 5 +++- mne-cpp.pri | 24 +------------------ 7 files changed, 23 insertions(+), 31 deletions(-) diff --git a/applications/mne_analyze/mne_analyze/mne_analyze.pro b/applications/mne_analyze/mne_analyze/mne_analyze.pro index 48e4b8108dc..0d53dced66f 100644 --- a/applications/mne_analyze/mne_analyze/mne_analyze.pro +++ b/applications/mne_analyze/mne_analyze/mne_analyze.pro @@ -53,7 +53,10 @@ CONFIG(debug, debug|release) { } CONFIG += console -CONFIG -= app_bundle + +!contains(MNECPP_CONFIG, withAppBundles) { + CONFIG -= app_bundle +} contains(MNECPP_CONFIG, wasm) { # QMAKE_LFLAGS += -s ERROR_ON_UNDEFINED_SYMBOLS=1 diff --git a/applications/mne_anonymize/mne_anonymize.pro b/applications/mne_anonymize/mne_anonymize.pro index 11274ea529c..4138f1ef22a 100644 --- a/applications/mne_anonymize/mne_anonymize.pro +++ b/applications/mne_anonymize/mne_anonymize.pro @@ -51,9 +51,8 @@ CONFIG(debug,debug|release) { } } -contains(MNECPP_CONFIG, static) { - CONFIG += static - DEFINES += STATICBUILD +!contains(MNECPP_CONFIG, withAppBundles) { + CONFIG -= app_bundle } contains(MNECPP_CONFIG, wasm) { diff --git a/applications/mne_dipole_fit/mne_dipole_fit.pro b/applications/mne_dipole_fit/mne_dipole_fit.pro index f9634971ec0..dfaae5d6c37 100644 --- a/applications/mne_dipole_fit/mne_dipole_fit.pro +++ b/applications/mne_dipole_fit/mne_dipole_fit.pro @@ -42,7 +42,10 @@ TEMPLATE = app QT += widgets 3dextras network charts opengl CONFIG += console -CONFIG -= app_bundle + +!contains(MNECPP_CONFIG, withAppBundles) { + CONFIG -= app_bundle +} contains(MNECPP_CONFIG, static) { CONFIG += static diff --git a/applications/mne_forward_solution/mne_forward_solution.pro b/applications/mne_forward_solution/mne_forward_solution.pro index 1358e3177c0..5096974ef3f 100644 --- a/applications/mne_forward_solution/mne_forward_solution.pro +++ b/applications/mne_forward_solution/mne_forward_solution.pro @@ -42,7 +42,10 @@ TEMPLATE = app QT += widgets network concurrent CONFIG += console -CONFIG -= app_bundle + +!contains(MNECPP_CONFIG, withAppBundles) { + CONFIG -= app_bundle +} contains(MNECPP_CONFIG, static) { CONFIG += static diff --git a/applications/mne_rt_server/mne_rt_server/mne_rt_server.pro b/applications/mne_rt_server/mne_rt_server/mne_rt_server.pro index 9af93d8a326..f8caac44982 100644 --- a/applications/mne_rt_server/mne_rt_server/mne_rt_server.pro +++ b/applications/mne_rt_server/mne_rt_server/mne_rt_server.pro @@ -44,7 +44,10 @@ QT += network concurrent QT -= gui CONFIG += console -CONFIG -= app_bundle + +!contains(MNECPP_CONFIG, withAppBundles) { + CONFIG -= app_bundle +} TARGET = mne_rt_server CONFIG(debug, debug|release) { diff --git a/applications/mne_scan/mne_scan/mne_scan.pro b/applications/mne_scan/mne_scan/mne_scan.pro index 1de465be5eb..49a12ba8901 100755 --- a/applications/mne_scan/mne_scan/mne_scan.pro +++ b/applications/mne_scan/mne_scan/mne_scan.pro @@ -42,7 +42,10 @@ TEMPLATE = app QT += network core widgets xml svg charts concurrent opengl 3dextras CONFIG += console -#CONFIG -= app_bundle + +!contains(MNECPP_CONFIG, withAppBundles) { + CONFIG -= app_bundle +} TARGET = mne_scan CONFIG(debug, debug|release) { diff --git a/mne-cpp.pri b/mne-cpp.pri index 87fc147bf11..dbd6288f6e1 100644 --- a/mne-cpp.pri +++ b/mne-cpp.pri @@ -23,29 +23,6 @@ defineTest(minQtVersion) { return(false) } -defineReplace(macDeployArgs) { - target = $$1 - target_ext = $$2 - mne_binary_dir = $$3 - mne_library_dir = $$4 - extra_args = $$5 - - isEmpty(target_ext) { - target_ext = .app - } - - # Deploy qt dependencies - deploy_cmd = macdeployqt - - deploy_target = $$shell_quote($$shell_path($${mne_binary_dir}/$${target}$${target_ext})) - - deploy_libs_to_copy = -libpath=$${mne_library_dir} - !isEmpty(extra_args) { - deploy_libs_to_copy += $${extra_args} - } - return($$deploy_cmd $$deploy_target $$deploy_libs_to_copy) -} - defineReplace(winDeployLibArgs) { # Copy library to bin folder target = $$1 @@ -122,6 +99,7 @@ QMAKE_TARGET_COPYRIGHT = Copyright (C) 2020 Authors of MNE-CPP. All rights reser ## To build MNE Scan with EegoSports support: qmake MNECPP_CONFIG+=withEego ## To build MNE Scan with GUSBAmp support: qmake MNECPP_CONFIG+=withGUSBAmp ## To build MNE Scan with TMSI support: qmake MNECPP_CONFIG+=withTmsi +## To build app bundles on MacOS: qmake MNECPP_CONFIG+=withAppBundles # Default flags MNECPP_CONFIG +=