Rename apps.json files throughout project

- Remove `appveyor.yml`
- Add project description to CMakeLists.txt
- Add project homepage url to CMakeLists.txt
This commit is contained in:
ReenigneArcher 2022-05-06 14:24:39 -04:00
parent 93aebf461a
commit 49bfd2ba1f
10 changed files with 28 additions and 69 deletions

View File

@ -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:

View File

@ -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}")

View File

@ -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
}

View File

@ -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

View File

@ -1,2 +1,2 @@
/etc/sunshine/sunshine.conf
/etc/sunshine/apps_linux.json
/etc/sunshine/apps.json

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -1,5 +1,5 @@
[Unit]
Description=Sunshine Gamestream Server for Moonlight
Description=@PROJECT_DESCRIPTION@
[Service]
ExecStart=@SUNSHINE_EXECUTABLE_PATH@