From 49bfd2ba1f1bc3d47b5935dbcf36e57febbc0087 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Fri, 6 May 2022 14:24:39 -0400 Subject: [PATCH] Rename apps.json files throughout project - Remove `appveyor.yml` - Add project description to CMakeLists.txt - Add project homepage url to CMakeLists.txt --- .github/workflows/CI.yml | 4 ++-- CMakeLists.txt | 9 +++++--- Portfile.in | 14 ++++++------ appveyor.yml | 44 -------------------------------------- assets/linux-deb/conffiles | 2 +- assets/linux-deb/postinst | 12 +++++------ assets/linux-deb/preinst | 4 ++-- docs/source/conf.py | 2 +- sunshine.desktop.in | 4 ++-- sunshine.service.in | 2 +- 10 files changed, 28 insertions(+), 69 deletions(-) delete mode 100644 appveyor.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fe279f59..5e854683 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,7 +41,7 @@ jobs: - name: Check CMakeLists.txt Version run: | - version=$(grep -o -E '^project\(Sunshine VERSION [0-9]+\.[0-9]+\.[0-9]+\)' CMakeLists.txt | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+') + version=$(grep -o -E '^project\(Sunshine \[VERSION [0-9]+\.[0-9]+\.[0-9]+\]' CMakeLists.txt | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+') echo "cmakelists_version=${version}" >> $GITHUB_ENV - name: Compare CMakeList.txt Version @@ -49,7 +49,7 @@ jobs: run: | echo CMakeLists version: "$cmakelists_version" echo Changelog version: "${{ needs.check_changelog.outputs.next_version_bare }}" - echo Within 'CMakeLists.txt' change "project(Sunshine VERSION $cmakelists_version)" to "project(Sunshine VERSION ${{ needs.check_changelog.outputs.next_version_bare }})" + echo Within 'CMakeLists.txt' change "project(Sunshine [VERSION $cmakelists_version]" to "project(Sunshine [VERSION ${{ needs.check_changelog.outputs.next_version_bare }}]" exit 1 build_linux: diff --git a/CMakeLists.txt b/CMakeLists.txt index 0640625a..8d9584d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.0) -project(Sunshine VERSION 0.13.0) +project(Sunshine [VERSION 0.13.0] + [DESCRIPTION Sunshine is a Gamestream host for Moonlight.] + [HOMEPAGE_URL https://sunshinestream.github.io] + ) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) @@ -453,8 +456,8 @@ set(CPACK_PACKAGE_VENDOR "SunshineStream") set(CPACK_PACKAGE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cpack_artifacts) set(CPACK_PACKAGE_CONTACT "https://github.com/SunshineStream/Sunshine") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "https://github.com/SunshineStream/Sunshine") -set(CPACK_PACKAGE_DESCRIPTION "Gamestream host for Moonlight") -set(CPACK_PACKAGE_HOMEPAGE_URL "https://sunshinestream.github.io") +set(CPACK_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION}) +set(CPACK_PACKAGE_HOMEPAGE_URL ${CMAKE_PROJECT_HOMEPAGE_URL}) set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE) set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/sunshine.png) set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}") diff --git a/Portfile.in b/Portfile.in index 6973ed40..60940cb4 100644 --- a/Portfile.in +++ b/Portfile.in @@ -19,9 +19,9 @@ post-fetch { system -W ${worksrcpath} "${git.cmd} submodule update --init --recursive" } -description Sunshine is a Gamestream host for Moonlight. +description @PROJECT_DESCRIPTION@ long_description {*}${description} -homepage https://github.com/SunshineStream/Sunshine +homepage @PROJECT_HOMEPAGE_URL@ depends_lib port:avahi \ port:ffmpeg \ @@ -37,14 +37,14 @@ cmake.out_of_source yes destroot { xinstall -d -m 755 ${destroot}${prefix}/etc/${name} - xinstall ${worksrcpath}/assets/apps_mac.json ${destroot}${prefix}/etc/${name} - xinstall ${worksrcpath}/assets/box.png ${destroot}${prefix}/etc/${name} - xinstall ${worksrcpath}/assets/sunshine.conf ${destroot}${prefix}/etc/${name} + xinstall ${worksrcpath}/assets/assets_mac/apps.json ${destroot}${prefix}/etc/${name} + xinstall ${worksrcpath}/assets/assets_common/box.png ${destroot}${prefix}/etc/${name} + xinstall ${worksrcpath}/assets/assets_common/sunshine.conf ${destroot}${prefix}/etc/${name} xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/web - xinstall {*}[glob ${worksrcpath}/assets/web/*.html] ${destroot}${prefix}/etc/${name}/web + xinstall {*}[glob ${worksrcpath}/assets/assets_common/web/*.html] ${destroot}${prefix}/etc/${name}/web xinstall -d -m 755 ${destroot}${prefix}/etc/${name}/web/third_party - xinstall {*}[glob ${worksrcpath}/assets/web/third_party/*] ${destroot}${prefix}/etc/${name}/web/third_party + xinstall {*}[glob ${worksrcpath}/assets/assets_common/web/third_party/*] ${destroot}${prefix}/etc/${name}/web/third_party xinstall ${workpath}/build/${name} ${destroot}${prefix}/bin } diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 7fb08089..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,44 +0,0 @@ -services: - - docker - -environment: - matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 - DOCKERFILE: Dockerfile-ubuntu_20_04 - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 - DOCKERFILE: Dockerfile-ubuntu_21_04 - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 - DOCKERFILE: Dockerfile-debian - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - BUILD_TYPE: Release - -install: - - cmd: C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -S mingw-w64-x86_64-binutils mingw-w64-x86_64-openssl mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-opus mingw-w64-x86_64-x265 mingw-w64-x86_64-boost git yasm nasm diffutils make" - -before_build: - - cmd: git submodule update --init --recursive - - cmd: mkdir build - - cmd: cd build - - sh: cd scripts - - sh: ./build-container.sh -f $DOCKERFILE - -build_script: - - cmd: set OLDPATH=%PATH% - - cmd: set PATH=C:\msys64\mingw64\bin - - cmd: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSUNSHINE_ASSETS_DIR=assets -G "MinGW Makefiles" .. - - cmd: mingw32-make -j2 - - cmd: set PATH=%OLDPATH% - - sh: ./build-sunshine.sh -pu - -after_build: - - cmd: Del ..\assets\apps_linux.json - - cmd: 7z a Sunshine-Windows.zip ..\assets - - cmd: 7z a Sunshine-Windows.zip sunshine.exe - - cmd: 7z a Sunshine-Windows.zip tools\dxgi-info.exe - - cmd: 7z a Sunshine-Windows.zip tools\audio-info.exe - - cmd: 7z a Sunshine-Windows.zip tools\sunshinesvc.exe - - cmd: 7z a Sunshine-Windows.zip ..\tools\install-service.bat - - cmd: 7z a Sunshine-Windows.zip ..\tools\uninstall-service.bat - - cmd: appveyor PushArtifact Sunshine-Windows.zip - - sh: appveyor PushArtifact sunshine-build/sunshine.deb - diff --git a/assets/linux-deb/conffiles b/assets/linux-deb/conffiles index 78176a81..cf2d2444 100644 --- a/assets/linux-deb/conffiles +++ b/assets/linux-deb/conffiles @@ -1,2 +1,2 @@ /etc/sunshine/sunshine.conf -/etc/sunshine/apps_linux.json +/etc/sunshine/apps.json diff --git a/assets/linux-deb/postinst b/assets/linux-deb/postinst index cf66231f..d3195c6a 100644 --- a/assets/linux-deb/postinst +++ b/assets/linux-deb/postinst @@ -17,15 +17,15 @@ if [ -f /etc/sunshine/sunshine.conf.old ]; then mv /etc/sunshine/sunshine.conf.old /etc/sunshine/sunshine.conf fi -if [ -f /etc/sunshine/apps_linux.json.old ]; then - echo "Restoring old apps_linux.json" - mv /etc/sunshine/apps_linux.json.old /etc/sunshine/apps_linux.json +if [ -f /etc/sunshine/apps.json.old ]; then + echo "Restoring old apps.json" + mv /etc/sunshine/apps.json.old /etc/sunshine/apps.json fi # Update permissions on config files for Web Manager -if [ -f /etc/sunshine/apps_linux.json ]; then - echo "chmod 666 /etc/sunshine/apps_linux.json" - chmod 666 /etc/sunshine/apps_linux.json +if [ -f /etc/sunshine/apps.json ]; then + echo "chmod 666 /etc/sunshine/apps.json" + chmod 666 /etc/sunshine/apps.json fi if [ -f /etc/sunshine/sunshine.conf ]; then diff --git a/assets/linux-deb/preinst b/assets/linux-deb/preinst index 515d1a34..ec56e883 100644 --- a/assets/linux-deb/preinst +++ b/assets/linux-deb/preinst @@ -4,6 +4,6 @@ if [ -f /etc/sunshine/sunshine.conf ]; then cp /etc/sunshine/sunshine.conf /etc/sunshine/sunshine.conf.old fi -if [ -f /etc/sunshine/apps_linux.json ]; then - cp /etc/sunshine/apps_linux.json /etc/sunshine/apps_linux.json.old +if [ -f /etc/sunshine/apps.json ]; then + cp /etc/sunshine/apps.json /etc/sunshine/apps.json.old fi diff --git a/docs/source/conf.py b/docs/source/conf.py index 86b7b805..360db8f6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -27,7 +27,7 @@ author = 'ReenigneArcher' # The full version, including alpha/beta/rc tags with open(os.path.join(root_dir, 'CMakeLists.txt'), 'r') as f: - version = re.search(r"project\(Sunshine VERSION ((\d+)\.(\d+)\.(\d+))\)", str(f.read())).group(1) + version = re.search(r"project\(Sunshine \[VERSION ((\d+)\.(\d+)\.(\d+))\]", str(f.read())).group(1) """ To use cmake method for obtaining version instead of regex, 1. Within CMakeLists.txt add the following line without backticks: diff --git a/sunshine.desktop.in b/sunshine.desktop.in index 195bade3..a345e5dc 100644 --- a/sunshine.desktop.in +++ b/sunshine.desktop.in @@ -1,9 +1,9 @@ [Desktop Entry] Type=Application -Name=sunshine +Name=@PROJECT_NAME@ Exec=sunshine Version=1.0 -Comment=Host for Moonlight Streaming Client +Comment=@PROJECT_DESCRIPTION@ Icon=sunshine Categories=Utility; Terminal=true diff --git a/sunshine.service.in b/sunshine.service.in index c0c38289..157b3a4d 100644 --- a/sunshine.service.in +++ b/sunshine.service.in @@ -1,5 +1,5 @@ [Unit] -Description=Sunshine Gamestream Server for Moonlight +Description=@PROJECT_DESCRIPTION@ [Service] ExecStart=@SUNSHINE_EXECUTABLE_PATH@