Merge pull request #1162 from ctrlaltdavid/fix/osx-dmgs

Revise OSX DMGs
This commit is contained in:
Kalila 2021-04-19 17:01:05 -04:00 committed by GitHub
commit bb9460f6d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 126 additions and 41 deletions

View file

@ -36,6 +36,8 @@ jobs:
build_type: full
- os: macOS-latest
build_type: full
- os: macOS-latest
build_type: client
- os: ubuntu-18.04
build_type: full
apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0
@ -52,25 +54,39 @@ jobs:
run: |
echo ::set-output name=github_sha_short::`echo $GIT_COMMIT | cut -c1-7`
echo "JOB_NAME=build (${{matrix.os}}, ${{matrix.build_type}})" >> $GITHUB_ENV
echo "APP_TARGET_NAME=$APP_NAME" >> $GITHUB_ENV
# Linux build variables
if [[ "${{ matrix.os }}" = "ubuntu-"* ]]; then
echo "PYTHON_EXEC=python3" >> $GITHUB_ENV
echo "INSTALLER_EXT=*" >> $GITHUB_ENV
echo "CMAKE_BUILD_EXTRA=-- -j3" >> $GITHUB_ENV
echo "CMAKE_EXTRA=-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
if [ "${{ matrix.build_type }}" = "full" ]; then
echo "CMAKE_EXTRA=-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
else
echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" >> $GITHUB_ENV
fi
fi
# Mac build variables
if [ "${{ matrix.os }}" = "macOS-latest" ]; then
echo "PYTHON_EXEC=python3" >> $GITHUB_ENV
echo "INSTALLER_EXT=dmg" >> $GITHUB_ENV
echo "CMAKE_EXTRA=-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode" >> $GITHUB_ENV
if [ "${{ matrix.build_type }}" = "full" ]; then
echo "CMAKE_EXTRA=-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode" >> $GITHUB_ENV
else
echo "CMAKE_EXTRA=-DCLIENT_ONLY=1 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode" >> $GITHUB_ENV
fi
echo "APP_TARGET_NAME=Vircadia" >> $GITHUB_ENV
fi
# Windows build variables
if [ "${{ matrix.os }}" = "windows-latest" ]; then
echo "PYTHON_EXEC=python" >> $GITHUB_ENV
echo "INSTALLER_EXT=exe" >> $GITHUB_ENV
echo "CMAKE_EXTRA=-A x64" >> $GITHUB_ENV
if [ "${{ matrix.build_type }}" = "full" ]; then
echo "CMAKE_EXTRA=-A x64" >> $GITHUB_ENV
else
echo "CMAKE_EXTRA=-A x64 -DCLIENT_ONLY=1" >> $GITHUB_ENV
fi
fi
# Android + Quest build variables
if [[ "${{ matrix.build_type }}" == "android" ]]; then
@ -86,9 +102,13 @@ jobs:
echo "${{ steps.buildenv1.outputs.symbols_archive }}"
echo "GIT_COMMIT_SHORT=${{ steps.buildenv1.outputs.github_sha_short }}" >> $GITHUB_ENV
if [[ "${{ matrix.build_type }}" != "android" ]]; then
echo "ARTIFACT_PATTERN=Vircadia-PR${{ github.event.number }}-*.$INSTALLER_EXT" >> $GITHUB_ENV
# Build type variables
echo "INSTALLER=Vircadia-$RELEASE_NUMBER-$GIT_COMMIT_SHORT.$INSTALLER_EXT" >> $GITHUB_ENV
if [ "${{ matrix.build_type }}" = "full" ]; then
echo "ARTIFACT_PATTERN=Vircadia-PR${{ github.event.number }}-*.$INSTALLER_EXT" >> $GITHUB_ENV
echo "INSTALLER=Vircadia-$RELEASE_NUMBER-$GIT_COMMIT_SHORT.$INSTALLER_EXT" >> $GITHUB_ENV
else
echo "ARTIFACT_PATTERN=Vircadia-Interface-PR${{ github.event.number }}-*.$INSTALLER_EXT" >> $GITHUB_ENV
echo "INSTALLER=Vircadia-Interface-$RELEASE_NUMBER-$GIT_COMMIT_SHORT.$INSTALLER_EXT" >> $GITHUB_ENV
fi
else
echo "ARTIFACT_PATTERN=*.$INSTALLER_EXT" >> $GITHUB_ENV
fi
@ -124,7 +144,7 @@ jobs:
if: matrix.build_type == 'full' || matrix.build_type == 'client'
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target $APP_NAME $CMAKE_BUILD_EXTRA
run: cmake --build . --config $BUILD_TYPE --target $APP_TARGET_NAME $CMAKE_BUILD_EXTRA
- name: Build Domain Server
if: matrix.build_type == 'full'
working-directory: ${{runner.workspace}}/build
@ -136,7 +156,7 @@ jobs:
shell: bash
run: cmake --build . --config $BUILD_TYPE --target assignment-client $CMAKE_BUILD_EXTRA
- name: Build Console
if: matrix.build_type == 'full'
if: matrix.build_type == 'full' || matrix.os == 'windows-latest'
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target packaged-server-console $CMAKE_BUILD_EXTRA

