diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 9030666609..2c1cb9f8c4 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -185,7 +185,7 @@ if (BUILD_TOOLS AND NPM_EXECUTABLE) add_dependencies(resources jsdoc) endif() -add_dependencies(${TARGET_NAME} resources) +add_dependencies(${TARGET_NAME} resources screenshare) if (WIN32) # These are external plugins, but we need to do the 'add dependency' here so that their @@ -323,6 +323,10 @@ if (APPLE) COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_SOURCE_DIR}/scripts" "${RESOURCES_DEV_DIR}/scripts" + + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${CMAKE_CURRENT_BINARY_DIR}/../screenshare/hifi-screenshare-darwin-x64/hifi-screenshare.app" + "${RESOURCES_DEV_DIR}/hifi-screenshare.app" # copy JSDoc files beside the executable COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_SOURCE_DIR}/tools/jsdoc/out" @@ -347,7 +351,7 @@ if (APPLE) COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${PROJECT_SOURCE_DIR}/resources/serverless/redirect.json" "${RESOURCES_DEV_DIR}/serverless/redirect.json" - ) + ) # call the fixup_interface macro to add required bundling commands for installation fixup_interface() diff --git a/interface/src/scripting/ScreenshareScriptingInterface.h b/interface/src/scripting/ScreenshareScriptingInterface.h index a191be9274..0011c3faa7 100644 --- a/interface/src/scripting/ScreenshareScriptingInterface.h +++ b/interface/src/scripting/ScreenshareScriptingInterface.h @@ -44,10 +44,9 @@ private slots: private: #if DEV_BUILD #ifdef Q_OS_WIN - const QString SCREENSHARE_EXE_PATH{ PathUtils::resourcesPath() + "hifi-screenshare-win32-x64/hifi-screenshare.exe" }; - //const QString SCREENSHARE_EXE_PATH{ PathUtils::projectRootPath() + "/screenshare/hifi-screenshare-win32-x64/hifi-screenshare.exe" }; + const QString SCREENSHARE_EXE_PATH{ PathUtils::projectRootPath() + "/screenshare/hifi-screenshare-win32-x64/hifi-screenshare.exe" }; #elif defined(Q_OS_MAC) - const QString SCREENSHARE_EXE_PATH{ PathUtils::projectRootPath() + "/build/screenshare/hifi-screenshare-darwin-x64/hifi-screenshare.app" }; + const QString SCREENSHARE_EXE_PATH{ PathUtils::resourcesPath() + "hifi-screenshare.app" }; #else // This path won't exist on other platforms, so the Screenshare Scripting Interface will exit early when invoked. const QString SCREENSHARE_EXE_PATH{ PathUtils::projectRootPath() + "/screenshare/hifi-screenshare-other-os/hifi-screenshare" }; @@ -56,7 +55,7 @@ private: #ifdef Q_OS_WIN const QString SCREENSHARE_EXE_PATH{ QCoreApplication::applicationDirPath() + "/hifi-screenshare/hifi-screenshare.exe" }; #elif defined(Q_OS_MAC) - const QString SCREENSHARE_EXE_PATH{ QCoreApplication::applicationDirPath() + "/hifi-screenshare/hifi-screenshare.app" }; + const QString SCREENSHARE_EXE_PATH{ PathUtils::resourcesPath() + "hifi-screenshare.app" f}; #else // This path won't exist on other platforms, so the Screenshare Scripting Interface will exit early when invoked. const QString SCREENSHARE_EXE_PATH{ QCoreApplication::applicationDirPath() + "/hifi-screenshare/hifi-screenshare" };