Skip to content

Commit

Permalink
revert to gtk4.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosette committed Oct 4, 2024
1 parent 926b2d1 commit ea7ad9f
Show file tree
Hide file tree
Showing 51 changed files with 10,207 additions and 219 deletions.
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/build_image.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build and Push Ubuntu-rust-gtk4
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "docker"
schedule:
- cron: "15 8 1 */1 *"
# push:
# branches:
# - main
# paths:
# - "docker"
# schedule:
# - cron: "15 8 1 */1 *"

jobs:
build-and-push:
Expand Down
48 changes: 29 additions & 19 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,59 @@ on:
workflow_dispatch:
push:
branches:
- "main"
paths-ignore:
- "docs/**"
- ".gitignore"
- LICENSE
- "*.md"
pull_request:
branches:
- "main"
- "gtk414"
paths-ignore:
- "docs/**"
- ".gitignore"
- LICENSE
- "*.md"
# pull_request:
# branches:
# - "gtk414"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"

jobs:
build-release:
strategy:
matrix:
include:
- arch-name: x86_64-linux-gnu
- arch-name: x86_64-linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: tsukimi
target: x86_64-unknown-linux
platform: amd64
- arch-name: aarch64-linux
os: ubuntu-latest
target: aarch64-unknown-linux
platform: arm64

