From ab5d69968cc3bfec8df621ee7d6d5e3a3ed48278 Mon Sep 17 00:00:00 2001 From: Max Risuhin Date: Wed, 5 Sep 2018 11:54:11 +0300 Subject: [PATCH] Set config env file path based on build type. Signed-off-by: Max Risuhin --- ci/desktop.groovy | 4 +++- deployment/{linux/.env => env} | 1 + desktop/CMakeLists.txt | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) rename deployment/{linux/.env => env} (97%) diff --git a/ci/desktop.groovy b/ci/desktop.groovy index 2c13ee4550..fb5a5b7853 100644 --- a/ci/desktop.groovy +++ b/ci/desktop.groovy @@ -114,7 +114,7 @@ def bundleLinux(type = 'nightly') { sh 'mkdir AppDir' } sh "cp -r ./deployment/linux/usr ${packageFolder}/AppDir" - sh "cp ./deployment/linux/.env ${packageFolder}/AppDir" + sh "cp ./deployment/env ${packageFolder}/AppDir/usr/bin" sh "cp ./desktop/bin/StatusIm ${packageFolder}/AppDir/usr/bin" sh "cp ./desktop/reportApp/reportApp ${packageFolder}/AppDir/usr/bin" sh 'wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage' @@ -187,6 +187,8 @@ def bundleMacOS(type = 'nightly') { sh 'chmod +x Status.app/Contents/Resources/ubuntu-server' sh 'cp ../desktop/bin/StatusIm Status.app/Contents/MacOS/Status' sh 'cp ../desktop/reportApp/reportApp Status.app/Contents/MacOS' + sh "cp ../deployment/env Status.app/Contents/Resources" + sh 'ln -sf ../Resources/env Status.app/Contents/MacOS/env' sh 'cp -f ../deployment/macos/qt-reportApp.conf Status.app/Contents/Resources' sh 'ln -sf ../Resources/qt-reportApp.conf Status.app/Contents/MacOS/qt.conf' sh 'install_name_tool -add_rpath "@executable_path/../Frameworks" ' + diff --git a/deployment/linux/.env b/deployment/env similarity index 97% rename from deployment/linux/.env rename to deployment/env index 8ecc7624a0..967cba460c 100644 --- a/deployment/linux/.env +++ b/deployment/env @@ -6,6 +6,7 @@ OFFLINE_INBOX_ENABLED=1 OFFLINE_INBOX_MANY_ENABLED=1 LOG_LEVEL=debug LOG_LEVEL_STATUS_GO=info +FLEET=eth.beta JSC_ENABLED=1 QUEUE_MESSAGE_ENABLED=1 MANY_WHISPER_TOPICS_ENABLED=0 diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index be248fe87d..5e09861b93 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -15,6 +15,13 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9") message(STATUS "EXTERNAL_MODULES_DIR: ${EXTERNAL_MODULES_DIR}") +string(REGEX MATCH "BUILD_FOR_BUNDLE" BUILD_FOR_BUNDLE "${CMAKE_CXX_FLAGS}") +if(${BUILD_FOR_BUNDLE} MATCHES "BUILD_FOR_BUNDLE") + set(ENVFILE "/env") +else() + set(ENVFILE "/../../.env") +endif() + foreach(external_module ${EXTERNAL_MODULES_DIR}) message(STATUS "external_module: ${external_module}") add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../${external_module} ${CMAKE_CURRENT_BINARY_DIR}/${external_module})