diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml new file mode 100644 index 00000000..bfb28720 --- /dev/null +++ b/.forgejo/workflows/release.yml @@ -0,0 +1,122 @@ +name: Release Binaries (Forgejo) + +on: + push: + tags: + - 'v*' + workflow_dispatch: + inputs: + tag: + description: 'Release Tag (e.g. v2.8.0-c1)' + required: false + default: 'v2.8.0-c1' + type: string + +permissions: + contents: write + +env: + SQLX_OFFLINE: true + SQLX_OFFLINE_DIR: packages/oneclient_db/.sqlx + +jobs: + build-linux: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + targets: x86_64-unknown-linux-gnu + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + with: + key: x86_64-unknown-linux-gnu + cache-all-crates: true + + - name: Install Linux build dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libwebkit2gtk-4.1-dev \ + build-essential \ + curl \ + wget \ + file \ + libxdo-dev \ + libssl-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + libfontconfig1-dev \ + libfreetype6-dev \ + libgl1-mesa-dev \ + libvulkan-dev \ + libasound2-dev + + - name: Install cargo-packager + run: cargo install cargo-packager --locked || true + + - name: Build Release Binary + run: cargo build --release --bin oneclient_app --target x86_64-unknown-linux-gnu + + - name: Package Application + run: cargo packager --release --target x86_64-unknown-linux-gnu --formats deb,appimage + continue-on-error: true + + - name: Generate RPM Package (Linux) + run: | + cargo install cargo-generate-rpm --locked || true + cargo generate-rpm --target x86_64-unknown-linux-gnu -p oneclient_app || true + + - name: Determine Release Tag + id: release_tag + run: | + if [[ "${{ github.ref_name }}" =~ ^v ]]; then + echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT + elif [ -n "${{ inputs.tag }}" ]; then + echo "tag=${{ inputs.tag }}" >> $GITHUB_OUTPUT + else + echo "tag=v2.8.0-c1" >> $GITHUB_OUTPUT + fi + + - name: Publish Assets to Forgejo Release + run: | + TAG="${{ steps.release_tag.outputs.tag }}" + API_URL="${{ github.server_url }}/api/v1/repos/${{ github.repository }}" + echo "Connecting to $API_URL for release $TAG" + + # 1. Fetch or create release on Forgejo + RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$API_URL/releases/tags/$TAG" | jq -r '.id // empty') + if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "null" ]; then + RESP=$(curl -s -X POST "$API_URL/releases" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d "{\"tag_name\":\"$TAG\",\"name\":\"OneLauncher-Cracked $TAG\",\"draft\":false,\"prerelease\":false,\"target_commitish\":\"main\"}") + RELEASE_ID=$(echo "$RESP" | jq -r '.id // empty') + fi + echo "Target Release ID: $RELEASE_ID" + + # 2. Upload generated packages + shopt -s nullglob + FILES=( + target/x86_64-unknown-linux-gnu/release/*.deb + target/x86_64-unknown-linux-gnu/release/*.AppImage + target/x86_64-unknown-linux-gnu/generate-rpm/*.rpm + target/release/*.deb + target/release/*.AppImage + target/generate-rpm/*.rpm + ) + + for f in "${FILES[@]}"; do + if [ -f "$f" ]; then + fname=$(basename "$f") + echo "Uploading asset $fname..." + curl -s -X POST "$API_URL/releases/$RELEASE_ID/assets?name=$fname" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -F "attachment=@$f" + fi + done + echo "Release upload completed!" diff --git a/.gitignore b/.gitignore index a3d27549..81a9d6b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /target +/dist .DS_Store /.idea OneLauncher.iml diff --git a/Cargo.toml b/Cargo.toml index ad028dba..9871b9d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,14 +9,14 @@ authors = [ "Polyfrost", "Polyfrost Contributors", ] -documentation = "https://github.com/Polyfrost/OneLauncher" +documentation = "https://git.oiupoyt.space/oiupoyt/OneLauncher-Cracked" edition = "2024" homepage = "https://polyfrost.org/projects/oneclient" license = "GPL-3.0-only" readme = "README.md" -repository = "https://github.com/Polyfrost/OneLauncher" +repository = "https://git.oiupoyt.space/oiupoyt/OneLauncher-Cracked" rust-version = "1.97" -version = "2.8.0" +version = "2.8.0-c1" [workspace.dependencies] # core @@ -172,3 +172,7 @@ codegen-units = 16 debug = true lto = false strip = false + +[profile.dev] +debug = 0 +strip = "debuginfo" diff --git a/README.md b/README.md index 7f0164f4..bb95cec8 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,19 @@
-Repository Banner + OneLauncher Logo -# OneClient | OneLauncher -The monorepo containing the code for OneLauncher, OneClient, and their core backend. - -OneClient is a Minecraft client featuring fully 100% open-source components, offering many packaged and pre-configured mods in one click. -OneLauncher is a WIP Minecraft launcher giving power-users the greatest customization whilst featuring a clean UI. +forked from [OneLauncher](https://github.com/Polyfrost/OneLauncher) allowing for uh offline authentication
-## Installing +## download from [**Releases Page**](https://git.oiupoyt.space/oiupoyt/OneLauncher-Cracked/releases). +yes the actual client performs normally aswell -You can install the latest release of OneClient from our website: [https://polyfrost.org/projects/oneclient](https://polyfrost.org/projects/oneclient) -as well as our [GitHub releases](https://github.com/Polyfrost/OneLauncher/releases/latest). - -| Windows (x86_64) | macOS (Intel & Apple Silicon) | Linux (x86_64) | -|------------------|-------------------------------|---------------------------------------------------------| -| Installer 🔄 | DMG 🔄 | AppImage 🔄 | -| | App Bundle 🔄 | DEB | -| | | RPM | -| | | [AUR](https://aur.archlinux.org/packages/oneclient-bin) | - -> 🔄 = Has support for autoupdating built-in +> [!WARNING] +> DO NOT use official Microsoft/Mojang accounts with this launcher. This bypasses authentication and is intended for offline play only. Using with official servers may violate Minecraft's Terms of Service. -## Contributing -We welcome contributions! Please read our [contributing guidelines](CONTRIBUTING.md) before getting started. +#### The Trojan:Win32/Wacatac.B!ml detection is a false positive triggered by Microsoft Defender's machine learning heuristic on newly compiled, unsigned Rust NSIS installers. The software contains no malware, telemetry, or malicious payloads. - -### Requirements - -The project targets **Rust 1.97** or later. You can install Rust via [rustup](https://rustup.rs/). - - -### Building & Running - -```sh -# Run the app -cargo run -p oneclient_app - -# Build a release binary -cargo build -p oneclient_app --release -``` - - -### Packaging / Releasing - -Installers are produced with [**cargo-packager**](https://github.com/crabnebula-dev/cargo-packager) -(the standalone bundler spun out of the Tauri bundler). Config lives in -[`packages/oneclient_app/Cargo.toml`](./packages/oneclient_app/Cargo.toml) under -`[package.metadata.packager]`. - -```sh -cargo install cargo-packager --locked - -# Build the binary, then bundle it for the current OS: -cargo build --release -p oneclient_app -cargo packager --release -p oneclient_app --formats -# Windows: nsis macOS: app,dmg Linux: deb,appimage -``` - - -### Versioning - -The workspace shares a single version, defined in the root [`Cargo.toml`](./Cargo.toml) under `[workspace.package]`. - -Versions and release notes come from [Knope](https://knope.tech) change files in [`.changeset/`](./.changeset). -Add one per user-facing change with `knope document-change` (installed via `cargo install knope`). The -`OneClient Release Build` workflow consumes them, bumps the version, writes [`CHANGELOG.md`](./CHANGELOG.md), -and uses the new entry as the GitHub release body, which is what the launcher's changelog page shows. - - -## Code signing - -This program uses free code signing provided by [SignPath.io](https://signpath.io?utm_source=foundation&utm_medium=github&utm_campaign=0install), and a certificate by the [SignPath Foundation](https://signpath.org?utm_source=foundation&utm_medium=github&utm_campaign=0install). We thank them very much to their contributions to OSS software! +intended for offline usage only. diff --git a/docs/superpowers/plans/2026-10-10-update-to-2.8.0.md b/docs/superpowers/plans/2026-10-10-update-to-2.8.0.md new file mode 100644 index 00000000..5b12a277 --- /dev/null +++ b/docs/superpowers/plans/2026-10-10-update-to-2.8.0.md @@ -0,0 +1,108 @@ +# OneLauncher-Cracked 2.8.0 Update Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Rebase and upgrade OneLauncher-Cracked onto upstream OneLauncher 2.8.0 (`1d6ec598`), preserving all offline authentication bypasses, the local Yggdrasil skin server with authlib-injector, Forgejo auto-updater, and custom skin changer UI. + +**Architecture:** Port 37 cracked subsystem files onto the clean upstream 2.8.0 codebase. Maintain strict isolation for cracked authentication and skin server logic while adopting upstream's new multi-instance management, package manager filters, and Freya improvements. + +**Tech Stack:** Rust 2024, Freya (Dioxus + Skia), Tokio, Reqwest, RSA PKCS#1v15, Authlib-Injector, Forgejo API v1. + +**Spec:** Direct human instruction: "update to version 2.8.0". + +## Global Constraints +- Target version: `2.8.0-c1`. +- Offline authentication must require 0 Microsoft accounts. +- Local Yggdrasil skin server must eliminate multiplayer skin cloning via RSA-signed profile properties. +- Auto-updater must target Forgejo API at `https://git.oiupoyt.space/api/v1/repos/oiupoyt/OneLauncher-Cracked/releases/latest`. +- All workspace crates must pass tests and compilation without regressions. + +--- + +### Task 1: Project Metadata, Packaging & Workflows + +**Files:** +- Modify: `Cargo.toml` +- Modify: `README.md` +- Modify: `.gitignore` +- Create: `.forgejo/workflows/release.yml` +- Create: `packages/oneclient_app/distribution/linux/oneclient_app.desktop` + +- [ ] **Step 1: Update Cargo.toml metadata and dev profile** +- [ ] **Step 2: Update README.md with warning embed and Forgejo releases link** +- [ ] **Step 3: Add .forgejo release workflow and desktop file** +- [ ] **Step 4: Commit task 1** + +--- + +### Task 2: Port Offline Authentication Bypass (`oneclient_auth`) + +**Files:** +- Modify: `packages/oneclient_auth/src/service.rs` +- Modify: `packages/oneclient_auth/src/store.rs` +- Modify: `packages/oneclient_auth/tests/offline.rs` + +- [ ] **Step 1: In `service.rs`, remove `OfflineRequiresMicrosoft` check from `account_for_launch`** +- [ ] **Step 2: In `store.rs`, allow offline accounts without Microsoft accounts and auto-select default user** +- [ ] **Step 3: In `tests/offline.rs`, ensure tests assert offline launch succeeds without Microsoft** +- [ ] **Step 4: Run `cargo test -p oneclient_auth` and verify all tests pass** +- [ ] **Step 5: Commit task 2** + +--- + +### Task 3: Port Path Helpers, Assets & Offline Skin Engine (`oneclient_common` & `oneclient_core`) + +**Files:** +- Modify: `packages/oneclient_common/src/paths.rs` +- Modify: `packages/oneclient_core/Cargo.toml` +- Copy assets: `packages/oneclient_core/assets/authlib-injector.jar` +- Copy assets: `packages/oneclient_core/assets/offlineskins-fabric.jar` +- Create: `packages/oneclient_core/src/game/skin_server.rs` +- Modify: `packages/oneclient_core/src/game/mod.rs` +- Modify: `packages/oneclient_core/src/game/launch.rs` + +- [ ] **Step 1: Add skin paths and authlib-injector path to `oneclient_common/src/paths.rs`** +- [ ] **Step 2: Copy embedded jar assets and add dependencies to `oneclient_core/Cargo.toml`** +- [ ] **Step 3: Port `skin_server.rs` and register module in `game/mod.rs`** +- [ ] **Step 4: In `game/launch.rs`, inject authlib-injector `-javaagent`, `--userProperties`, and offline skin synchronization** +- [ ] **Step 5: Run `cargo test -p oneclient_core` and verify all tests pass** +- [ ] **Step 6: Commit task 3** + +--- + +### Task 4: Port UI Components, Skins Tab & Auto-Updater (`oneclient_app`) + +**Files:** +- Modify: `packages/oneclient_app/src/constants.rs` +- Modify: `packages/oneclient_app/src/updater.rs` +- Modify: `packages/oneclient_app/src/components/avatar.rs` +- Modify: `packages/oneclient_app/src/components/player_model.rs` +- Modify: `packages/oneclient_app/src/components/navbar/app_navbar.rs` +- Create: `packages/oneclient_app/src/view/app/skins.rs` +- Create: `packages/oneclient_app/src/hooks/queries/skin.rs` +- Modify: `packages/oneclient_app/src/hooks/queries/mod.rs` +- Modify: `packages/oneclient_app/src/hooks/mod.rs` +- Modify: `packages/oneclient_app/src/view/onboarding/account.rs` +- Modify: `packages/oneclient_app/src/view/app/settings/accounts.rs` +- Modify: `packages/oneclient_app/src/layout/root_layout.rs` +- Modify: `packages/oneclient_app/src/routes.rs` + +- [ ] **Step 1: Update `constants.rs` and `updater.rs` with Forgejo releases endpoint and `CrackedVersion` semver parser** +- [ ] **Step 2: Port skin queries in `hooks/queries/skin.rs` and wire into `hooks/mod.rs`** +- [ ] **Step 3: Port `skins.rs` view and register route in `routes.rs` and `root_layout.rs`** +- [ ] **Step 4: Add Skins pill button to `navbar_center` in `app_navbar.rs`** +- [ ] **Step 5: Port avatar persistent cache in `avatar.rs` and player model custom skin loading in `player_model.rs`** +- [ ] **Step 6: Port offline account inputs in onboarding (`onboarding/account.rs`) and settings (`settings/accounts.rs`)** +- [ ] **Step 7: Run `cargo test -p oneclient_app --lib` and verify all tests pass** +- [ ] **Step 8: Commit task 4** + +--- + +### Task 5: Verification, Packaging & Deployment + +- [ ] **Step 1: Run full workspace `cargo check --workspace`** +- [ ] **Step 2: Build release binary locally** +- [ ] **Step 3: Package `.AppImage`, `.deb`, and `.tar.gz` for Linux** +- [ ] **Step 4: Merge `update/2.8.0` into `main`** +- [ ] **Step 5: Tag `v2.8.0-c1` and push branch and tag to Forgejo and GitHub** +- [ ] **Step 6: Publish Forgejo Release `v2.8.0-c1` with all binaries attached** diff --git a/packages/oneclient_app/distribution/linux/oneclient_app.desktop b/packages/oneclient_app/distribution/linux/oneclient_app.desktop new file mode 100644 index 00000000..f02aabbc --- /dev/null +++ b/packages/oneclient_app/distribution/linux/oneclient_app.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=OneClient +Comment=Next-generation open source Minecraft launcher +Exec=/usr/bin/oneclient_app +Icon=oneclient_app +Type=Application +Terminal=false +StartupNotify=true +Categories=Game;ActionGame;AdventureGame;Simulation; +Keywords=mc;minecraft;game; +StartupWMClass=oneclient_app