View file

@ -132,6 +132,15 @@ else()
set(MOBILE 0)
endif()
set(SCREENSHARE 0)
if (WIN32)
set(SCREENSHARE 1)
endif()
if (APPLE AND NOT CLIENT_ONLY)
# Don't include Screenshare in OSX client-only builds.
set(SCREENSHARE 1)
endif()
# Use default time server if none defined in environment
set_from_env(TIMESERVER_URL TIMESERVER_URL "http://timestamp.comodoca.com?td=sha256")
@ -323,8 +332,11 @@ endif()
if (BUILD_CLIENT)
add_subdirectory(interface)
add_subdirectory(screenshare)
set_target_properties(interface PROPERTIES FOLDER "Apps")
if (APPLE)
set_target_properties(Vircadia PROPERTIES FOLDER "Apps")
else()
set_target_properties(interface PROPERTIES FOLDER "Apps")
endif()
option(USE_SIXENSE "Build Interface with sixense library/plugin" OFF)
endif()
@ -334,6 +346,10 @@ if (BUILD_CLIENT OR BUILD_SERVER)
add_subdirectory(server-console)
endif()
if (SCREENSHARE)
add_subdirectory(screenshare)
endif()
# BUILD_TOOLS option will be handled inside the tools's CMakeLists.txt because 'scribe' tool is required for build anyway
add_subdirectory(tools)

View file

@ -96,19 +96,23 @@ macro(GENERATE_INSTALLERS)
set(CPACK_PACKAGING_INSTALL_PREFIX /)
set(CPACK_OSX_PACKAGE_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET})
# make sure a High Fidelity directory exists, in case this hits prior to other installs
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DMG_SUBFOLDER_NAME}\")")
# Create folder if used.
if (NOT INTERFACE_INSTALL_DIR STREQUAL ".")
# make sure a High Fidelity directory exists, in case this hits prior to other installs
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DMG_SUBFOLDER_NAME}\")")
# add the resource file to the Icon file inside the folder
install(CODE
"execute_process(COMMAND Rez -append ${DMG_SUBFOLDER_ICON} -o \${CMAKE_INSTALL_PREFIX}/${ESCAPED_DMG_SUBFOLDER_NAME}/Icon\\r)"
)
# add the resource file to the Icon file inside the folder
install(CODE
"execute_process(COMMAND Rez -append ${DMG_SUBFOLDER_ICON} -o \${CMAKE_INSTALL_PREFIX}/${ESCAPED_DMG_SUBFOLDER_NAME}/Icon\\r)"
)
# modify the folder to use that custom icon
install(CODE "execute_process(COMMAND SetFile -a C \${CMAKE_INSTALL_PREFIX}/${ESCAPED_DMG_SUBFOLDER_NAME})")
# modify the folder to use that custom icon
install(CODE "execute_process(COMMAND SetFile -a C \${CMAKE_INSTALL_PREFIX}/${ESCAPED_DMG_SUBFOLDER_NAME})")
# hide the special Icon? file
install(CODE "execute_process(COMMAND SetFile -a V \${CMAKE_INSTALL_PREFIX}/${ESCAPED_DMG_SUBFOLDER_NAME}/Icon\\r)")
endif ()
# hide the special Icon? file
install(CODE "execute_process(COMMAND SetFile -a V \${CMAKE_INSTALL_PREFIX}/${ESCAPED_DMG_SUBFOLDER_NAME}/Icon\\r)")
endif ()
# configure a cpack properties file for custom variables in template

