diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a4a6577 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,151 @@ +name: Release + +on: + push: + tags: ['v*'] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: false + +jobs: + appimage: + name: AppImage (AnyLinux) + runs-on: ubuntu-24.04 + timeout-minutes: 90 + steps: + - name: Check out source + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + submodules: recursive + + - name: Build AppImage + shell: bash + run: | + docker run --rm \ + --volume "$GITHUB_WORKSPACE:/workspace" \ + --workdir /workspace \ + ghcr.io/archlinux/archlinux:base-devel@sha256:c3953446016873a756fb7814f10087cac1634c127f7302e80c81c512da796d05 bash -Eeuo pipefail -c ' + pacman -Syu --noconfirm --needed \ + cmake git ninja pkgconf lld sdl3 sdl3_ttf curl openssl \ + nlohmann-json libyaml libelf minizip minizip-ng capstone gtk4 \ + libadwaita webkitgtk-6.0 libutf8proc fontconfig libglvnd \ + vulkan-headers zlib libplacebo bubblewrap xdg-dbus-proxy \ + patchelf jq unzip file ca-certificates dbus zsync + + ./scripts/install_anylinux_dependencies.sh + + curl --fail --location --retry 3 \ + --output /tmp/quick-sharun \ + https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/2a025cef14483c5bc2a75b479071f4d5c58a906f/useful-tools/quick-sharun.sh + echo "fa66d0189e1e87df781c049dfb23cbb1e753786056f693a4483d6d3af61e7ee1 /tmp/quick-sharun" | \ + sha256sum --check --strict + chmod 0755 /tmp/quick-sharun + + curl --fail --location --retry 3 \ + --output /tmp/sharun \ + https://github.com/pkgforge-dev/Anylinux-sharun/releases/download/2.2.6/sharun-x86_64 + echo "a4d51752f9861b4870ca529fea04087310b28f8943cc55b99a95b777d4db92ec /tmp/sharun" | \ + sha256sum --check --strict + chmod 0755 /tmp/sharun + + curl --fail --location --retry 3 \ + --output /tmp/anylinux.c \ + https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/2a025cef14483c5bc2a75b479071f4d5c58a906f/useful-tools/lib/anylinux.c + echo "f50650ad96d177559bdd0737df509fa20bd4af08887631c738fc1f31bfac185f /tmp/anylinux.c" | \ + sha256sum --check --strict + + curl --fail --location --retry 3 \ + --output /tmp/appimagetool \ + https://github.com/pkgforge-dev/appimagetool/releases/download/0.3.3/appimagetool-x86_64-linux + echo "0d01a4e2628efc897be9663f0faeed6a171e1851270b4e1ce4c22434a36ecebd /tmp/appimagetool" | \ + sha256sum --check --strict + chmod 0755 /tmp/appimagetool + + curl --fail --location --retry 3 \ + --output /tmp/uruntime \ + https://github.com/VHSgunzo/uruntime/releases/download/v0.5.9/uruntime-appimage-dwarfs-lite-x86_64 + echo "cef962c299f2fa19b2b3cdf2fa1565ee8541796cc89b9a97a591f94041e8b083 /tmp/uruntime" | \ + sha256sum --check --strict + chmod 0755 /tmp/uruntime + + curl --fail --location --retry 3 \ + --output /tmp/mkdwarfs \ + https://github.com/mhx/dwarfs/releases/download/v0.15.6/dwarfs-universal-0.15.6-Linux-x86_64 + echo "50891c38ba359db8271819a6cbf6aaa8068681523f0c4f2b8242007a45edaa28 /tmp/mkdwarfs" | \ + sha256sum --check --strict + chmod 0755 /tmp/mkdwarfs + + git config --global --add safe.directory /workspace + git config --global --add safe.directory /workspace/third_party/Vulkan-Headers + git config --global --add safe.directory /workspace/third_party/libjnivm + export MOCKTAIL_ANYLINUX_SYSTEM_INSTALL=1 + export MOCKTAIL_ANYLINUX_SHARUN=/tmp/sharun + export MOCKTAIL_ANYLINUX_C_SOURCE=/tmp/anylinux.c + export RUNTIME=/tmp/uruntime + export DWARFS_CMD=/tmp/mkdwarfs + make appimage BUILD_DIR=build-appimage JOBS=4 \ + APPIMAGE=dist/Mocktail-x86_64.AppImage \ + PORTABLE_MODE=standalone APPIMAGE_FORMAT=anylinux \ + ANYLINUX_PACKAGER=/tmp/quick-sharun \ + ANYLINUX_APPIMAGETOOL=/tmp/appimagetool + test -x dist/Mocktail-x86_64.AppImage + ' + + - name: Smoke-test AppImage without FUSE + shell: bash + run: | + smoke_dir="$(mktemp -d)" + trap 'rm -rf -- "$smoke_dir"' EXIT + export XDG_DATA_HOME="$smoke_dir/data" + export XDG_CONFIG_HOME="$smoke_dir/config" + export XDG_CACHE_HOME="$smoke_dir/cache" + export XDG_STATE_HOME="$smoke_dir/state" + mkdir -p "$XDG_DATA_HOME" "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$XDG_STATE_HOME" + timeout 60s dist/Mocktail-x86_64.AppImage --appimage-extract-and-run --help + timeout 60s dist/Mocktail-x86_64.AppImage --appimage-extract-and-run mocktail_updater status + + - name: Upload AppImage + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: Mocktail-AppImage + path: dist/Mocktail-x86_64.AppImage + if-no-files-found: error + retention-days: 14 + + publish: + name: Publish GitHub release + if: startsWith(github.ref, 'refs/tags/v') + needs: [appimage] + runs-on: ubuntu-24.04 + timeout-minutes: 15 + permissions: + contents: write + steps: + - name: Download AppImage + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: Mocktail-AppImage + path: release + + - name: Create release + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -Eeuo pipefail + tag="${GITHUB_REF_NAME}" + mv release/Mocktail-x86_64.AppImage release/Nightcap-x86_64.AppImage + (cd release && sha256sum Nightcap-x86_64.AppImage > Nightcap-x86_64.AppImage.sha256) + if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then + gh release create "$tag" --repo "$GITHUB_REPOSITORY" \ + --title "Nightcap $tag" --generate-notes + fi + gh release upload "$tag" --repo "$GITHUB_REPOSITORY" --clobber \ + release/Nightcap-x86_64.AppImage \ + release/Nightcap-x86_64.AppImage.sha256 diff --git a/README.md b/README.md index a854514..9452cad 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,24 @@ -# Mocktail +# Nightcap -[![CI](https://github.com/komaruworld/mocktail/actions/workflows/ci.yml/badge.svg)](https://github.com/komaruworld/mocktail/actions/workflows/ci.yml) -[![Stars](https://img.shields.io/github/stars/komaruworld/mocktail?style=flat&logo=github)](https://github.com/komaruworld/mocktail/stargazers) -[![Downloads](https://img.shields.io/github/downloads/komaruworld/mocktail/total?logo=github)](https://github.com/komaruworld/mocktail/releases/latest) +[![CI](https://github.com/CoderDayton/nightcap/actions/workflows/ci.yml/badge.svg)](https://github.com/CoderDayton/nightcap/actions/workflows/ci.yml) +[![Stars](https://img.shields.io/github/stars/CoderDayton/nightcap?style=flat&logo=github)](https://github.com/CoderDayton/nightcap/stargazers) [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE) [![Discord](https://img.shields.io/discord/1543955607869063269?label=discord)](https://discord.gg/rhgpfcmFSD) -Mocktail runs the Android `x86_64` Roblox client on Linux, including a Linux -userspace hosted by FreeBSD's Linuxulator. It provides the Android ABI and JNI -pieces the client expects, then connects them to SDL3 and Vulkan or OpenGL on -the Linux side. +Nightcap is Mocktail, tuned for playing on a real PC. It runs the Android +`x86_64` Roblox client on Linux, including a Linux userspace hosted by +FreeBSD's Linuxulator. It provides the Android ABI and JNI pieces the client +expects, then connects them to SDL3 and Vulkan or OpenGL on the Linux side. -Mocktail is an independent community project. It is not affiliated with Roblox +Nightcap is an independent community project. It is not affiliated with Roblox Corporation or VinegarHQ and does not distribute the Roblox client. ## About this fork -This is a fork of [komaruworld/mocktail](https://github.com/komaruworld/mocktail) -with extra fixes for playing on a PC: +Nightcap is a fork of [komaruworld/mocktail](https://github.com/komaruworld/mocktail) +with extra fixes for playing on a PC. The program, config paths, and desktop +entry keep the `mocktail` name so upstream fixes still apply cleanly. - **Lower input lag.** Frames are shown as soon as they are ready instead of waiting in a queue. @@ -34,6 +34,21 @@ with extra fixes for playing on a PC: Everything else works the same as upstream. +## Install + +Grab the AppImage from the +[latest release](https://github.com/CoderDayton/nightcap/releases/latest), +make it executable, and run it: + +```bash +chmod +x Nightcap-x86_64.AppImage +./Nightcap-x86_64.AppImage +``` + +Or build it from source using the steps under [Building](#building). For +Flatpak, AUR, DEB, and RPM packages of the unmodified upstream, see +[komaruworld/mocktail](https://github.com/komaruworld/mocktail#readme). + ## How it works ``` @@ -44,73 +59,6 @@ The APK is checked before any native code is loaded. It is downloaded on first launch and is not bundled with Mocktail. The last working copy is kept in case an update fails. -## Install with Flatpak - -Install the stable release from Flathub: - -```bash -flatpak install flathub space.bigrat.mocktail -flatpak run space.bigrat.mocktail -``` - -Nightly builds are produced automatically from the latest `main` branch: - -```bash -flatpak install --user https://mocktail.bigrat.space/mocktail.flatpakref -flatpak run space.bigrat.mocktail -``` - -## Install from the AUR - -Arch Linux users can install either the pinned source release (`mocktail`) or -the current development version (`mocktail-git`) with an AUR helper: - -```bash -paru -S mocktail-git -# or -yay -S mocktail-git -``` - -Use `mocktail` instead of `mocktail-git` to build the pinned release from -source, or install the stable prebuilt package with `paru -S mocktail-bin` or -`yay -S mocktail-bin`. - -## Install with DNF - -Fedora 44 users can install either the stable `mocktail` package or the -`mocktail-nightly` package built from `main`: - -```bash -sudo curl -fsSL https://mocktail.bigrat.space/rpm/mocktail.repo \ - -o /etc/yum.repos.d/mocktail.repo -sudo dnf install mocktail -# or -sudo dnf install mocktail-nightly -``` - -## Install with APT - -Ubuntu 26.04 users can install either the stable `mocktail` package or the -`mocktail-nightly` package built from `main`: - -```bash -sudo install -d -m 0755 /etc/apt/keyrings -sudo curl -fsSL https://mocktail.bigrat.space/mocktail-packages.gpg \ - -o /etc/apt/keyrings/mocktail.gpg -echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/mocktail.gpg] https://mocktail.bigrat.space/apt mocktail main" | \ - sudo tee /etc/apt/sources.list.d/mocktail.list >/dev/null -sudo apt update -sudo apt install mocktail -# or -sudo apt install mocktail-nightly -``` - -## Direct downloads - -Direct AppImage, DEB, and RPM downloads are available from the -[Website](https://mocktail.bigrat.space/) and -[GitHub Releases](https://github.com/komaruworld/mocktail/releases). -
Screenshots @@ -195,7 +143,7 @@ sudo dnf install gcc-c++ cmake git ninja-build pkgconf-pkg-config lld \
```bash -git clone --recurse-submodules https://github.com/komaruworld/mocktail.git +git clone --recurse-submodules https://github.com/CoderDayton/nightcap.git cd mocktail make build ./build/mocktail @@ -220,7 +168,13 @@ Run Mocktail without `hardened_malloc` enabled. ## Support -You can support the project by giving it a star or with cryptocurrency: +Support this fork by giving it a star or with cryptocurrency: + +- LTC: `LdABR2ELRYrUESWZWrEk1uNx38gHHMuHUU` +- SOL: `tjeDnPoWeyW8zfTf8c5CVAm5QTV8vFPaPouaScAdwfT` +- BCH: `qpktw5jwut9ae8e6898qt3v7rj3km44utgk2r9mj8n` + +Support the upstream project, which does most of the heavy lifting: - USDT (TON): `UQCi6Yzcc9cOctoij6n_r1K90-OdVxAT0D_xo2UzGKkQaJDY` - USDT (TRC20): `TNPMG9Vig2xiuo2r1QqnXRChPH7Vu28Jmx` diff --git a/include/mocktail/platform/sdl_application_metadata.h b/include/mocktail/platform/sdl_application_metadata.h index eaa06f5..62b04f5 100644 --- a/include/mocktail/platform/sdl_application_metadata.h +++ b/include/mocktail/platform/sdl_application_metadata.h @@ -1,3 +1,4 @@ +// Modified by vii from komaruworld/mocktail. See README "About this fork". #ifndef MOCKTAIL_PLATFORM_SDL_APPLICATION_METADATA_H_ #define MOCKTAIL_PLATFORM_SDL_APPLICATION_METADATA_H_ @@ -6,7 +7,7 @@ namespace mocktail { namespace platform { -inline constexpr char kMocktailApplicationName[] = "Mocktail"; +inline constexpr char kMocktailApplicationName[] = "Nightcap"; inline constexpr char kMocktailApplicationIdentifier[] = "space.bigrat.mocktail"; diff --git a/packaging/space.bigrat.mocktail.desktop b/packaging/space.bigrat.mocktail.desktop index 6e2af8f..bc74d15 100644 --- a/packaging/space.bigrat.mocktail.desktop +++ b/packaging/space.bigrat.mocktail.desktop @@ -1,7 +1,7 @@ # Modified by vii from komaruworld/mocktail. See README "About this fork". [Desktop Entry] Type=Application -Name=Mocktail +Name=Nightcap GenericName=Roblox Player Comment=Play Roblox on Linux Exec=env SDL_VIDEODRIVER=wayland,x11 MOCKTAIL_SMALL_TEXTURE_UPSCALE=4 mocktail %u diff --git a/packaging/space.bigrat.mocktail.metainfo.xml b/packaging/space.bigrat.mocktail.metainfo.xml index b7e481b..e5ee477 100644 --- a/packaging/space.bigrat.mocktail.metainfo.xml +++ b/packaging/space.bigrat.mocktail.metainfo.xml @@ -1,9 +1,10 @@ + space.bigrat.mocktail - Mocktail + Nightcap Play Roblox on Linux CC0-1.0 Apache-2.0 @@ -14,7 +15,7 @@ #CEB3EF #2F2A6B - https://github.com/komaruworld/mocktail + https://github.com/CoderDayton/nightcap

Sign in to Roblox, browse experiences, and play them on Linux. diff --git a/src/ui/mocktail_failure_dialog.cc b/src/ui/mocktail_failure_dialog.cc index 3ce3db5..34fca7c 100644 --- a/src/ui/mocktail_failure_dialog.cc +++ b/src/ui/mocktail_failure_dialog.cc @@ -1,3 +1,4 @@ +// Modified by vii from komaruworld/mocktail. See README "About this fork". #include #include #include @@ -153,7 +154,7 @@ void InstallProgressStyle(GdkDisplay* display) { } bool InitializeUi(UiStyle style) { - g_set_application_name("Mocktail"); + g_set_application_name("Nightcap"); if (!gtk_init_check()) { return false; } @@ -229,7 +230,7 @@ void PresentProgressWindow(ProgressState* state, std::string_view message) { GtkWidget* window_widget = adw_window_new(); state->window = GTK_WINDOW(g_object_ref_sink(window_widget)); gtk_widget_add_css_class(window_widget, "mocktail-update-progress"); - gtk_window_set_title(state->window, "Mocktail"); + gtk_window_set_title(state->window, "Nightcap"); gtk_window_set_default_size(state->window, 470, 640); GtkWidget* toolbar_widget = adw_toolbar_view_new(); diff --git a/tests/native_packaging_test.sh b/tests/native_packaging_test.sh index 577b974..acd8e71 100755 --- a/tests/native_packaging_test.sh +++ b/tests/native_packaging_test.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Modified by vii from komaruworld/mocktail. See README "About this fork". # Copyright 2026 Mocktail Project Authors # SPDX-License-Identifier: Apache-2.0 @@ -77,10 +78,6 @@ grep -Fq -- \ Fail 'AUR package embeds a build-tree compatibility manifest path' grep -Fq 'pkgbase = mocktail-git' "${AUR_SRCINFO}" || Fail 'AUR package has no generated .SRCINFO metadata' -grep -Fq 'paru -S mocktail-git' "${README}" || - Fail 'README has no AUR installation instructions' -grep -Fq 'yay -S mocktail-git' "${README}" || - Fail 'README has no alternative AUR helper command' grep -Fq 'LINKER:--no-as-needed' "${STUB_CMAKE}" || Fail 'system shims can lose their host libc dependencies' grep -Fq 'MOCKTAIL_MINIZIP_HAS_STREAM_TELL' "${STUB_CMAKE}" || @@ -118,10 +115,6 @@ if grep -Fq "'site/**'" "${WORKFLOW}"; then Fail 'native packages ignore website changes required by Pages publication' fi -grep -Fq 'sudo dnf install mocktail-nightly' "${README}" || - Fail 'README has no nightly DNF installation command' -grep -Fq 'sudo apt install mocktail-nightly' "${README}" || - Fail 'README has no nightly APT installation command' grep -Fq 'Ubuntu 26.04+' "${README}" || Fail 'README has no Ubuntu source dependency guide' grep -Fq 'Arch Linux' "${README}" || diff --git a/tests/system_install_test.sh b/tests/system_install_test.sh index 39eef9a..7984cdc 100644 --- a/tests/system_install_test.sh +++ b/tests/system_install_test.sh @@ -48,7 +48,7 @@ if find "${install_root}/usr" -type f \( -name '*.py' -o -name '*.sh' \) \ fi [[ -f "${desktop}" ]] -grep -Fq 'Name=Mocktail' "${desktop}" +grep -Fq 'Name=Nightcap' "${desktop}" grep -Fxq 'Exec=env SDL_VIDEODRIVER=wayland,x11 MOCKTAIL_SMALL_TEXTURE_UPSCALE=4 /usr/bin/mocktail %u' "${desktop}" grep -Fq 'Icon=space.bigrat.mocktail' "${desktop}" [[ -f "${metainfo}" ]]