From 07e74952ecd6792e429a83826d8df65b996a2d47 Mon Sep 17 00:00:00 2001 From: RigoLigo Date: Sat, 28 May 2022 20:43:07 +0800 Subject: [PATCH] Add required executables into main app bundle --- RedPandaIDE/RedPandaIDE.pro | 15 +++++++++++++++ Red_Panda_CPP.pro | 10 +++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index d0e9006f..cf45795c 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -430,6 +430,7 @@ unix: { settingsdialog/formatterpathwidget.ui \ settingsdialog/environmentprogramswidget.ui } + linux: { LIBS+= \ -lrt @@ -500,3 +501,17 @@ RESOURCES += qmake_qm_files RESOURCES += iconsets_files RESOURCES += theme_files RESOURCES += colorscheme_files + +macos: { + message($$OUT_PWD/astyle/astyle) + + # Add needed executables into the main app bundle + bundled_executable.files = \ + $$OUT_PWD/../astyle/astyle \ + $$OUT_PWD/../consolepauser/consolepauser \ + $$OUT_PWD/../redpanda-git-askpass/redpanda-git-askpass.app/Contents/MacOS/redpanda-git-askpass + + bundled_executable.path = Contents/MacOS + + QMAKE_BUNDLE_DATA += bundled_executable +} diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index 042d4353..5da886ab 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -5,14 +5,20 @@ SUBDIRS += \ astyle \ consolepauser +# Add the dependencies so that the RedPandaIDE project can add the depended programs +# into the main app bundle +RedPandaIDE.depends = astyle consolepauser + win32: { SUBDIRS += \ redpanda-win-git-askpass + RedPandaIDE.depends += redpanda-win-git-askpass } -macos,linux: { +unix: { SUBDIRS += \ redpanda-git-askpass + RedPandaIDE.depends += redpanda-git-askpass } APP_NAME = RedPandaCPP @@ -20,7 +26,6 @@ APP_NAME = RedPandaCPP APP_VERSION = 1.0.8 linux: { - isEmpty(PREFIX) { PREFIX = /usr/local } @@ -44,7 +49,6 @@ linux: { desktop.path = $${PREFIX}/share/applications desktop.files += linux/redpandaide.desktop INSTALLS += desktop - } win32: {