View file

@ -38,6 +38,12 @@ macro(SET_PACKAGING_PARAMETERS)
set(CLIENT_COMPONENT client)
set(SERVER_COMPONENT server)
if (APPLE)
set(INTERFACE_BUNDLE_NAME "Vircadia")
else()
set(INTERFACE_BUNDLE_NAME "interface")
endif()
if (RELEASE_TYPE STREQUAL "PRODUCTION")
set(DEPLOY_PACKAGE TRUE)
set(PRODUCTION_BUILD 1)
@ -45,7 +51,6 @@ macro(SET_PACKAGING_PARAMETERS)
set(BUILD_ORGANIZATION "Vircadia")
set(HIGH_FIDELITY_PROTOCOL "hifi")
set(HIGH_FIDELITY_APP_PROTOCOL "hifiapp")
set(INTERFACE_BUNDLE_NAME "interface")
set(INTERFACE_ICON_PREFIX "interface")
# add definition for this release type
@ -68,7 +73,6 @@ macro(SET_PACKAGING_PARAMETERS)
set(PR_BUILD 1)
set(BUILD_VERSION "PR${RELEASE_NUMBER}")
set(BUILD_ORGANIZATION "Vircadia - PR${RELEASE_NUMBER}")
set(INTERFACE_BUNDLE_NAME "interface")
set(INTERFACE_ICON_PREFIX "interface-beta")
# add definition for this release type
@ -77,7 +81,6 @@ macro(SET_PACKAGING_PARAMETERS)
set(DEV_BUILD 1)
set(BUILD_VERSION "dev")
set(BUILD_ORGANIZATION "Vircadia - ${BUILD_VERSION}")
set(INTERFACE_BUNDLE_NAME "interface")
set(INTERFACE_ICON_PREFIX "interface-beta")
# add definition for this release type
@ -85,7 +88,11 @@ macro(SET_PACKAGING_PARAMETERS)
endif ()
set(NITPICK_BUNDLE_NAME "nitpick")
set(NITPICK_ICON_PREFIX "nitpick")
if (RELEASE_TYPE STREQUAL "PRODUCTION")
set(NITPICK_ICON_PREFIX "nitpick")
else ()
set(NITPICK_ICON_PREFIX "nitpick-beta")
endif ()
string(TIMESTAMP BUILD_TIME "%d/%m/%Y")
@ -125,10 +132,10 @@ macro(SET_PACKAGING_PARAMETERS)
set(DMG_SUBFOLDER_ICON "${HF_CMAKE_DIR}/installer/install-folder.rsrc")
set(CONSOLE_INSTALL_DIR ${DMG_SUBFOLDER_NAME})
set(INTERFACE_INSTALL_DIR ${DMG_SUBFOLDER_NAME})
set(SCREENSHARE_INSTALL_DIR ${DMG_SUBFOLDER_NAME})
set(NITPICK_INSTALL_DIR ${DMG_SUBFOLDER_NAME})
set(CONSOLE_INSTALL_DIR ".")
set(INTERFACE_INSTALL_DIR ".")
set(SCREENSHARE_INSTALL_DIR ".")
set(NITPICK_INSTALL_DIR ".")
if (CLIENT_ONLY)
set(CONSOLE_EXEC_NAME "Console.app")
@ -147,7 +154,7 @@ macro(SET_PACKAGING_PARAMETERS)
set(SCREENSHARE_APP_CONTENTS "${SCREENSHARE_INSTALL_APP_PATH}/Contents")
set(INTERFACE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app")
set(INTERFACE_INSTALL_APP_PATH "${INTERFACE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app")
set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_PREFIX}.icns")
set(NITPICK_ICON_FILENAME "${NITPICK_ICON_PREFIX}.icns")
else ()

View file

