mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 15:26:09 +00:00
Add files and scripts to build for Steam Link
This commit is contained in:
parent
32535578a0
commit
e88d2f0ab2
14
README.md
14
README.md
@ -19,7 +19,7 @@ You can follow development on our [Discord server](https://discord.gg/6ERtzFY).
|
|||||||
- Gamepad support with force feedback for up to 4 players
|
- Gamepad support with force feedback for up to 4 players
|
||||||
|
|
||||||
## Downloads
|
## Downloads
|
||||||
- [Windows and macOS](https://github.com/moonlight-stream/moonlight-qt/releases)
|
- [Windows, macOS, and Steam Link](https://github.com/moonlight-stream/moonlight-qt/releases)
|
||||||
- [Snap (for Ubuntu-based Linux distros)](https://snapcraft.io/moonlight)
|
- [Snap (for Ubuntu-based Linux distros)](https://snapcraft.io/moonlight)
|
||||||
- [Flatpak (for other Linux distros)](https://flathub.org/apps/details/com.moonlight_stream.Moonlight)
|
- [Flatpak (for other Linux distros)](https://flathub.org/apps/details/com.moonlight_stream.Moonlight)
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ You can follow development on our [Discord server](https://discord.gg/6ERtzFY).
|
|||||||
### General Build Requirements
|
### General Build Requirements
|
||||||
* Qt 5.9 SDK or later
|
* Qt 5.9 SDK or later
|
||||||
|
|
||||||
### Windows-specific Requirements
|
### Windows-specific Build Requirements
|
||||||
* Windows 7 or later
|
* Windows 7 or later
|
||||||
* [Visual Studio](https://visualstudio.microsoft.com/downloads/) 2015 or later (Community edition is fine)
|
* [Visual Studio](https://visualstudio.microsoft.com/downloads/) 2015 or later (Community edition is fine)
|
||||||
* Select MSVC Desktop toolchain during Qt installation
|
* Select MSVC Desktop toolchain during Qt installation
|
||||||
@ -35,25 +35,31 @@ You can follow development on our [Discord server](https://discord.gg/6ERtzFY).
|
|||||||
* [7-Zip](https://www.7-zip.org/) (only if building installers for non-development PCs)
|
* [7-Zip](https://www.7-zip.org/) (only if building installers for non-development PCs)
|
||||||
* [WiX Toolset](http://wixtoolset.org/releases/) v3.11 or later (only if building installers for non-development PCs)
|
* [WiX Toolset](http://wixtoolset.org/releases/) v3.11 or later (only if building installers for non-development PCs)
|
||||||
|
|
||||||
### Mac-specific Requirements
|
### Mac-specific Build Requirements
|
||||||
* macOS Sierra (10.12) or later
|
* macOS Sierra (10.12) or later
|
||||||
* Xcode 10
|
* Xcode 10
|
||||||
* [create-dmg](https://github.com/sindresorhus/create-dmg) (only if building DMGs for use on non-development Macs)
|
* [create-dmg](https://github.com/sindresorhus/create-dmg) (only if building DMGs for use on non-development Macs)
|
||||||
|
|
||||||
### Linux-specific Requirements
|
### Linux-specific Build Requirements
|
||||||
* GCC or Clang
|
* GCC or Clang
|
||||||
* Install your distro equivalents of: `openssl-devel qt5-devel SDL2-devel ffmpeg-devel qt5-qtquickcontrols2-devel libva-devel libvdpau-devel opus-devel pulseaudio-libs-devel alsa-lib-devel SDL2_ttf-devel`
|
* Install your distro equivalents of: `openssl-devel qt5-devel SDL2-devel ffmpeg-devel qt5-qtquickcontrols2-devel libva-devel libvdpau-devel opus-devel pulseaudio-libs-devel alsa-lib-devel SDL2_ttf-devel`
|
||||||
* FFmpeg 4.0 is required to build. If your distro doesn't package FFmpeg 4.0, you can build and install it from source on http://ffmpeg.org/
|
* FFmpeg 4.0 is required to build. If your distro doesn't package FFmpeg 4.0, you can build and install it from source on http://ffmpeg.org/
|
||||||
|
|
||||||
|
### Steam Link-specific Build Requirements
|
||||||
|
* [Steam Link SDK](https://github.com/ValveSoftware/steamlink-sdk) cloned on your build system
|
||||||
|
* STEAMLINK_SDK_PATH environment variable set to the Steam Link SDK path
|
||||||
|
|
||||||
### Build Setup Steps
|
### Build Setup Steps
|
||||||
1. Install the latest Qt SDK (and optionally, the Qt Creator IDE) from https://www.qt.io/download
|
1. Install the latest Qt SDK (and optionally, the Qt Creator IDE) from https://www.qt.io/download
|
||||||
* You can install Qt via Homebrew on macOS, but you will need to use `brew install qt --with-debug` to be able to create debug builds of Moonlight.
|
* You can install Qt via Homebrew on macOS, but you will need to use `brew install qt --with-debug` to be able to create debug builds of Moonlight.
|
||||||
* You may also use your Linux distro's package manager for the Qt SDK as long as the packages are Qt 5.9 or later.
|
* You may also use your Linux distro's package manager for the Qt SDK as long as the packages are Qt 5.9 or later.
|
||||||
|
* This step is not required for building on Steam Link, because the Steam Link SDK includes Qt 5.9.
|
||||||
2. Run `git submodule update --init --recursive` from within `moonlight-qt/`
|
2. Run `git submodule update --init --recursive` from within `moonlight-qt/`
|
||||||
3. Open the project in Qt Creator or build from qmake on the command line.
|
3. Open the project in Qt Creator or build from qmake on the command line.
|
||||||
* To build a binary for use on non-development machines, use the scripts in the `scripts` folder.
|
* To build a binary for use on non-development machines, use the scripts in the `scripts` folder.
|
||||||
* For Windows builds, use `scripts\generate-installers.bat`. Execute this script from the root of the repository within a Qt command prompt. Ensure WiX and 7-Zip binary directories are in your `%PATH%`.
|
* For Windows builds, use `scripts\generate-installers.bat`. Execute this script from the root of the repository within a Qt command prompt. Ensure WiX and 7-Zip binary directories are in your `%PATH%`.
|
||||||
* For macOS builds, use `scripts/generate-dmg.sh`. Execute this script from the root of the repository and ensure Qt's `bin` folder is in your `$PATH`.
|
* For macOS builds, use `scripts/generate-dmg.sh`. Execute this script from the root of the repository and ensure Qt's `bin` folder is in your `$PATH`.
|
||||||
|
* For Steam Link builds, run `scripts/build-steamlink-app.sh` from the root of the repository.
|
||||||
* To build from the command line for development use, run `qmake moonlight-qt.pro` then `make debug` or `make release`
|
* To build from the command line for development use, run `qmake moonlight-qt.pro` then `make debug` or `make release`
|
||||||
|
|
||||||
## Contribute
|
## Contribute
|
||||||
|
BIN
app/deploy/steamlink/moonlight.png
Normal file
BIN
app/deploy/steamlink/moonlight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
9
app/deploy/steamlink/moonlight.sh
Normal file
9
app/deploy/steamlink/moonlight.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# The default HOME is not persistent, so override
|
||||||
|
# it to a path on the onboard flash. Otherwise our
|
||||||
|
# pairing data will be lost each reboot.
|
||||||
|
HOME=/usr/local/moonlight
|
||||||
|
|
||||||
|
# Write output to a logfile in /tmp
|
||||||
|
exec ./bin/moonlight > /tmp/moonlight.log
|
3
app/deploy/steamlink/toc.txt
Normal file
3
app/deploy/steamlink/toc.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name=Moonlight
|
||||||
|
icon=moonlight.png
|
||||||
|
run=moonlight.sh
|
50
scripts/build-steamlink-app.sh
Executable file
50
scripts/build-steamlink-app.sh
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
BUILD_CONFIG="release"
|
||||||
|
|
||||||
|
fail()
|
||||||
|
{
|
||||||
|
echo "$1" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$STEAMLINK_SDK_PATH" == "" ]; then
|
||||||
|
fail "You must set STEAMLINK_SDK_PATH to build for Steam Link"
|
||||||
|
fi
|
||||||
|
|
||||||
|
BUILD_ROOT=$PWD/build
|
||||||
|
SOURCE_ROOT=$PWD
|
||||||
|
BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
|
||||||
|
DEPLOY_FOLDER=$BUILD_ROOT/deploy-$BUILD_CONFIG
|
||||||
|
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
||||||
|
VERSION=`cat $SOURCE_ROOT/app/version.txt`
|
||||||
|
|
||||||
|
echo Cleaning output directories
|
||||||
|
rm -rf $BUILD_FOLDER
|
||||||
|
rm -rf $DEPLOY_FOLDER
|
||||||
|
rm -rf $INSTALLER_FOLDER
|
||||||
|
mkdir $BUILD_ROOT
|
||||||
|
mkdir $BUILD_FOLDER
|
||||||
|
mkdir $DEPLOY_FOLDER
|
||||||
|
mkdir $INSTALLER_FOLDER
|
||||||
|
|
||||||
|
echo Initializing Steam Link SDK
|
||||||
|
source $STEAMLINK_SDK_PATH/setenv.sh || fail "SL SDK initialization failed!"
|
||||||
|
|
||||||
|
echo Configuring the project
|
||||||
|
pushd $BUILD_FOLDER
|
||||||
|
qmake $SOURCE_ROOT/moonlight-qt.pro || fail "Qmake failed!"
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo Compiling Moonlight in $BUILD_CONFIG configuration
|
||||||
|
pushd $BUILD_FOLDER
|
||||||
|
make -j$(nproc) $(echo "$BUILD_CONFIG" | tr '[:upper:]' '[:lower:]') || fail "Make failed!"
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo Creating app bundle
|
||||||
|
mkdir -p $DEPLOY_FOLDER/steamlink/apps/moonlight/bin
|
||||||
|
cp $BUILD_FOLDER/app/moonlight $DEPLOY_FOLDER/steamlink/apps/moonlight/bin/ || fail "Binary copy failed!"
|
||||||
|
cp $SOURCE_ROOT/app/deploy/steamlink/* $DEPLOY_FOLDER/steamlink/apps/moonlight/ || fail "Metadata copy failed!"
|
||||||
|
pushd $DEPLOY_FOLDER
|
||||||
|
zip -r $INSTALLER_FOLDER/Moonlight-SteamLink-$VERSION.zip . || fail "Zip failed!"
|
||||||
|
popd
|
||||||
|
|
||||||
|
echo Build completed
|
Loading…
x
Reference in New Issue
Block a user