diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 791fe4eb..0e71e2de 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -254,6 +254,7 @@ jobs: # move mv Sunshine.dmg ../artifacts/sunshine-macos.dmg mv Sunshine.zip ../artifacts/sunshine-macos.zip + mv Portfile ../artifacts/Portfile - name: Upload Artifacts if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 944bff64..675a5725 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,7 +312,6 @@ else() if(NOT DEFINED SUNSHINE_EXECUTABLE_PATH) set(SUNSHINE_EXECUTABLE_PATH "sunshine") endif() - configure_file(sunshine.desktop.in sunshine.desktop @ONLY) configure_file(sunshine.service.in sunshine.service @ONLY) endif() @@ -448,7 +447,7 @@ endforeach() target_compile_options(sunshine PRIVATE $<$:${SUNSHINE_COMPILE_OPTIONS}>;$<$:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>) ############# -# CPACK +# CPACK / Packaging #### # Common options @@ -474,6 +473,8 @@ if(WIN32) # see options at: https://cmake.org/cmake/help/latest/cpack_gen/nsis.h install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/web" DESTINATION "${SUNSHINE_CONFIG_DIR}" COMPONENT web) install(FILES "${SUNSHINE_ASSETS_DIR}/apps_windows.json" DESTINATION "${SUNSHINE_CONFIG_DIR}" COMPONENT assets) + install(FILES "${SUNSHINE_ASSETS_DIR}/box.png" DESTINATION "${SUNSHINE_CONFIG_DIR}" COMPONENT assets) + install(FILES "${SUNSHINE_ASSETS_DIR}/steam.png" DESTINATION "${SUNSHINE_CONFIG_DIR}" COMPONENT assets) install(FILES "${SUNSHINE_ASSETS_DIR}/sunshine.conf" DESTINATION "${SUNSHINE_CONFIG_DIR}" COMPONENT assets) install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/shaders/directx" DESTINATION "${SUNSHINE_CONFIG_DIR}/shaders" COMPONENT assets) @@ -524,6 +525,8 @@ if(APPLE) # TODO: test set(INSTALL_RUNTIME_DIR "${prefix}/MacOS") install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/web" DESTINATION "${INSTALL_RUNTIME_DIR}") + install(FILES "${SUNSHINE_ASSETS_DIR}/apps_mac.json" DESTINATION "${INSTALL_RUNTIME_DIR}") + install(FILES "${SUNSHINE_ASSETS_DIR}/box.png" DESTINATION "${INSTALL_RUNTIME_DIR}") install(FILES "${SUNSHINE_ASSETS_DIR}/sunshine.conf" DESTINATION "${INSTALL_RUNTIME_DIR}") install(TARGETS sunshine @@ -534,13 +537,18 @@ if(APPLE) # TODO: test set(CPACK_BUNDLE_NAME "${CMAKE_PROJECT_NAME}") set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/assets/Info.plist") set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/sunshine.icns") + + # Portfile + configure_file(Portfile.in Portfile @ONLY) endif() if(UNIX AND NOT APPLE) install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/web" DESTINATION "${SUNSHINE_CONFIG_DIR}") + install(FILES "${SUNSHINE_ASSETS_DIR}/85-sunshine-rules.rules" DESTINATION "/etc/udev/rules.d") + install(FILES "${SUNSHINE_ASSETS_DIR}/apps_linux.json" DESTINATION "${SUNSHINE_CONFIG_DIR}") + install(FILES "${SUNSHINE_ASSETS_DIR}/box.png" DESTINATION "${SUNSHINE_CONFIG_DIR}") + install(FILES "${SUNSHINE_ASSETS_DIR}/steam.png" DESTINATION "${SUNSHINE_CONFIG_DIR}") install(FILES "${SUNSHINE_ASSETS_DIR}/sunshine.conf" DESTINATION "${SUNSHINE_CONFIG_DIR}") - install(FILES "${SUNSHINE_ASSETS_DIR}/apps_linux.json" DESTINATION "${SUNSHINE_CONFIG_DIR}") - install(FILES "${SUNSHINE_ASSETS_DIR}/85-sunshine-rules.rules" DESTINATION "/etc/udev/rules.d") install(TARGETS sunshine RUNTIME DESTINATION "/usr/bin") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sunshine.service" DESTINATION "/usr/lib/systemd/user") install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/shaders/opengl" DESTINATION "${SUNSHINE_CONFIG_DIR}/shaders") @@ -560,6 +568,9 @@ if(UNIX AND NOT APPLE) # Installation destination dir set(CPACK_SET_DESTDIR true) set(CMAKE_INSTALL_PREFIX "/etc/sunshine") + + # AppImage desktop file + configure_file(sunshine.desktop.in sunshine.desktop @ONLY) endif() -include(CPack) \ No newline at end of file +include(CPack) diff --git a/Portfile b/Portfile.in similarity index 76% rename from Portfile rename to Portfile.in index ea751ca8..6973ed40 100644 --- a/Portfile +++ b/Portfile.in @@ -5,25 +5,27 @@ PortGroup cmake 1.1 PortGroup github 1.0 PortGroup boost 1.0 -github.setup abusse sunshine macos-dev -version 20220224 +github.setup sunshinestream sunshine master +version @PROJECT_VERSION@ +revision 1 categories multimedia +license GPL-3 +maintainers {sunshinestream @SunshineStream} {outlook.com:anselm.busse} platforms darwin -license GPL-2 -maintainers {outlook.com:anselm.busse} fetch.type git post-fetch { system -W ${worksrcpath} "${git.cmd} submodule update --init --recursive" } -description Sunshine is a Gamestream host for Moonlight -long_description Sunshine is a Gamestream host for Moonlight - +description Sunshine is a Gamestream host for Moonlight. +long_description {*}${description} homepage https://github.com/SunshineStream/Sunshine -depends_lib port:avahi port:ffmpeg port:libopus +depends_lib port:avahi \ + port:ffmpeg \ + port:libopus boost.version 1.76 diff --git a/docs/source/about/installation.rst b/docs/source/about/installation.rst index 6634a714..d7e043a4 100644 --- a/docs/source/about/installation.rst +++ b/docs/source/about/installation.rst @@ -81,13 +81,19 @@ MacOS Disk Image File option: #. Download and install ``sunshine.dmg`` + .. Warning:: The Disk Image File is experimental. Limited support will be provided. + Portfile option: #. Install `MacPorts `_ - #. Download the `Portfile `_ from this repository - to ``/tmp`` + #. Download the ``Portfile`` to ``/tmp`` #. In a terminal run ``cd /tmp && sudo port install`` #. The first time you start Sunshine, you will be asked to grant access to screen recording and your microphone. +Standalone option: + #. Download and extract ``sunshine-macos.zip`` + + .. Warning:: The Standalone package is experimental. Limited support will be provided. + Windows ------- .. image:: https://img.shields.io/github/issues/sunshinestream/sunshine/os:windows:10?logo=github&style=for-the-badge