diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml deleted file mode 100644 index 34e6828..0000000 --- a/.github/workflows/nightly-build.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Nightly Build - -on: - schedule: - - cron: '0 2 * * *' - workflow_dispatch: - -env: - UPSTREAM: https://github.com/Unayung/wallpaper-engine-mac.git - -jobs: - check-version: - runs-on: ubuntu-24.04 - outputs: - sha: ${{ steps.upstream.outputs.sha }} - short: ${{ steps.upstream.outputs.short }} - skip: ${{ steps.check.outputs.skip }} - steps: - - uses: actions/checkout@v4 - - - name: Get latest commit SHA from upstream - id: upstream - run: | - SHA=$(git ls-remote ${{ env.UPSTREAM }} refs/heads/main | cut -f1) - echo "sha=$SHA" >> $GITHUB_OUTPUT - echo "short=${SHA:0:7}" >> $GITHUB_OUTPUT - - - name: Check if already built - id: check - run: | - LAST=$(cat .last-built-sha 2>/dev/null || echo "none") - if [ "$LAST" = "${{ steps.upstream.outputs.sha }}" ]; then - echo "skip=true" >> $GITHUB_OUTPUT - else - echo "skip=false" >> $GITHUB_OUTPUT - fi - - build: - needs: check-version - if: needs.check-version.outputs.skip == 'false' - runs-on: macos-14 - - steps: - - name: Clone upstream - run: | - git clone ${{ env.UPSTREAM }} repo - cd repo && git checkout ${{ needs.check-version.outputs.sha }} - - - name: Archive - run: | - xcodebuild archive \ - -project "repo/Open Wallpaper Engine.xcodeproj" \ - -scheme "Open Wallpaper Engine" \ - -destination "platform=macOS" \ - -archivePath "$RUNNER_TEMP/OpenWallpaperEngine.xcarchive" \ - CODE_SIGN_IDENTITY="" \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGNING_ALLOWED=NO - - - name: Bundle DepotDownloader into .app - run: | - APP=$(find "$RUNNER_TEMP/OpenWallpaperEngine.xcarchive/Products" -name "*.app" | head -1) - LATEST=$(curl -s -H "Authorization: Bearer ${{ github.token }}" \ - https://api.github.com/repos/SteamRE/DepotDownloader/releases/latest \ - | jq -r '.tag_name') - if [ -z "$LATEST" ] || [ "$LATEST" = "null" ]; then - echo "Failed to resolve latest DepotDownloader tag"; exit 1 - fi - echo "Bundling DepotDownloader $LATEST" - for ARCH in arm64 x64; do - DIR="$APP/Contents/Resources/depotdownloader/$ARCH" - mkdir -p "$DIR" - curl -sL "https://github.com/SteamRE/DepotDownloader/releases/download/${LATEST}/DepotDownloader-macos-${ARCH}.zip" \ - -o "/tmp/depot_${ARCH}.zip" - unzip -q "/tmp/depot_${ARCH}.zip" -d "$DIR" - chmod +x "$DIR/DepotDownloader" - done - - - name: Ad-hoc sign - run: | - APP=$(find "$RUNNER_TEMP/OpenWallpaperEngine.xcarchive/Products" -name "*.app" | head -1) - codesign --force --deep --sign - "$APP" - - - name: Package .app - run: | - APP=$(find "$RUNNER_TEMP/OpenWallpaperEngine.xcarchive/Products" -name "*.app" | head -1) - ditto -c -k --keepParent "$APP" \ - "Open-Wallpaper-Engine-macos-${{ needs.check-version.outputs.short }}.zip" - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: app-${{ needs.check-version.outputs.short }} - path: Open-Wallpaper-Engine-macos-${{ needs.check-version.outputs.short }}.zip - - release: - needs: [check-version, build] - runs-on: ubuntu-24.04 - permissions: - contents: write - - steps: - - uses: actions/checkout@v4 - - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: app-${{ needs.check-version.outputs.short }} - - - name: Create Release - uses: softprops/action-gh-release@v2 - with: - tag_name: nightly-${{ needs.check-version.outputs.short }} - name: "Nightly ${{ needs.check-version.outputs.short }}" - prerelease: true - body: | - Auto nightly build from [Unayung/wallpaper-engine-mac@${{ needs.check-version.outputs.sha }}](https://github.com/Unayung/wallpaper-engine-mac/commit/${{ needs.check-version.outputs.sha }}) - - > ℹ️ Ad-hoc 簽署版本(未經 Apple 公證),首次開啟方式: - > - **macOS 15 Sequoia+**:嘗試開啟後,前往「系統設定 → 隱私權與安全性」,點「仍要開啟」(Open Anyway) - > - **macOS 14 Sonoma 以下**:右鍵 → 開啟(Open) - > - **終端機(任何版本)**:`xattr -rd com.apple.quarantine /Applications/Open\ Wallpaper\ Engine.app` - files: "*.zip" - - - name: Save built SHA - run: | - echo "${{ needs.check-version.outputs.sha }}" > .last-built-sha - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add .last-built-sha - git commit -m "chore: built ${{ needs.check-version.outputs.short }}" - git push diff --git a/.last-built-sha b/.last-built-sha deleted file mode 100644 index c57229b..0000000 --- a/.last-built-sha +++ /dev/null @@ -1 +0,0 @@ -aa29a89e627b2fb173bacbac3099cfa6ba411c04 diff --git a/README.ja.md b/README.ja.md index 740b2cb..87d7c92 100644 --- a/README.ja.md +++ b/README.ja.md @@ -1,155 +1,58 @@ -Open Wallpaper Engine(パッチ版) +Open Wallpaper Engine ========= -[English](README.md) | [繁體中文](README.zh-TW.md) | **日本語** +[English](README.md) | [繁體中文](README.tw.md) | **日本語** [![GitHub license](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](LICENSE) -[Open Wallpaper Engine](https://github.com/MrWindDog/wallpaper-engine-mac) のパッチフォークです。macOS 向けにシーン壁紙のレンダリングと Web 壁紙の修正を追加しています。 +Steam Workshop の壁紙を表示できる macOS アプリです。 -> **注意:** 本プロジェクトは Steam の商用版 Wallpaper Engine とは無関係です。Steam Workshop の壁紙アセットを表示できるオープンソースの macOS アプリケーションです。 - -## 関連プロジェクト - -- **[Open Wallpaper Engine for Linux](https://github.com/Unayung/simple-linux-wallpaperengine-gui)** — [linux-wallpaperengine](https://github.com/Almamu/linux-wallpaperengine) 向けの PyQt6 GUI。Steam Workshop 統合と UI デザインは本 macOS バージョンから移植されました。 - -## クレジット - -本プロジェクトは以下の貢献者の成果に基づいています: - -- **[MrWindDog](https://github.com/MrWindDog)** — 上流 [wallpaper-engine-mac](https://github.com/MrWindDog/wallpaper-engine-mac) フォークのメンテナー、新機能と UI 改善を追加 -- **[Haren Chen](https://github.com/haren724)** — [open-wallpaper-engine-mac](https://github.com/haren724/open-wallpaper-engine-mac) のオリジナル作者、コアアーキテクチャを構築(SwiftUI、動画壁紙再生、インポートシステム、プレイリスト UI) -- **[1ris_W](https://github.com/Erica-Iris)** — 中国語 i18n 翻訳 -- **[Klaus Zhu](https://github.com/klauszhu1105)** — アプリロゴアイコン -- **[Chen Chia Yang](https://github.com/Unayung)** — シーン壁紙レンダリング、Web 壁紙修正、Steam Workshop 統合、マルチディスプレイ対応、Zip インポート - -[GPL-3.0](LICENSE) ライセンス(オリジナルプロジェクトと同一)。 - -## 0.8.0 の新機能 - -### マルチディスプレイ対応 -接続された各モニターに異なる壁紙を割り当て、画面ごとに有効/無効を制御できます。 -- **ディスプレイ設定パネル** — 接続されたすべての画面をビジュアルレイアウトで表示、クリックで選択 -- **画面ごとの壁紙** — 各ディスプレイで異なる壁紙を独立して表示 -- **有効/無効トグル** — モニターごとに壁紙のオン/オフを切り替え -- **自動検出** — 新しいモニターは接続時に自動的に検出・有効化 - -### マルチデスクトップ対応 -壁紙がすべての macOS デスクトップ(Spaces)で連続再生されるようになりました。デスクトップ切り替え時も中断しません。 - -### 最近使った壁紙メニュー -ステータスバーメニューから壁紙を素早く切り替えられます。最近使用した10件の壁紙にワンクリックでアクセスできます。 - -### 再生設定 — 修正済み -パフォーマンス再生設定(他のアプリがフォーカスされた時の一時停止/ミュート/停止)がすべての壁紙タイプで正しく動作するようになりました。 - -### Steam Workshop ブラウザ -アプリ内から直接 Steam Workshop の壁紙を閲覧、検索、ダウンロードできます。 -- **検索とフィルター** — 名前で検索、コンテンツレーティング(Everyone/Questionable/Mature)、タイプ(Scene/Video/Web)、ジャンルタグでフィルター -- **ソートオプション** — トレンド、最新、人気順、サブスクライブ数順 -- **steamcmd 統合** — steamcmd を自動検出(Homebrew またはカスタムパス)、未インストール時はインストール手順を表示 -- **Steam ログイン** — パスワード、Steam Guard、キャッシュセッション認証に対応 -- **ダウンロード進捗表示** — リアルタイムステータス更新(認証中、ダウンロード %、検証、コピー中) -- **安全なデフォルト** — コンテンツレーティングを「Everyone」に設定し、成人向けコンテンツをフィルタリング - -### Zip インポート -`.zip` ファイルから壁紙パッケージを直接インポート。手動解凍は不要です。ファイル > インポートおよびドラッグ&ドロップに対応。 - -### 複数選択と一括解除 -Cmd+クリックで複数の壁紙を選択し、右クリックで一括サブスクライブ解除。 - -### 壁紙ストレージの分離 -壁紙は `~/Documents/Open Wallpaper Engine/` に保存されるようになり、Documents ディレクトリを直接使用しなくなりました。リポジトリをクローンした際の「error」壁紙を防止します。 - -## パッチ内容 - -### Web 壁紙 — グレー/空白レンダリングの修正 -WebGL ベースの壁紙は `WKWebView` がローカルファイルアクセスをブロックしていたため、グレーの矩形として表示されていました。 - -**修正:** WKWebView 設定で `allowFileAccessFromFileURLs` と `allowUniversalAccessFromFileURLs` を有効にし、WebGL シェーダーがローカルテクスチャファイルを読み込めるようにしました。 - -### シーン壁紙 — ゼロから実装 -シーン壁紙(Steam Workshop で最も一般的なタイプ)は完全に未実装で、「Hello, World!」のみ表示されていました。 - -**新しい実装:** -- **PKG パーサー** — Wallpaper Engine の PKGV アーカイブ形式を読み取り、scene.json、モデル、マテリアル、テクスチャを抽出 -- **TEX パーサー** — TEXV0005 テクスチャコンテナを読み取り、TEXI/TEXB セクションから埋め込み JPEG/PNG 画像を抽出 -- **Scene JSON デコーダー** — scene.json を解析、ポリモーフィックフィールド(値がプレーンタイプまたは `{"script":..,"value":..}` オブジェクト)を柔軟に処理 -- **SpriteKit レンダラー** — シーン画像レイヤーを SKSpriteNode としてレンダリング、位置、サイズ、アルファ、カラーティント、ブレンドモードを正確に処理 -- **プレビューフォールバック** — テクスチャを抽出できない場合は preview.jpg/png/gif にフォールバック -- **TEXI 形式検出** — デコードできない DXT 圧縮テクスチャを迅速に識別してスキップ - -### インポート — フォルダインポートの修正 -インポートパネルが個別の壁紙フォルダと複数の壁紙を含む親ディレクトリの両方を正しく処理するようになりました。 - -## 現在の制限事項 - -- **DXT テクスチャ** — DXT1/DXT5 圧縮テクスチャ(TEXI 形式 4/7/8)を使用する壁紙はレンダリングできません。ソフトウェアデコンプレッサーまたは Metal ベースのレンダリングが必要な GPU ネイティブ圧縮形式です。プレビュー画像にフォールバックします。 -- **パーティクルエフェクト** — シーンパーティクルシステム(雨、雪、スパークル)は解析されますが、視覚的な問題を避けるためレンダリングで無効化されています。 -- **オーディオリアクティブスクリプト** — Wallpaper Engine の JavaScript ベースのオーディオ視覚化スクリプトは実行されません。スクリプト付きプロパティは静的な `value` にフォールバックします。 -- **シェーダーエフェクト** — カスタム GLSL シェーダー(ブルーム、ブラー、カラー補正)は適用されません。 -- **カメラパララックス** — マウス追従カメラ移動は未実装です。 -- **アニメーションシーン** — スプライトアニメーションとタイムラインベースのオブジェクトアニメーションはサポートされていません。 -- **一部の JPEG サムネイル** — 少数の TEXB 形式 1 ファイルに macOS がデコードできない非標準 JPEG データが含まれています。 +> Steam の商用版 Wallpaper Engine とは無関係です。 ## サポートされている壁紙タイプ | タイプ | ステータス | |--------|------------| -| 動画 (.mp4, .webm) | 動作中(オリジナル) | -| Web (HTML/WebGL) | 動作中(パッチ済み) | -| シーン(静的画像) | 動作中(新機能) | -| シーン(パーティクル) | 部分対応(無効化) | -| シーン(DXT テクスチャ) | プレビューフォールバック | -| アプリケーション | 未サポート | +| 動画 (.mp4, .webm) | ✅ | +| Web (HTML/WebGL) | ✅ | +| シーン(静的) | ✅ | +| シーン(パーティクル) | ⚠️ 部分対応 | +| シーン(DXT テクスチャ) | ⚠️ プレビューのみ | +| アプリケーション | ❌ | ## ソースからビルド -### 前提条件 -- macOS >= 13.0 -- Xcode >= 14.4 -- Xcode Command Line Tools +**必要環境:** macOS 13.0+、Xcode 14.4+ -### 手順 ```sh -git clone https://github.com/unayung/wallpaper-engine-mac -cd wallpaper-engine-mac +git clone https://github.com/parrotxray/mac-wallpaperengine +cd mac-wallpaperengine open "Open Wallpaper Engine.xcodeproj" ``` -Xcode で署名証明書を自分のものに変更するか「Sign to Run Locally」を選択し、`Cmd + R` でビルド・実行します。 +Xcode で署名を自分の証明書または「Sign to Run Locally」に設定し、`Cmd + R` で実行します。 ## 使い方 -### Steam Workshop から閲覧・ダウンロード +### 壁紙のインポート -1. steamcmd をインストール(`brew install steamcmd`)するか、既存のバイナリを指定 -2. **Workshop** タブに切り替え、Steam アカウントでログイン(Wallpaper Engine の所有が必要) -3. プロンプトが表示されたら [Steam Web API キー](https://steamcommunity.com/dev/apikey) を入力 -4. 検索、フィルターし、**Download** をクリックして壁紙をダウンロード +- **フォルダ:** ファイル > フォルダからインポート +- **Zip:** ファイル > インポート、またはドラッグ&ドロップ +- **手動:** 壁紙フォルダを `~/Documents/Open Wallpaper Engine/` にコピー -### ローカルファイルからインポート +### Steam Workshop -- **フォルダ:** ファイル > フォルダからインポート — `project.json` を含む壁紙フォルダを選択 -- **Zip:** ファイル > インポート またはドラッグ&ドロップで `.zip` ファイルを読み込み -- **手動:** 壁紙フォルダを `~/Documents/Open Wallpaper Engine/` に直接コピー +1. steamcmd をインストール:`brew install steamcmd` +2. **Workshop** タブを開き、Steam アカウントでログイン(Wallpaper Engine の所有が必要) +3. [Steam Web API キー](https://steamcommunity.com/dev/apikey) を入力 +4. 壁紙を検索して直接ダウンロード -## 変更ファイル(上流との差分) +## クレジット -**変更:** -- `WebWallpaperView.swift` — WKWebView ファイルアクセス設定 -- `WallpaperView.swift` — シーン壁紙ディスパッチ -- `SceneWallpaperView.swift` — SpriteKit NSViewRepresentable に書き換え -- `ImportPanels.swift` — フォルダインポートロジック修正 +- **[MrWindDog](https://github.com/MrWindDog)** — 上流フォークメンテナー +- **[Haren Chen](https://github.com/haren724)** — オリジナル作者 +- **[1ris_W](https://github.com/Erica-Iris)** — 中国語 i18n +- **[Klaus Zhu](https://github.com/klauszhu1105)** — アプリアイコン +- **[Chen Chia Yang](https://github.com/Unayung)** — シーンレンダリング、Workshop 統合、マルチディスプレイ対応 -**追加:** -- `Services/SceneParsers/PKGParser.swift` — PKGV アーカイブパーサー -- `Services/SceneParsers/TEXParser.swift` — TEXV テクスチャパーサー -- `Services/SceneParsers/SceneModels.swift` — Scene JSON データモデル -- `Services/SceneWallpaperViewModel.swift` — シーン読み込みと SpriteKit レンダリング -- `Services/SteamCmdService.swift` — steamcmd 検出、ログイン、Workshop ダウンロード -- `Services/WorkshopAPIService.swift` — Steam Web API クライアント -- `Services/WorkshopViewModel.swift` — Workshop ブラウザ状態管理 -- `Services/WallpaperDirectory.swift` — 集中壁紙ストレージパス -- `Services/ZipImporter.swift` — Zip ファイル解凍とインポート -- `ContentView/Components/WorkshopView.swift` — Workshop ブラウザ UI +[GPL-3.0](LICENSE) ライセンス。 \ No newline at end of file diff --git a/README.md b/README.md index 9723434..172783a 100644 --- a/README.md +++ b/README.md @@ -1,155 +1,58 @@ -Open Wallpaper Engine (Patched) +Open Wallpaper Engine ========= -**English** | [繁體中文](README.zh-TW.md) | [日本語](README.ja.md) +**English** | [繁體中文](README.tw.md) | [日本語](README.ja.md) [![GitHub license](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](LICENSE) -A patched fork of [Open Wallpaper Engine](https://github.com/MrWindDog/wallpaper-engine-mac) for macOS, adding scene wallpaper rendering and web wallpaper fixes. +A macOS app that displays wallpapers from the Steam Workshop. -> **Note:** This is NOT affiliated with the commercial Wallpaper Engine on Steam. This is an open-source macOS app that can display wallpaper assets from Wallpaper Engine's Steam Workshop. - -## Related Projects - -- **[Open Wallpaper Engine for Linux](https://github.com/Unayung/simple-linux-wallpaperengine-gui)** — A PyQt6 GUI for [linux-wallpaperengine](https://github.com/Almamu/linux-wallpaperengine), with Steam Workshop integration and UI design ported from this macOS version. - -## Credits - -This project is built on top of the work of: - -- **[MrWindDog](https://github.com/MrWindDog)** — Maintainer of the upstream [wallpaper-engine-mac](https://github.com/MrWindDog/wallpaper-engine-mac) fork, added new features and UI refinements -- **[Haren Chen](https://github.com/haren724)** — Original creator of [open-wallpaper-engine-mac](https://github.com/haren724/open-wallpaper-engine-mac), built the core app architecture (SwiftUI, video wallpaper playback, import system, playlist UI) -- **[1ris_W](https://github.com/Erica-Iris)** — Chinese i18n translation -- **[Klaus Zhu](https://github.com/klauszhu1105)** — App logo icons -- **[Chen Chia Yang](https://github.com/Unayung)** — Scene wallpaper rendering, web wallpaper fixes, Steam Workshop integration, multi-display support, zip import - -Licensed under [GPL-3.0](LICENSE), same as the original project. - -## What's New in 0.8.0 - -### Multi-Display Support -Assign different wallpapers to each connected monitor with per-screen enable/disable control. -- **Display Settings panel** — Visual monitor layout showing all connected screens, click to select -- **Per-screen wallpaper** — Each display can show a different wallpaper independently -- **Enable/disable toggle** — Turn wallpaper on or off per monitor -- **Auto-detect** — New monitors are automatically detected and enabled when connected - -### Multi-Desktop Support -Wallpapers now display across all macOS desktops (Spaces) with continuous playback — no interruption when switching desktops. - -### Recent Wallpapers Menu -Quickly switch wallpapers from the status bar menu. The last 10 wallpapers you've used are listed for one-click access. - -### Playback Settings — Fixed -Performance playback settings (pause/mute/stop when other apps are focused) now work correctly for all wallpaper types. - -### Steam Workshop Browser -Browse, search, and download wallpapers directly from the Steam Workshop without leaving the app. -- **Search & filter** — Search by name, filter by content rating (Everyone/Questionable/Mature), type (Scene/Video/Web), and genre tags -- **Sort options** — Trending, Most Recent, Most Popular, Most Subscribed -- **steamcmd integration** — Auto-detects steamcmd (Homebrew or custom path), with install instructions if not found -- **Steam login** — Supports password, Steam Guard, and cached session authentication -- **Download with progress** — Real-time status updates during download (authenticating, downloading %, validating, copying) -- **Safe defaults** — Content rating defaults to "Everyone" to filter out mature content - -### Zip Import -Import wallpaper packages directly from `.zip` files — no need to manually extract first. Works via File > Import and drag-and-drop. - -### Multi-Select & Batch Unsubscribe -Cmd+click to select multiple wallpapers, then right-click to batch unsubscribe. - -### Wallpaper Storage Isolation -Wallpapers are now stored in `~/Documents/Open Wallpaper Engine/` instead of the raw Documents directory, preventing "error" wallpapers when cloning the repo on a fresh machine. - -## What's Patched - -### Web Wallpapers — Fixed gray/blank rendering -WebGL-based wallpapers rendered as gray rectangles because `WKWebView` blocked local file access for textures and assets. - -**Fix:** Enabled `allowFileAccessFromFileURLs` and `allowUniversalAccessFromFileURLs` on the WKWebView configuration, allowing WebGL shaders to load local texture files. - -### Scene Wallpapers — Implemented from scratch -Scene wallpapers (the most common type on Steam Workshop) were completely unimplemented — just showed "Hello, World!". - -**New implementation includes:** -- **PKG parser** — Reads Wallpaper Engine's PKGV archive format to extract scene.json, models, materials, and textures -- **TEX parser** — Reads TEXV0005 texture containers, extracts embedded JPEG/PNG image data from TEXI/TEXB sections -- **Scene JSON decoder** — Parses scene.json with flexible decoding that handles Wallpaper Engine's polymorphic fields (values can be plain types or `{"script":..,"value":..}` objects) -- **SpriteKit renderer** — Renders scene image layers as SKSpriteNodes with correct positioning, sizing, alpha, color tinting, and blend modes -- **Preview fallback** — Falls back to preview.jpg/png/gif when textures can't be extracted -- **TEXI format detection** — Quickly identifies and skips DXT-compressed textures that can't be decoded - -### Import — Fixed folder import -The import panel now correctly handles both individual wallpaper folders and parent directories containing multiple wallpapers. - -## Current Limitations - -- **DXT textures** — Wallpapers using DXT1/DXT5 compressed textures (TEXI format 4/7/8) cannot be rendered. These are GPU-native compressed formats that require either a software decompressor or Metal-based rendering. The app falls back to the preview image for these wallpapers. -- **Particle effects** — Scene particle systems (rain, snow, sparkles) are parsed but disabled in rendering to avoid visual artifacts. The particle mapping code exists but needs refinement. -- **Audio-reactive scripts** — Wallpaper Engine's JavaScript-based audio visualization scripts are not executed. Properties with scripts fall back to their static `value`. -- **Shader effects** — Custom GLSL shaders (bloom, blur, color correction) are not applied. -- **Camera parallax** — Mouse-tracking camera movement is not implemented. -- **Animated scenes** — Sprite animations and timeline-based object animations are not supported. -- **Some JPEG thumbnails** — A small number of TEXB format 1 files contain non-standard JPEG data that macOS cannot decode. These are typically DXT-compressed textures misidentified as format 1. +> Not affiliated with the commercial Wallpaper Engine on Steam. ## Supported Wallpaper Types | Type | Status | |------|--------| -| Video (.mp4, .webm) | Working (original) | -| Web (HTML/WebGL) | Working (patched) | -| Scene (static images) | Working (new) | -| Scene (particles) | Partial (disabled) | -| Scene (DXT textures) | Preview fallback | -| Application | Not supported | +| Video (.mp4, .webm) | ✅ | +| Web (HTML/WebGL) | ✅ | +| Scene (static) | ✅ | +| Scene (particles) | ⚠️ Partial | +| Scene (DXT textures) | ⚠️ Preview only | +| Application | ❌ | ## Build from Source -### Prerequisites -- macOS >= 13.0 -- Xcode >= 14.4 -- Xcode Command Line Tools +**Requirements:** macOS 13.0+, Xcode 14.4+ -### Steps ```sh -git clone https://github.com/unayung/wallpaper-engine-mac -cd wallpaper-engine-mac +git clone https://github.com/parrotxray/mac-wallpaperengine +cd mac-wallpaperengine open "Open Wallpaper Engine.xcodeproj" ``` -In Xcode, change the signing certificate to your own or select "Sign to Run Locally", then press `Cmd + R` to build and run. +In Xcode, set signing to your own certificate or "Sign to Run Locally", then press `Cmd + R`. ## Usage -### Browse & Download from Steam Workshop +### Import Wallpapers -1. Install steamcmd (`brew install steamcmd`) or point the app to an existing binary -2. Switch to the **Workshop** tab and log in with your Steam account (must own Wallpaper Engine) +- **Folder:** File > Import from Folder +- **Zip:** File > Import or drag-and-drop a `.zip` file +- **Manual:** Copy wallpaper folders into `~/Documents/Open Wallpaper Engine/` + +### Steam Workshop + +1. Install steamcmd: `brew install steamcmd` +2. Open the **Workshop** tab and log in with your Steam account (must own Wallpaper Engine) 3. Enter a [Steam Web API key](https://steamcommunity.com/dev/apikey) when prompted -4. Search, filter, and click **Download** on any wallpaper +4. Search and download wallpapers directly -### Import from Local Files +## Credits -- **Folder:** File > Import from Folder — select wallpaper folders containing `project.json` -- **Zip:** File > Import or drag-and-drop a `.zip` file containing wallpaper packages -- **Manual:** Copy wallpaper folders directly into `~/Documents/Open Wallpaper Engine/` +- **[MrWindDog](https://github.com/MrWindDog)** — Upstream fork maintainer +- **[Haren Chen](https://github.com/haren724)** — Original app creator +- **[1ris_W](https://github.com/Erica-Iris)** — Chinese i18n +- **[Klaus Zhu](https://github.com/klauszhu1105)** — App icon +- **[Chen Chia Yang](https://github.com/Unayung)** — Scene rendering, Workshop integration, multi-display support -## Files Changed (vs upstream) - -**Modified:** -- `WebWallpaperView.swift` — WKWebView file access configuration -- `WallpaperView.swift` — Scene wallpaper dispatch -- `SceneWallpaperView.swift` — Rewritten as SpriteKit NSViewRepresentable -- `ImportPanels.swift` — Folder import logic fix - -**Added:** -- `Services/SceneParsers/PKGParser.swift` — PKGV archive parser -- `Services/SceneParsers/TEXParser.swift` — TEXV texture parser -- `Services/SceneParsers/SceneModels.swift` — Scene JSON data models -- `Services/SceneWallpaperViewModel.swift` — Scene loading and SpriteKit rendering -- `Services/SteamCmdService.swift` — steamcmd detection, login, and workshop download -- `Services/WorkshopAPIService.swift` — Steam Web API client for workshop browsing -- `Services/WorkshopViewModel.swift` — Workshop browser state management -- `Services/WallpaperDirectory.swift` — Centralized wallpaper storage path -- `Services/ZipImporter.swift` — Zip file extraction and import -- `ContentView/Components/WorkshopView.swift` — Workshop browser UI +Licensed under [GPL-3.0](LICENSE). \ No newline at end of file diff --git a/README.tw.md b/README.tw.md new file mode 100644 index 0000000..d542b51 --- /dev/null +++ b/README.tw.md @@ -0,0 +1,58 @@ +Open Wallpaper Engine +========= + +[English](README.md) | **繁體中文** | [日本語](README.ja.md) + +[![GitHub license](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](LICENSE) + +一款可顯示 Steam 創意工坊桌布的 macOS 應用程式。 + +> 本專案與 Steam 上的商業版 Wallpaper Engine 無關。 + +## 支援的桌布類型 + +| 類型 | 狀態 | +|------|------| +| 影片 (.mp4, .webm) | ✅ | +| 網頁 (HTML/WebGL) | ✅ | +| 場景(靜態) | ✅ | +| 場景(粒子) | ⚠️ 部分支援 | +| 場景(DXT 紋理) | ⚠️ 僅顯示預覽 | +| 應用程式 | ❌ | + +## 從原始碼建置 + +**需求:** macOS 13.0+、Xcode 14.4+ + +```sh +git clone https://github.com/parrotxray/mac-wallpaperengine +cd mac-wallpaperengine +open "Open Wallpaper Engine.xcodeproj" +``` + +在 Xcode 中將簽署設為自己的憑證或選擇「Sign to Run Locally」,然後按 `Cmd + R` 執行。 + +## 使用方式 + +### 匯入桌布 + +- **資料夾:** 檔案 > 從資料夾匯入 +- **Zip:** 檔案 > 匯入,或直接拖放 `.zip` 檔案 +- **手動:** 將桌布資料夾複製到 `~/Documents/Open Wallpaper Engine/` + +### Steam 創意工坊 + +1. 安裝 steamcmd:`brew install steamcmd` +2. 開啟 **Workshop** 分頁,使用 Steam 帳號登入(須擁有 Wallpaper Engine) +3. 輸入 [Steam Web API 金鑰](https://steamcommunity.com/dev/apikey) +4. 搜尋並直接下載桌布 + +## 致謝 + +- **[MrWindDog](https://github.com/MrWindDog)** — 上游分支維護者 +- **[Haren Chen](https://github.com/haren724)** — 原始應用程式作者 +- **[1ris_W](https://github.com/Erica-Iris)** — 中文 i18n +- **[Klaus Zhu](https://github.com/klauszhu1105)** — 應用程式圖示 +- **[Chen Chia Yang](https://github.com/Unayung)** — 場景渲染、創意工坊整合、多螢幕支援 + +採用 [GPL-3.0](LICENSE) 授權。 \ No newline at end of file diff --git a/README.zh-TW.md b/README.zh-TW.md deleted file mode 100644 index 1c0b062..0000000 --- a/README.zh-TW.md +++ /dev/null @@ -1,155 +0,0 @@ -Open Wallpaper Engine(修補版) -========= - -[English](README.md) | **繁體中文** | [日本語](README.ja.md) - -[![GitHub license](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](LICENSE) - -基於 [Open Wallpaper Engine](https://github.com/MrWindDog/wallpaper-engine-mac) 的修補分支,為 macOS 加入場景桌布渲染與網頁桌布修復。 - -> **注意:** 本專案與 Steam 上的商業版 Wallpaper Engine 無關。這是一個開源的 macOS 應用程式,可顯示來自 Wallpaper Engine Steam 創意工坊的桌布素材。 - -## 相關專案 - -- **[Open Wallpaper Engine for Linux](https://github.com/Unayung/simple-linux-wallpaperengine-gui)** — 基於 [linux-wallpaperengine](https://github.com/Almamu/linux-wallpaperengine) 的 PyQt6 圖形介面,Steam 工作坊整合與 UI 設計移植自本 macOS 版本。 - -## 致謝 - -本專案建立於以下貢獻者的成果之上: - -- **[MrWindDog](https://github.com/MrWindDog)** — 上游 [wallpaper-engine-mac](https://github.com/MrWindDog/wallpaper-engine-mac) 分支的維護者,新增功能與 UI 優化 -- **[Haren Chen](https://github.com/haren724)** — [open-wallpaper-engine-mac](https://github.com/haren724/open-wallpaper-engine-mac) 原作者,建構核心架構(SwiftUI、影片桌布播放、匯入系統、播放清單 UI) -- **[1ris_W](https://github.com/Erica-Iris)** — 中文 i18n 翻譯 -- **[Klaus Zhu](https://github.com/klauszhu1105)** — 應用程式圖示 -- **[Chen Chia Yang](https://github.com/Unayung)** — 場景桌布渲染、網頁桌布修復、Steam 創意工坊整合、多螢幕支援、Zip 匯入 - -採用 [GPL-3.0](LICENSE) 授權,與原始專案相同。 - -## 0.8.0 新功能 - -### 多螢幕支援 -為每個連接的螢幕指定不同的桌布,並可個別啟用或停用。 -- **顯示器設定面板** — 以視覺化佈局顯示所有連接的螢幕,點擊選取 -- **個別螢幕桌布** — 每個螢幕可獨立顯示不同的桌布 -- **啟用/停用切換** — 可針對每個螢幕開啟或關閉桌布 -- **自動偵測** — 新連接的螢幕會自動偵測並啟用 - -### 多桌面支援 -桌布現在可在所有 macOS 桌面(空間)上顯示並持續播放,切換桌面時不會中斷。 - -### 最近使用的桌布選單 -可從狀態列選單快速切換桌布。最近使用的 10 個桌布可一鍵存取。 - -### 播放設定 — 已修復 -效能播放設定(切換應用程式時暫停/靜音/停止)現在對所有桌布類型均可正常運作。 - -### Steam 創意工坊瀏覽器 -直接在應用程式內瀏覽、搜尋及下載 Steam 創意工坊的桌布。 -- **搜尋與篩選** — 依名稱搜尋,依內容分級(Everyone/Questionable/Mature)、類型(Scene/Video/Web)及風格標籤篩選 -- **排序選項** — 熱門趨勢、最新發布、最受歡迎、最多訂閱 -- **steamcmd 整合** — 自動偵測 steamcmd(Homebrew 或自訂路徑),未安裝時提供安裝指引 -- **Steam 登入** — 支援密碼、Steam Guard 及快取 Session 驗證 -- **下載進度顯示** — 即時狀態更新(驗證中、下載百分比、驗證、複製中) -- **安全預設** — 內容分級預設為「Everyone」,過濾成人內容 - -### Zip 匯入 -直接匯入 `.zip` 桌布套件,無需手動解壓縮。支援 檔案 > 匯入 及拖放操作。 - -### 多選與批次取消訂閱 -Cmd+點擊選取多個桌布,右鍵選擇批次取消訂閱。 - -### 桌布儲存隔離 -桌布現在儲存在 `~/Documents/Open Wallpaper Engine/`,不再使用原始 Documents 目錄,避免克隆專案時出現「error」桌布。 - -## 修補內容 - -### 網頁桌布 — 修復灰色/空白渲染 -基於 WebGL 的桌布因 `WKWebView` 阻擋本地檔案存取而顯示為灰色方塊。 - -**修復:** 在 WKWebView 設定中啟用 `allowFileAccessFromFileURLs` 和 `allowUniversalAccessFromFileURLs`,允許 WebGL 著色器載入本地紋理檔案。 - -### 場景桌布 — 從零開始實作 -場景桌布(Steam 創意工坊最常見的類型)原本完全未實作——僅顯示「Hello, World!」。 - -**新實作包括:** -- **PKG 解析器** — 讀取 Wallpaper Engine 的 PKGV 封存格式,提取 scene.json、模型、材質和紋理 -- **TEX 解析器** — 讀取 TEXV0005 紋理容器,從 TEXI/TEXB 區段提取嵌入的 JPEG/PNG 圖片 -- **Scene JSON 解碼器** — 解析 scene.json,靈活處理多態欄位(值可為純類型或 `{"script":..,"value":..}` 物件) -- **SpriteKit 渲染器** — 將場景圖層渲染為 SKSpriteNode,正確處理定位、尺寸、透明度、色彩調整和混合模式 -- **預覽回退** — 無法提取紋理時回退至 preview.jpg/png/gif -- **TEXI 格式偵測** — 快速識別並跳過無法解碼的 DXT 壓縮紋理 - -### 匯入 — 修復資料夾匯入 -匯入面板現在可正確處理單一桌布資料夾和包含多個桌布的父目錄。 - -## 目前限制 - -- **DXT 紋理** — 使用 DXT1/DXT5 壓縮紋理(TEXI 格式 4/7/8)的桌布無法渲染。這些是需要軟體解壓縮器或 Metal 渲染的 GPU 原生壓縮格式。此類桌布會回退至預覽圖。 -- **粒子效果** — 場景粒子系統(雨、雪、閃光)已解析但在渲染中停用,以避免視覺問題。 -- **音訊互動腳本** — Wallpaper Engine 基於 JavaScript 的音訊視覺化腳本不會執行。帶腳本的屬性回退至靜態 `value`。 -- **著色器效果** — 自定義 GLSL 著色器(泛光、模糊、色彩校正)未套用。 -- **相機視差** — 滑鼠追蹤相機移動未實作。 -- **動畫場景** — 精靈動畫和基於時間軸的物件動畫不支援。 -- **部分 JPEG 縮圖** — 少數 TEXB 格式 1 檔案包含 macOS 無法解碼的非標準 JPEG 資料。 - -## 支援的桌布類型 - -| 類型 | 狀態 | -|------|------| -| 影片 (.mp4, .webm) | 正常運作(原始) | -| 網頁 (HTML/WebGL) | 正常運作(已修補) | -| 場景(靜態圖片) | 正常運作(新功能) | -| 場景(粒子) | 部分支援(已停用) | -| 場景(DXT 紋理) | 預覽回退 | -| 應用程式 | 不支援 | - -## 從原始碼建置 - -### 前置需求 -- macOS >= 13.0 -- Xcode >= 14.4 -- Xcode Command Line Tools - -### 步驟 -```sh -git clone https://github.com/unayung/wallpaper-engine-mac -cd wallpaper-engine-mac -open "Open Wallpaper Engine.xcodeproj" -``` - -在 Xcode 中,將簽署憑證更改為您自己的或選擇「Sign to Run Locally」,然後按 `Cmd + R` 建置並執行。 - -## 使用方式 - -### 從 Steam 創意工坊瀏覽與下載 - -1. 安裝 steamcmd(`brew install steamcmd`)或指向現有的二進位檔 -2. 切換到 **Workshop** 分頁,使用 Steam 帳號登入(必須擁有 Wallpaper Engine) -3. 出現提示時輸入 [Steam Web API 金鑰](https://steamcommunity.com/dev/apikey) -4. 搜尋、篩選,然後點擊 **Download** 下載桌布 - -### 從本地檔案匯入 - -- **資料夾:** 檔案 > 從資料夾匯入——選擇包含 `project.json` 的桌布資料夾 -- **Zip:** 檔案 > 匯入 或拖放包含桌布套件的 `.zip` 檔案 -- **手動:** 直接將桌布資料夾複製到 `~/Documents/Open Wallpaper Engine/` - -## 變更的檔案(相對上游) - -**修改:** -- `WebWallpaperView.swift` — WKWebView 檔案存取設定 -- `WallpaperView.swift` — 場景桌布分派 -- `SceneWallpaperView.swift` — 改寫為 SpriteKit NSViewRepresentable -- `ImportPanels.swift` — 資料夾匯入邏輯修復 - -**新增:** -- `Services/SceneParsers/PKGParser.swift` — PKGV 封存解析器 -- `Services/SceneParsers/TEXParser.swift` — TEXV 紋理解析器 -- `Services/SceneParsers/SceneModels.swift` — Scene JSON 資料模型 -- `Services/SceneWallpaperViewModel.swift` — 場景載入與 SpriteKit 渲染 -- `Services/SteamCmdService.swift` — steamcmd 偵測、登入與創意工坊下載 -- `Services/WorkshopAPIService.swift` — Steam Web API 客戶端 -- `Services/WorkshopViewModel.swift` — 創意工坊瀏覽器狀態管理 -- `Services/WallpaperDirectory.swift` — 集中式桌布儲存路徑 -- `Services/ZipImporter.swift` — Zip 檔案解壓與匯入 -- `ContentView/Components/WorkshopView.swift` — 創意工坊瀏覽器 UI