diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 999fde8..f2102cf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ on: jobs: check: name: Check, lint, format, test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout code @@ -19,7 +19,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ - libwebkit2gtk-4.1-dev \ + libwebkit2gtk-4.0-dev \ build-essential \ libssl-dev \ libayatana-appindicator3-dev \ @@ -37,9 +37,9 @@ jobs: ~/.cargo/registry ~/.cargo/git src-tauri/target - key: ${{ runner.os }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }} + key: ubuntu22-cargo-${{ hashFiles('src-tauri/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo- + ubuntu22-cargo- - name: Check formatting working-directory: src-tauri diff --git a/README.md b/README.md index 0946c85..7b05eaf 100644 --- a/README.md +++ b/README.md @@ -89,11 +89,11 @@ A dialog will appear asking you to confirm. Click **Install** and wait for it to Install the system packages that Tauri needs. The exact command depends on your distribution. -**Ubuntu / Debian:** +**Ubuntu 22.04 / Debian:** ``` sudo apt update -sudo apt install libwebkit2gtk-4.1-dev \ +sudo apt install libwebkit2gtk-4.0-dev \ build-essential \ curl \ wget \ @@ -106,7 +106,7 @@ sudo apt install libwebkit2gtk-4.1-dev \ **Fedora:** ``` -sudo dnf install webkit2gtk4.1-devel \ +sudo dnf install webkit2gtk3-devel \ openssl-devel \ curl \ wget \ @@ -119,7 +119,7 @@ sudo dnf group install "C Development Tools and Libraries" **Arch Linux:** ``` -sudo pacman -Syu webkit2gtk-4.1 \ +sudo pacman -Syu webkit2gtk \ base-devel \ curl \ wget \ @@ -143,7 +143,7 @@ cd json-tree-editor ## Running in development -Start the app in development mode. The window opens immediately and reloads when you save changes to `src/index.html`. +Start the app in development mode. The window opens immediately and reloads when you save changes to `src/index.html` or `src/main.js`. ``` cargo tauri dev @@ -175,19 +175,17 @@ The output is placed in `src-tauri/target/release/bundle/`. json-tree-editor/ ├── docs/ │ └── img/ -│ └── app.png # Screenshot used in this README +│ └── app.png # Screenshot used in this README ├── src/ -│ └── index.html # The entire frontend: HTML, CSS, and JavaScript +│ ├── index.html # HTML structure and styles +│ └── main.js # All application logic ├── src-tauri/ -│ ├── capabilities/ -│ │ └── default.json # Declares which Tauri APIs the frontend can call -│ ├── icons/ # App icons for all platforms +│ ├── icons/ # App icons for all platforms │ ├── src/ -│ │ ├── main.rs # Entry point: starts the Tauri event loop -│ │ └── lib.rs # Registers plugins (file dialog, file system) -│ ├── build.rs # Build-time code generation required by Tauri -│ ├── Cargo.toml # Rust dependencies -│ └── tauri.conf.json # App name, window size, bundle settings +│ │ └── main.rs # Entry point: starts the Tauri event loop +│ ├── build.rs # Build-time code generation required by Tauri +│ ├── Cargo.toml # Rust dependencies +│ └── tauri.conf.json # App name, window size, permissions, bundle settings ├── .gitignore └── README.md ``` diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index e8807b6..9679fb3 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,14 +1,14 @@ { "$schema": "../node_modules/@tauri-apps/cli/schema.json", "build": { - "distDir": "../src" + "distDir": "../src", + "withGlobalTauri": true }, "package": { "productName": "JSON Tree Editor", "version": "0.1.0" }, "tauri": { - "withGlobalTauri": true, "allowlist": { "all": false, "dialog": {