runs-on: ${{matrix.os}}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build ${{matrix.target}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build tsukimi-${{matrix.target}}
run: |
mkdir artifact
docker build -t tsukimi .
docker run -d --name tsukimi tsukimi
docker cp tsukimi:/usr/src/tsukimi/. artifact/
docker run --rm --platform linux/${{matrix.platform}} -v ${{ github.workspace }}:/app -v ${{github.workspace}}/docker/entrypoint.sh:/entrypoint.sh ghcr.io/kosette/ubuntu-rust-gtk4:gtk414-latest
sudo cp target/release/tsukimi .
sudo cp target/debian/*.deb .
sudo cp -r i18n/locale .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{matrix.artifact}}-${{matrix.arch-name}}
path: artifact/*
name: tsukimi-${{matrix.arch-name}}
path: |
tsukimi
*.deb
locale
compression-level: 0
overwrite: true
retention-days: 7
32 changes: 18 additions & 14 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ on:
workflow_dispatch:
push:
branches:
- "main"
paths-ignore:
- "docs/**"
- ".gitignore"
- LICENSE
- "*.md"
pull_request:
branches:
- "main"
- "gtk414"
paths-ignore:
- "docs/**"
- ".gitignore"
- LICENSE
- "*.md"
# pull_request:
# branches:
# - "gtk414"
# paths-ignore:
# - "docs/**"
# - ".gitignore"
# - LICENSE
# - "*.md"

env:
CARGO_TERM_COLOR: always
Expand All @@ -32,13 +32,11 @@ jobs:
- arch: x86_64-windows-gnu
os: windows-latest
target: x86_64-pc-windows-gnu
artifact: tsukimi.exe
msystem: mingw64
env: x86_64
- arch: ucrt-x86_64-windows-gnu
- arch: ucrt64-x86_64-windows-gnu
os: windows-latest
target: x86_64-pc-windows-gnu
artifact: tsukimi.exe
msystem: ucrt64
env: ucrt-x86_64

Expand Down Expand Up @@ -74,6 +72,12 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
shell: msys2 {0}
run: |
curl -LO https://repo.msys2.org/mingw/${{ matrix.msystem }}/mingw-w64-${{ matrix.env }}-gtk4-4.14.5-1-any.pkg.tar.zst
pacman --noconfirm -U ./mingw-w64-${{ matrix.env }}-gtk4-4.14.5-1-any.pkg.tar.zst
curl -LO https://repo.msys2.org/mingw/${{ matrix.msystem }}/mingw-w64-${{ matrix.env }}-libadwaita-1.5.3-1-any.pkg.tar.zst
pacman --noconfirm -U ./mingw-w64-${{ matrix.env }}-libadwaita-1.5.3-1-any.pkg.tar.zst
export PATH="/c/Users/runneradmin/.cargo/bin:$PATH"
rustup default stable-gnu
cargo build --release --locked
Expand All @@ -84,7 +88,7 @@ jobs:
run: |
mkdir artifact && cd artifact
mkdir tsukimi-x86_64-windows-gnu/ && cd tsukimi-x86_64-windows-gnu/ && mkdir bin/ && mkdir share/ && mkdir lib/
cp $GITHUB_WORKSPACE/target/release/${{ matrix.artifact }} bin/
cp $GITHUB_WORKSPACE/target/release/tsukimi.exe bin/
cp /${{ matrix.msystem }}/bin/gdbus.exe bin/
cp -r /${{ matrix.msystem }}/lib/gdk-pixbuf-2.0 lib/
Expand Down Expand Up @@ -126,7 +130,7 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
shell: powershell
run: |
cp tsukimi_installer.nsi artifact
cp ./installer/tsukimi_installer.nsi artifact
makensis /V4 artifact/tsukimi_installer.nsi
rm artifact/tsukimi_installer.nsi
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
/i18n
/.idea
/.cargo
28 changes: 12 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 27 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,32 @@
name = "tsukimi"
version = "0.13.0"
edition = "2021"
description = "A simple Emby Client with MPV written by GTK4-RS"
description = "A simple Emby Client with MPV written by GTK4-RS"
license = "GPL"


[dependencies]
gtk = { version = "0.9", package = "gtk4", features = ["v4_16"] }
gtk = { version = "0.9", package = "gtk4", features = ["v4_14"] }
serde = { version = "1.0.209", features = ["derive"] }
serde_json = "1.0.128"
tokio = { version = "1.39.3", features = ["full"] }
reqwest = { version = "0.12", features = ["json"] }
async-channel = "2.3.1"
once_cell = "1.20.1"
dirs = "5.0.1"
adw = { version = "0.7", package = "libadwaita", features = ["v1_6"] }
adw = { version = "0.7", package = "libadwaita", features = [
"v1_5",
] }
cargo-deb = "2.7.0"
bytefmt = "0.1.7"
libc = "0.2.159"
uuid = { version = "1.10.0", features = ["v4"] }
chrono = { version = "0.4.38", features = ["serde"] }
chrono = { version = "0.4.38", features = ["serde"] }
toml = "0.8.19"
tracing = "0.1.40"
gst = { version = "0.23", package = "gstreamer"}
gst = { version = "0.23", package = "gstreamer" }
url = "2.5.2"
libmpv2 = "=4.0.0"
libmpv2 = { path = "libmpv2-rs", version = "=4.0.0" }
image = "0.25.2"
gettext-rs = { version = "~0.7", features = ["gettext-system"] }
hostname = "0.4.0"
Expand All @@ -36,7 +38,12 @@ atomic-wait = "1.1.0"
flume = "0.11.0"
derive_builder = "0.20.1"
anyhow = "1.0.89"
windows = { version = "0.58.0", features = ["Win32_Foundation", "Win32_System_Power", "Win32_System_Registry", "Win32_UI_WindowsAndMessaging"] }
windows = { version = "0.58.0", features = [
"Win32_Foundation",
"Win32_System_Power",
"Win32_System_Registry",
"Win32_UI_WindowsAndMessaging",
] }
tracing-subscriber = "0.3.18"
gdk4-x11 = { version = "0.9.2", optional = true }
gdk4-win32 = { version = "0.9.0", optional = true }
Expand All @@ -52,7 +59,8 @@ console = [] # Enable console logging
default = ["protocols", "render"]
protocols = [] # Enable custom protocol callbacks
render = [] # Enable custom rendering
build_libmpv = [] # build libmpv automatically, provided MPV_SOURCE is set
build_libmpv = [
] # build libmpv automatically, provided MPV_SOURCE is set
x11 = ["gdk4-x11"]
win32 = ["gdk4-win32"]

Expand All @@ -65,16 +73,24 @@ gdk4-win32 = { version = "0.9.0" }
[package.metadata.deb]
maintainer = "Inaha <[email protected]>"
copyright = "2024, Inaha <[email protected]>"
license-file = ["LICENSE","4"]
license-file = ["LICENSE", "4"]
extended-description = """\
A simple Emby Client with MPV \
Written by GTK4-RS."""
depends = "$auto"
section = "utility"
priority = "optional"
assets = [
["target/release/tsukimi", "usr/bin/", "755"],
["README.md", "usr/share/doc/tsukimi/README", "644"],
[
"target/release/tsukimi",
"usr/bin/",
"755",
],
[
"README.md",
"usr/share/doc/tsukimi/README",
"644",
],
]

[profile.release]
Expand Down
Loading

0 comments on commit ea7ad9f

Please sign in to comment.