diff --git a/README.md b/README.md index 0806c972..0074e0e3 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ Sunshine is a Gamestream host for Moonlight Ubuntu 20.04: Install the following ``` -sudo apt install cmake libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxrandr-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev +sudo apt install cmake gcc-10 g++-10 libssl-dev libavdevice-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libpulse-dev libopus-dev libxtst-dev libx11-dev libxrandr-dev libxfixes-dev libevdev-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev ``` ### Compilation: - `git clone https://github.com/loki-47-6F-64/sunshine.git --recurse-submodules` - `cd sunshine && mkdir build && cd build` -- `cmake ..` +- `cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 ..` - `make -j ${nproc}` diff --git a/gen-deb.in b/gen-deb.in index b98ca944..09ec1025 100755 --- a/gen-deb.in +++ b/gen-deb.in @@ -37,11 +37,22 @@ Package: sunshine Architecture: amd64 Maintainer: @loki Priority: optional -Version: 0.8.1 +Version: 0.9.1 Depends: libssl1.1, libavdevice58, libboost-thread1.67.0 | libboost-thread1.71.0, libboost-filesystem1.67.0 | libboost-filesystem1.71.0, libboost-log1.67.0 | libboost-log1.71.0, libpulse0, libopus0, libxcb-shm0, libxcb-xfixes0, libxtst6, libevdev2 Description: Gamestream host for Moonlight EOF +cat << 'EOF' > $DEBIAN/preinst +#Store backup for old config files to prevent it from being overwritten +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 +fi +EOF + cat << 'EOF' > $DEBIAN/postinst #!/bin/sh @@ -57,6 +68,16 @@ else echo "Warning: /etc/group not found" fi +if [ -f /etc/sunshine/sunshine.conf.old ]; then + echo "Restoring old sunshine.conf" + 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 +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" @@ -81,6 +102,7 @@ cp -r @CMAKE_CURRENT_SOURCE_DIR@/assets/web $ASSETS/web cp -r @CMAKE_CURRENT_SOURCE_DIR@/assets/shaders/opengl $ASSETS/shaders/opengl chmod 755 $DEBIAN/postinst +chmod 755 $DEBIAN/preinst chmod 755 $BIN/sunshine chmod 644 $RULES/85-sunshine-rules.rules chmod 666 $ASSETS/apps_linux.json diff --git a/third-party/ViGEmClient b/third-party/ViGEmClient index 52682b59..f719a1d9 160000 --- a/third-party/ViGEmClient +++ b/third-party/ViGEmClient @@ -1 +1 @@ -Subproject commit 52682b59c458388a74afbc3d7ef23de21983a86f +Subproject commit f719a1d9eb51969a685a9213d9db6dbb801404c1