Skip to content

Commit 2fbad16

Browse files
committed
Enable nightly builds
1 parent 0e1602e commit 2fbad16

8 files changed

Lines changed: 82 additions & 95 deletions

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
schedule:
7+
- cron: "0 0 * * *"
8+
jobs:
9+
flatpak:
10+
name: "Flatpak"
11+
runs-on: ubuntu-latest
12+
container:
13+
image: bilelmoussaoui/flatpak-github-actions:gnome-47
14+
options: --privileged
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
18+
with:
19+
bundle: com.moonlight_stream.Moonlight.flatpak
20+
manifest-path: com.moonlight_stream.Moonlight.json
21+
cache-key: flatpak-builder-${{ github.sha }}
22+
- name: Download artifacts
23+
uses: actions/download-artifact@v4
24+
with:
25+
path: dist
26+
- name: Set current Moonlight commit
27+
run: cd ".flatpak-builder/git/https_github.com_moonlight-stream_moonlight-qt.git" && echo "REV=$(git rev-parse HEAD)" >> $GITHUB_ENV
28+
- name: Set current date as env variable
29+
run: echo "NOW=$(date -u +'%Y-%m-%d %H:%M:%S') UTC" >> $GITHUB_ENV
30+
- name: Nightly Release
31+
uses: andelf/nightly-release@main
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
body: |
36+
Build date: ${{ env.NOW }}
37+
Moonlight commit: [${{ env.REV }}](https://github.com/moonlight-stream/moonlight-qt/commit/${{ env.REV }})
38+
prerelease: false
39+
tag_name: nightly
40+
name: 'Nightly Release'
41+
files: dist/*/*.flatpak

0001-Fix-null-window-on-Qt-6.9.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.

0002-Fix-tooltip-layout-with-Qt-6.9.patch

Lines changed: 0 additions & 34 deletions
This file was deleted.

0003-Fix-incorrect-toolbar-color-on-Qt-6.9.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Builds nightly Moonlight releases for Flatpak
2+
3+
## One line install script (will uninstall the default version!)
4+
5+
```
6+
curl -L https://raw.githubusercontent.com/FrogTheFrog/com.moonlight_stream.Moonlight/master/install.sh | sh
7+
```

com.moonlight_stream.Moonlight.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -222,21 +222,11 @@
222222
{
223223
"type": "git",
224224
"url": "https://github.com/moonlight-stream/moonlight-qt.git",
225-
"disable-shallow-clone": true,
226-
"tag": "v6.1.0",
227-
"commit": "f786e94c7b2f943e24e65d7d74deb539b827fc84"
225+
"disable-shallow-clone": true
228226
},
229227
{
230228
"type": "patch",
231-
"path": "0001-Fix-null-window-on-Qt-6.9.patch"
232-
},
233-
{
234-
"type": "patch",
235-
"path": "0002-Fix-tooltip-layout-with-Qt-6.9.patch"
236-
},
237-
{
238-
"type": "patch",
239-
"path": "0003-Fix-incorrect-toolbar-color-on-Qt-6.9.patch"
229+
"path": "optional-mouse-emulation.patch"
240230
}
241231
]
242232
}

install.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
tmp_file="/tmp/moonlight-nightly.flatpak";
4+
5+
[ -e file ] && rm $tmp_file;
6+
7+
echo "Downloading nighly version"
8+
echo "-----"
9+
curl -L -o $tmp_file https://github.com/FrogTheFrog/com.moonlight_stream.Moonlight/releases/download/nightly/com.moonlight_stream.Moonlight.flatpak;
10+
echo "-----"
11+
12+
echo "Uninstalling old flatpak version";
13+
sudo flatpak uninstall com.moonlight_stream.Moonlight -y &> /dev/null; # Flatpak output breaks terminal :/
14+
15+
echo "Installing nightly flatpak version";
16+
sudo flatpak install "$tmp_file" -y &> /dev/null; # Flatpak output breaks terminal :/
17+
18+
[ -e file ] && rm $tmp_file;

optional-mouse-emulation.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/app/streaming/input/gamepad.cpp b/app/streaming/input/gamepad.cpp
2+
index e0d7f004..d5ce81d4 100644
3+
--- a/app/streaming/input/gamepad.cpp
4+
+++ b/app/streaming/input/gamepad.cpp
5+
@@ -322,7 +322,8 @@ void SdlInputHandler::handleControllerButtonEvent(SDL_ControllerButtonEvent* eve
6+
else {
7+
state->buttons &= ~k_ButtonMap[event->button];
8+
9+
- if (event->button == SDL_CONTROLLER_BUTTON_START) {
10+
+ static const bool enable_mouse_emulation{qgetenv("ENABLE_MOUSE_EMULATION") == "1"};
11+
+ if (enable_mouse_emulation && event->button == SDL_CONTROLLER_BUTTON_START) {
12+
if (SDL_GetTicks() - state->lastStartDownTime > MOUSE_EMULATION_LONG_PRESS_TIME) {
13+
if (state->mouseEmulationTimer != 0) {
14+
SDL_RemoveTimer(state->mouseEmulationTimer);

0 commit comments

Comments
 (0)