@ -11,7 +11,11 @@ macro(SETUP_HIFI_CLIENT_SERVER_PLUGIN)
setup_hifi_library()
if (BUILD_CLIENT)
add_dependencies(interface ${TARGET_NAME})
if (APPLE)
add_dependencies(Vircadia ${TARGET_NAME})
else()
add_dependencies(interface ${TARGET_NAME})
endif()
endif()
if (BUILD_SERVER)

View file

@ -9,7 +9,11 @@ macro(SETUP_HIFI_PLUGIN)
set(${TARGET_NAME}_SHARED 1)
setup_hifi_library(${ARGV})
if (BUILD_CLIENT)
add_dependencies(interface ${TARGET_NAME})
if (APPLE)
add_dependencies(Vircadia ${TARGET_NAME})
else()
add_dependencies(interface ${TARGET_NAME})
endif()
endif()
target_link_libraries(${TARGET_NAME} ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Plugins")

View file

@ -1,4 +1,10 @@
set(TARGET_NAME interface)
if (APPLE)
# Make the OSX DMG app be Vircadia.app.
set(TARGET_NAME Vircadia)
else()
set(TARGET_NAME interface)
endif()
project(${TARGET_NAME})
file(GLOB_RECURSE QML_SRC resources/qml/*.qml resources/qml/*.js)
@ -192,9 +198,12 @@ if (BUILD_TOOLS AND NPM_EXECUTABLE)
endif()
if (WIN32 OR APPLE)
add_dependencies(${TARGET_NAME} resources screenshare)
add_dependencies(${TARGET_NAME} resources)
endif()
if (SCREENSHARE)
add_dependencies(${TARGET_NAME} screenshare)
endif()
if (WIN32)
# These are external plugins, but we need to do the 'add dependency' here so that their
@ -334,10 +343,6 @@ if (APPLE)
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${CMAKE_SOURCE_DIR}/scripts"
"${RESOURCES_DEV_DIR}/scripts"
# copy screenshare app to the resource folder
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"
@ -364,6 +369,15 @@ if (APPLE)
"${RESOURCES_DEV_DIR}/serverless/redirect.json"
)
if (SCREENSHARE)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
# copy screenshare app to the resource folder
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${CMAKE_CURRENT_BINARY_DIR}/../screenshare/hifi-screenshare-darwin-x64/hifi-screenshare.app"
"${RESOURCES_DEV_DIR}/hifi-screenshare.app"
)
endif()
# call the fixup_interface macro to add required bundling commands for installation
fixup_interface()

View file

@ -1,5 +1,10 @@
set(TARGET_NAME packaged-server-console)
if (CLIENT_ONLY AND APPLE)
# Don't include Console.app in client-only OSX DMGs.
return()
endif()
if (PRODUCTION_BUILD)
set(PRODUCTION_OPTION "--production")
endif()
@ -24,7 +29,11 @@ set_target_properties(${TARGET_NAME}-npm-install PROPERTIES FOLDER "hidden/Serve
# add a dependency from the package target to the server components
if (BUILD_CLIENT)
add_dependencies(${TARGET_NAME} interface)
if (APPLE)
add_dependencies(${TARGET_NAME} Vircadia)
else()
add_dependencies(${TARGET_NAME} interface)
endif()
endif()
if (BUILD_SERVER)

View file

@ -21,20 +21,27 @@ endfunction()
if (BUILD_TOOLS)
set(ALL_TOOLS
udt-test
vhacd-util
gpu-frame-player
ice-client
ktx-tool
ac-client
skeleton-dump
atp-client
oven
)
# Don't include oven or vhacd-til in OSX client-only DMGs.
if (NOT CLIENT_ONLY OR NOT APPLE)
list(APPEND ALL_TOOLS oven)
list(APPEND ALL_TOOLS vhacd-util)
endif()
# Allow different tools for stable builds
if (STABLE_BUILD)
else()
list(APPEND ALL_TOOLS nitpick)
# Don't include nitpick in OSX client-only DMGs.
if (NOT APPLE OR NOT CLIENT_ONLY)
list(APPEND ALL_TOOLS nitpick)
endif()
endif()
foreach(TOOL ${ALL_TOOLS})

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 37 KiB