Skip to content

Commit

Permalink
bump version 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonflylee committed Jan 9, 2024
1 parent b44b4f0 commit 725e559
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 32 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ on:
snap:
description: build linux snap
type: boolean
flatpak:
description: build linux flatpak
type: boolean
mingw64:
description: build win64 mingw64
type: boolean
Expand Down Expand Up @@ -117,7 +120,7 @@ jobs:
submodules: recursive
- name: Build snap
run: |
docker run --rm --tty -v $PWD:/data -w /data/scripts --privileged diddledani/snapcraft:core20
docker run --rm --tty --network host -v $PWD:/data -w /data/scripts --privileged diddledani/snapcraft:core20
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
Expand All @@ -127,6 +130,33 @@ jobs:
name: switchfin-snap-${{ steps.vars.outputs.sha_short }}
path: scripts/*.snap

build-flatpak:
runs-on: ubuntu-latest
if: ${{ inputs.flatpak }}
strategy:
fail-fast: false
matrix:
arch: [ x86_64 ]
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08
options: --privileged
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set workspace permissions
run: git config --system --add safe.directory '*'
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: switchfin-flatpak-${{ steps.vars.outputs.sha_short }}.flatpak
manifest-path: scripts/flatpak.yaml
cache-key: flatpak-builder-${{ hashFiles('scripts/flatpak.yaml') }}
verbose: true
arch: ${{ matrix.arch }}

build-macos:
runs-on: macos-latest
if: ${{ inputs.macos || github.event_name != 'workflow_dispatch'}}
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ include(${BOREALIS_LIBRARY}/cmake/toolchain.cmake)
project(Switchfin)
set(VERSION_MAJOR "0")
set(VERSION_MINOR "4")
set(VERSION_ALTER "1")
set(VERSION_ALTER "2")
set(PROJECT_TITLEID "010ff000ffff0003")
set(PROJECT_AUTHOR "dragonflylee")
set(PROJECT_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/icon/icon.jpg)
Expand Down Expand Up @@ -198,7 +198,7 @@ if (PLATFORM_DESKTOP)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory ${PROJECT_RESOURCES} Resources/resources
COMMAND otool -L MacOS/${PROJECT_NAME}
COMMAND dylibbundler -cd -b ${BUNDLE_ARG} -x MacOS/${PROJECT_NAME} -d Frameworks/ -p "@executable_path/../Frameworks/"
COMMAND dylibbundler -cd -ns -b ${BUNDLE_ARG} -x MacOS/${PROJECT_NAME} -d Frameworks/ -p "@executable_path/../Frameworks/"
COMMAND codesign --sign - --force Frameworks/*
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.app/Contents"
)
Expand Down
5 changes: 4 additions & 1 deletion app/src/view/video_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ VideoView::VideoView(const jellyfin::MediaItem& item) : itemId(item.Id) {
this->osdLockBox->registerClickAction([this](...) { return this->toggleOSDLock(); });
this->osdLockBox->addGestureRecognizer(new brls::TapGestureRecognizer(this->osdLockBox));

this->btnClose->registerClickAction([](...) { return popActivity(); });
this->btnClose->registerClickAction([](...) {
brls::sync([]() { popActivity(); });
return true;
});
this->btnClose->addGestureRecognizer(new brls::TapGestureRecognizer(this->btnClose));

/// 播放控制
Expand Down
110 changes: 110 additions & 0 deletions scripts/flatpak.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
app-id: org.switchfin.player
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: Switchfin
finish-args:
- --share=ipc
- --socket=fallback-x11
- --socket=wayland
# This program is designed for controller
- --device=all
- --share=network
- --socket=pulseaudio
# inhibiting screen saver
- --talk-name=org.freedesktop.ScreenSaver
- --talk-name=org.freedesktop.PowerManagement
- --talk-name=org.gnome.SessionManager
- --talk-name=org.mate.SessionManager
# https://github.com/mpv-player/mpv/blob/master/libmpv/client.h#L147-L149
# will remove it when next version release
- --env=LC_NUMERIC=C
cleanup-commands:
- mkdir -p /app/lib/ffmpeg
cleanup:
- '*.a'
- '*.la'
- /include
- /lib/cmake
- /lib/pkgconfig
- /man
- /share/man
- /share/gtk-doc
add-extensions:
org.freedesktop.Platform.ffmpeg-full:
directory: lib/ffmpeg
version: '23.08'
add-ld-path: "."

modules:
- name: libmpv
buildsystem: meson
config-opts:
- -Dlibmpv=true
- -Dlua=disabled
- -Ddebug=false
- -Dcplayer=false
- -Dtests=false
- -Dlibarchive=disabled
- -Dmanpage-build=disabled
sources:
- type: archive
url: https://github.com/mpv-player/mpv/archive/v0.36.0.tar.gz
sha256: 29abc44f8ebee013bb2f9fe14d80b30db19b534c679056e4851ceadf5a5e8bf6
x-checker-data:
type: anitya
project-id: 5348
stable-only: true
url-template: https://github.com/mpv-player/mpv/archive/v$version.tar.gz
modules:
- name: libXpresent
buildsystem: autotools
sources:
- type: archive
url: https://xorg.freedesktop.org/archive/individual/lib/libXpresent-1.0.1.tar.xz
sha256: b964df9e5a066daa5e08d2dc82692c57ca27d00b8cc257e8e960c9f1cf26231b
x-checker-data:
type: anitya
project-id: 17166
stable-only: true
url-template: https://xorg.freedesktop.org/archive/individual/lib/libXpresent-$version.tar.xz

- name: libass
config-opts:
- --disable-static
sources:
- type: archive
url: 'https://github.com/libass/libass/releases/download/0.17.1/libass-0.17.1.tar.gz'
sha256: 'd653be97198a0543c69111122173c41a99e0b91426f9e17f06a858982c2fb03d'
x-checker-data:
type: anitya
project-id: 1560
stable-only: true
url-template: https://github.com/libass/libass/releases/download/$version/libass-$version.tar.gz

- name: glfw
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DGLFW_BUILD_EXAMPLES=OFF
- -DGLFW_BUILD_TESTS=OFF
- -DGLFW_BUILD_DOCS=OFF
- -DBUILD_SHARED_LIBS=ON
- -DGLFW_BUILD_WAYLAND=ON
- -DGLFW_BUILD_X11=ON
sources:
- type: git
url: https://github.com/dragonflylee/glfw.git
branch: switchfin

- name: switchfin
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DPLATFORM_DESKTOP=ON
- -DUSE_SYSTEM_GLFW=ON
- -DCMAKE_INSTALL=ON
builddir: true
sources:
- type: dir
path: '..'
Loading

0 comments on commit 725e559

Please sign in to comment.