diff --git a/.github/workflows/dev-release-cli.yaml b/.github/workflows/dev-release-cli.yaml
index 2686b98..e234fcd 100644
--- a/.github/workflows/dev-release-cli.yaml
+++ b/.github/workflows/dev-release-cli.yaml
@@ -1,83 +1,210 @@
+# Copyright 2022-2023, axodotdev
+# SPDX-License-Identifier: MIT or Apache-2.0
+#
+# CI that:
+#
+# * checks for a Git Tag that looks like a release
+# * builds artifacts with cargo-dist (archives, installers, hashes)
+# * uploads those artifacts to temporary workflow zip
+# * on success, uploads the artifacts to a Github Release™
+#
+# Note that the Github Release™ will be created with a generated
+# title/body based on your changelogs.
name: Development Release CLI
+permissions:
+ contents: write
+
+# This task will run whenever you push a git tag that looks like a version
+# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
+# Various formats will be parsed into a VERSION and an optional PACKAGE_NAME, where
+# PACKAGE_NAME must be the name of a Cargo package in your workspace, and VERSION
+# must be a Cargo-style SemVer Version (must have at least major.minor.patch).
+#
+# If PACKAGE_NAME is specified, then the release will be for that
+# package (erroring out if it doesn't have the given version or isn't cargo-dist-able).
+#
+# If PACKAGE_NAME isn't specified, then the release will be for all
+# (cargo-dist-able) packages in the workspace with that version (this mode is
+# intended for workspaces with only one dist-able package, or with all dist-able
+# packages versioned/released in lockstep).
+#
+# If you push multiple tags at once, separate instances of this workflow will
+# spin up, creating an independent Github Release™ for each one. However Github
+# will hard limit this to 3 tags per commit, as it will assume more tags is a
+# mistake.
+#
+# If there's a prerelease-style suffix to the version, then the Github Release™
+# will be marked as a prerelease.
on:
push:
- branches: ["development"]
+ tags:
+ - ".*development.*"
+ pull_request:
jobs:
- build:
- name: Release binary
+ # Run 'cargo dist plan' to determine what tasks we need to do
+ plan:
+ runs-on: ubuntu-latest
+ outputs:
+ val: ${{ steps.plan.outputs.manifest }}
+ tag: development
+ tag-flag: ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }}
+ publishing: true
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Install cargo-dist
+ run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.3.1/cargo-dist-installer.sh | sh"
+ - id: plan
+ run: |
+ cargo dist plan ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }} --output-format=json > dist-manifest.json
+ echo "cargo dist plan ran successfully"
+ cat dist-manifest.json
+ echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
+ - name: "Upload dist-manifest.json"
+ uses: actions/upload-artifact@v3
+ with:
+ name: artifacts
+ path: dist-manifest.json
+
+ # Build and packages all the platform-specific things
+ upload-local-artifacts:
+ # Let the initial task tell us to not run (currently very blunt)
+ needs: plan
strategy:
- matrix:
- include:
- - os: ubuntu-latest
- target: x86_64-unknown-linux-gnu
- artifact_name: dar2oar
- asset_name: dar2oar-x86_64-unknown-linux-gnu.tar.gz
- - os: ubuntu-latest
- target: x86_64-unknown-linux-musl
- artifact_name: dar2oar
- asset_name: dar2oar-x86_64-unknown-linux-musl.tar.gz
- - os: ubuntu-latest
- target: x86_64-pc-windows-gnu
- artifact_name: dar2oar.exe
- asset_name: dar2oar-x86_64-pc-windows-gnu.zip
- - os: macos-latest
- target: x86_64-apple-darwin
- artifact_name: dar2oar
- asset_name: dar2oar-x86_64-apple-darwin.zip
+ fail-fast: false
+ # Target platforms/runners are computed by cargo-dist in create-release.
+ # Each member of the matrix has the following arguments:
+ #
+ # - runner: the github runner
+ # - dist-args: cli flags to pass to cargo dist
+ # - install-dist: expression to run to install cargo-dist on the runner
+ #
+ # Typically there will be:
+ # - 1 "global" task that builds universal installers
+ # - N "local" tasks that build each platform's binaries and platform-specific installers
+ matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }}
+ runs-on: ${{ matrix.runner }}
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - uses: swatinem/rust-cache@v2
+ - name: Install cargo-dist
+ run: ${{ matrix.install_dist }}
+ - name: Install dependencies (ubuntu only)
+ if: runner.os == 'Linux'
+ # You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
+ - name: Build artifacts
+ run: |
+ # Actually do builds and make zips and whatnot
+ cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
+ echo "cargo dist ran successfully"
+ - id: cargo-dist
+ name: Post-build
+ # We force bash here just because github makes it really hard to get values up
+ # to "real" actions without writing to env-vars, and writing to env-vars has
+ # inconsistent syntax between shell and powershell.
+ shell: bash
+ run: |
+ # Parse out what we just built and upload it to the Github Release™
+ echo "paths<> "$GITHUB_OUTPUT"
+ jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT"
+ echo "EOF" >> "$GITHUB_OUTPUT"
+ - name: "Upload artifacts"
+ uses: actions/upload-artifact@v3
+ with:
+ name: artifacts
+ path: ${{ steps.cargo-dist.outputs.paths }}
- runs-on: ${{ matrix.os }}
+ # Build and package all the platform-agnostic(ish) things
+ upload-global-artifacts:
+ needs: [plan, upload-local-artifacts]
+ runs-on: "ubuntu-20.04"
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Install cargo-dist
+ run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.3.1/cargo-dist-installer.sh | sh"
+ # Get all the local artifacts for the global tasks to use (for e.g. checksums)
+ - name: Fetch local artifacts
+ uses: actions/download-artifact@v3
+ with:
+ name: artifacts
+ path: target/distrib/
+ - id: cargo-dist
+ shell: bash
+ run: |
+ cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
+ echo "cargo dist ran successfully"
+
+ # Parse out what we just built and upload it to the Github Release™
+ echo "paths<> "$GITHUB_OUTPUT"
+ jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT"
+ echo "EOF" >> "$GITHUB_OUTPUT"
+ - name: "Upload artifacts"
+ uses: actions/upload-artifact@v3
+ with:
+ name: artifacts
+ path: ${{ steps.cargo-dist.outputs.paths }}
+ should-publish:
+ needs:
+ - plan
+ - upload-local-artifacts
+ - upload-global-artifacts
+ if: ${{ needs.plan.outputs.publishing == 'true' }}
+ runs-on: ubuntu-latest
steps:
- - name: Checkout repository
- uses: actions/checkout@v3
+ - name: print tag
+ run: echo "ok we're publishing!"
+ # Create a Github Release with all the results once everything is done,
+ publish-release:
+ needs: [plan, should-publish]
+ runs-on: ubuntu-latest
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
# Without it, once created, the commit sha for the tag will not be updated.
- name: Recreate tag
run: |
git config user.name 'github-actions[bot]'
- git config user.email 'github-actions[bot]@users.noreply.github.com'
+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git tag "development" -m "Development version" --force
git push -f --tags
- if: matrix.target == 'x86_64-pc-windows-gnu'
-
- - name: Install stable toolchain
- uses: dtolnay/rust-toolchain@stable
- with:
- toolchain: stable
-
- - name: Cross build with all features
- uses: actions-rs/cargo@v1
- with:
- use-cross: true
- command: build
- args: --release --target ${{ matrix.target }} --all-features --verbose
-
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
- tag: ${{ github.ref_name }}
- if: matrix.target == 'x86_64-pc-windows-gnu'
-
- - name: Compress binary
- run: |
- if [[ "${{ matrix.target }}" == *"linux"* ]]; then
- tar -czf ${{ matrix.asset_name }} target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
- else
- zip -r ${{ matrix.asset_name }} target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
- fi
-
- - name: Upload binaries to release
- uses: svenstaro/upload-release-action@v2
+ tag: development
+ - name: "Download artifacts"
+ uses: actions/download-artifact@v3
+ with:
+ name: artifacts
+ path: artifacts
+ - name: Create Release
+ uses: ncipollo/release-action@v1
with:
- release_name: DAR to OAR Converter Development-${{ github.sha }}
- body: ${{ steps.changelog.outputs.changes }}
- repo_token: ${{ secrets.GITHUB_TOKEN }}
- file: ${{ matrix.asset_name }}
- asset_name: ${{ matrix.asset_name }}
- tag: "development"
+ tag: development
+ name: DAR to OAR Converter Development-${{ github.sha }}
+ body: ${{ fromJson(needs.plan.outputs.val).announcement_github_body }}
+ artifacts: "artifacts/*"
prerelease: true
- overwrite: true
+ allowUpdates: true
diff --git a/.github/workflows/dev-release-gui.yaml b/.github/workflows/dev-release-gui.yaml
index ebf4a47..ad3af59 100644
--- a/.github/workflows/dev-release-gui.yaml
+++ b/.github/workflows/dev-release-gui.yaml
@@ -30,9 +30,15 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
- uses: swatinem/rust-cache@v2
+ uses: actions/cache@v3
with:
- workspaces: "./src-tauri -> target"
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-cargo-
- name: Sync node version and setup cache
uses: actions/setup-node@v3
diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/lint-and-test.yaml
similarity index 54%
rename from .github/workflows/build-and-test.yaml
rename to .github/workflows/lint-and-test.yaml
index ad7f35d..8325a29 100644
--- a/.github/workflows/build-and-test.yaml
+++ b/.github/workflows/lint-and-test.yaml
@@ -24,18 +24,21 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
-
- - uses: actions/checkout@v3
-
- - name: Run lint
- uses: actions-rs/cargo@v1
- with:
- command: clippy
- args: --workspace
- if: matrix.platform == 'ubuntu-20.04'
-
- - name: Run tests
- uses: actions-rs/cargo@v1
+ - uses: actions/checkout@v4
+ - name: Rust cache
+ uses: actions/cache@v3
with:
- command: test
- args: --workspace
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-cargo-
+ - name: Install components
+ run: |
+ rustup component add clippy
+ rustup component add rustfmt
+ - run: cargo fmt --all -- --check
+ - run: cargo clippy --workspace -- -D warnings
+ - run: cargo test --workspace
diff --git a/.github/workflows/release-cli.yaml b/.github/workflows/release-cli.yaml
index fa34073..fa2424e 100644
--- a/.github/workflows/release-cli.yaml
+++ b/.github/workflows/release-cli.yaml
@@ -1,84 +1,208 @@
-name: Release Cli
+# Copyright 2022-2023, axodotdev
+# SPDX-License-Identifier: MIT or Apache-2.0
+#
+# CI that:
+#
+# * checks for a Git Tag that looks like a release
+# * builds artifacts with cargo-dist (archives, installers, hashes)
+# * uploads those artifacts to temporary workflow zip
+# * on success, uploads the artifacts to a Github Release™
+#
+# Note that the Github Release™ will be created with a generated
+# title/body based on your changelogs.
+name: Release CLI
+permissions:
+ contents: write
+
+# This task will run whenever you push a git tag that looks like a version
+# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
+# Various formats will be parsed into a VERSION and an optional PACKAGE_NAME, where
+# PACKAGE_NAME must be the name of a Cargo package in your workspace, and VERSION
+# must be a Cargo-style SemVer Version (must have at least major.minor.patch).
+#
+# If PACKAGE_NAME is specified, then the release will be for that
+# package (erroring out if it doesn't have the given version or isn't cargo-dist-able).
+#
+# If PACKAGE_NAME isn't specified, then the release will be for all
+# (cargo-dist-able) packages in the workspace with that version (this mode is
+# intended for workspaces with only one dist-able package, or with all dist-able
+# packages versioned/released in lockstep).
+#
+# If you push multiple tags at once, separate instances of this workflow will
+# spin up, creating an independent Github Release™ for each one. However Github
+# will hard limit this to 3 tags per commit, as it will assume more tags is a
+# mistake.
+#
+# If there's a prerelease-style suffix to the version, then the Github Release™
+# will be marked as a prerelease.
on:
push:
tags:
- - "*"
+ - "**[0-9]+.[0-9]+.[0-9]+*"
+ pull_request:
jobs:
- build:
- name: Release binary
- strategy:
- matrix:
- include:
- - os: ubuntu-latest
- target: x86_64-unknown-linux-gnu
- artifact_name: dar2oar
- asset_name: dar2oar-x86_64-unknown-linux-gnu.tar.gz
- - os: ubuntu-latest
- target: x86_64-unknown-linux-musl
- artifact_name: dar2oar
- asset_name: dar2oar-x86_64-unknown-linux-musl.tar.gz
- - os: ubuntu-latest
- target: x86_64-pc-windows-gnu
- artifact_name: dar2oar.exe
- asset_name: dar2oar-x86_64-pc-windows-gnu.zip
- - os: macos-latest
- target: x86_64-apple-darwin
- artifact_name: dar2oar
- asset_name: dar2oar-x86_64-apple-darwin.zip
-
- runs-on: ${{ matrix.os }}
+ # Run 'cargo dist plan' to determine what tasks we need to do
+ plan:
+ runs-on: ubuntu-latest
+ outputs:
+ val: ${{ steps.plan.outputs.manifest }}
+ tag: ${{ !github.event.pull_request && github.ref_name || '' }}
+ tag-flag: ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }}
+ publishing: ${{ !github.event.pull_request }}
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Install cargo-dist
+ run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.3.1/cargo-dist-installer.sh | sh"
+ - id: plan
+ run: |
+ cargo dist plan ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }} --output-format=json > dist-manifest.json
+ echo "cargo dist plan ran successfully"
+ cat dist-manifest.json
+ echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
+ - name: "Upload dist-manifest.json"
+ uses: actions/upload-artifact@v3
+ with:
+ name: artifacts
+ path: dist-manifest.json
+ # Build and packages all the platform-specific things
+ upload-local-artifacts:
+ # Let the initial task tell us to not run (currently very blunt)
+ needs: plan
+ if: ${{ fromJson(needs.plan.outputs.val).releases != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
+ strategy:
+ fail-fast: false
+ # Target platforms/runners are computed by cargo-dist in create-release.
+ # Each member of the matrix has the following arguments:
+ #
+ # - runner: the github runner
+ # - dist-args: cli flags to pass to cargo dist
+ # - install-dist: expression to run to install cargo-dist on the runner
+ #
+ # Typically there will be:
+ # - 1 "global" task that builds universal installers
+ # - N "local" tasks that build each platform's binaries and platform-specific installers
+ matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }}
+ runs-on: ${{ matrix.runner }}
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- - name: Checkout repository
- uses: actions/checkout@v3
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - uses: swatinem/rust-cache@v2
+ - name: Install cargo-dist
+ run: ${{ matrix.install_dist }}
+ - name: Build artifacts
+ run: |
+ # Actually do builds and make zips and whatnot
+ cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
+ echo "cargo dist ran successfully"
+ - id: cargo-dist
+ name: Post-build
+ # We force bash here just because github makes it really hard to get values up
+ # to "real" actions without writing to env-vars, and writing to env-vars has
+ # inconsistent syntax between shell and powershell.
+ shell: bash
+ run: |
+ # Parse out what we just built and upload it to the Github Release™
+ echo "paths<> "$GITHUB_OUTPUT"
+ jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT"
+ echo "EOF" >> "$GITHUB_OUTPUT"
+ - name: "Upload artifacts"
+ uses: actions/upload-artifact@v3
+ with:
+ name: artifacts
+ path: ${{ steps.cargo-dist.outputs.paths }}
- - name: Install stable toolchain
- uses: dtolnay/rust-toolchain@stable
+ # Build and package all the platform-agnostic(ish) things
+ upload-global-artifacts:
+ needs: [plan, upload-local-artifacts]
+ runs-on: "ubuntu-20.04"
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+ - name: Install cargo-dist
+ run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.3.1/cargo-dist-installer.sh | sh"
+ # Get all the local artifacts for the global tasks to use (for e.g. checksums)
+ - name: Fetch local artifacts
+ uses: actions/download-artifact@v3
with:
- toolchain: stable
+ name: artifacts
+ path: target/distrib/
+ - id: cargo-dist
+ shell: bash
+ run: |
+ cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
+ echo "cargo dist ran successfully"
- - name: Cross build with all features
- uses: actions-rs/cargo@v1
+ # Parse out what we just built and upload it to the Github Release™
+ echo "paths<> "$GITHUB_OUTPUT"
+ jq --raw-output ".artifacts[]?.path | select( . != null )" dist-manifest.json >> "$GITHUB_OUTPUT"
+ echo "EOF" >> "$GITHUB_OUTPUT"
+ - name: "Upload artifacts"
+ uses: actions/upload-artifact@v3
with:
- use-cross: true
- command: build
- args: --release --target ${{ matrix.target }} --all-features --verbose
+ name: artifacts
+ path: ${{ steps.cargo-dist.outputs.paths }}
+ should-publish:
+ needs:
+ - plan
+ - upload-local-artifacts
+ - upload-global-artifacts
+ if: ${{ needs.plan.outputs.publishing == 'true' }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: print tag
+ run: echo "ok we're publishing!"
+
+ # Create a Github Release with all the results once everything is done,
+ publish-release:
+ needs: [plan, should-publish]
+ runs-on: ubuntu-latest
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
- tag: ${{ github.ref_name }}
- if: matrix.target == 'x86_64-pc-windows-gnu'
-
- - name: Compress binary
- run: |
- if [[ "${{ matrix.target }}" == *"linux"* ]]; then
- tar -czf ${{ matrix.asset_name }} target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
- else
- zip -r ${{ matrix.asset_name }} target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
- fi
-
- - name: Upload binaries to release
- uses: svenstaro/upload-release-action@v2
+ tag: ${{ needs.plan.outputs.tag }}
+ - name: "Download artifacts"
+ uses: actions/download-artifact@v3
with:
- release_name: DAR to OAR Converter v${{ github.ref_name }}
- body: ${{ steps.changelog.outputs.changes }}
- repo_token: ${{ secrets.GITHUB_TOKEN }}
- file: ${{ matrix.asset_name }}
- asset_name: ${{ matrix.asset_name }}
- tag: ${{ github.ref }}
- overwrite: true
-
+ name: artifacts
+ path: artifacts
+ - name: Create Release
+ uses: ncipollo/release-action@v1
+ with:
+ tag: ${{ needs.plan.outputs.tag }}
+ name: "DAR to OAR Converter v${{ needs.plan.outputs.tag }}"
+ body: |
+ ${{ steps.changelog.outputs.changes }}
+ ${{ fromJson(needs.plan.outputs.val).announcement_github_body }}
+ prerelease: ${{ fromJson(needs.plan.outputs.val).announcement_is_prerelease }}
+ artifacts: "artifacts/*"
+ allowUpdates: true
- name: Commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
- commit_user_email: github-actions[bot]@users.noreply.github.com
+ commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot]
commit_message: "docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]"
file_pattern: CHANGELOG.md
- if: matrix.target == 'x86_64-pc-windows-gnu'
diff --git a/.github/workflows/release-gui.yaml b/.github/workflows/release-gui.yaml
index e24bfbe..2d0edc8 100644
--- a/.github/workflows/release-gui.yaml
+++ b/.github/workflows/release-gui.yaml
@@ -30,9 +30,15 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
- uses: swatinem/rust-cache@v2
+ uses: actions/cache@v3
with:
- workspaces: "./src-tauri -> target"
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-cargo-
- name: Sync node version and setup cache
uses: actions/setup-node@v3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2678f77..a38cff4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [0.1.5] - 2023-10-13
+### :sparkles: New Features
+- [`32c3150`](https://github.com/SARDONYX-sard/dar-to-oar/commit/32c31505303d1e04b52615c1f26e6147b09d3705) - **front**: add experimental customJS system *(commit by @SARDONYX-sard)*
+- [`9e41f60`](https://github.com/SARDONYX-sard/dar-to-oar/commit/9e41f60e30e4b985b0ca0c8c87233c7277a907d9) - **core**: add sentinel in converter *(commit by @SARDONYX-sard)*
+- [`ae852d0`](https://github.com/SARDONYX-sard/dar-to-oar/commit/ae852d0757a0a7515856bf09ffbabf2c9c9a0a6e) - implement DAR hinder & OAR remover *(commit by @SARDONYX-sard)*
+
+### :bug: Bug Fixes
+- [`92563f2`](https://github.com/SARDONYX-sard/dar-to-oar/commit/92563f2c6ff50c4c6dc47bbd1a0d165874be242b) - **front**: fix design *(commit by @SARDONYX-sard)*
+- [`330041f`](https://github.com/SARDONYX-sard/dar-to-oar/commit/330041f1de0b8bd0cb59fb063e5a2d622b822c0f) - **front**: fix problem with navigation focus not changing color after pressing `alt+->` *(commit by @SARDONYX-sard)*
+- [`7231c65`](https://github.com/SARDONYX-sard/dar-to-oar/commit/7231c65515febf95637110203bb67421c4fb5bda) - **ci**: remove draft option in release *(commit by @SARDONYX-sard)*
+- [`8af1069`](https://github.com/SARDONYX-sard/dar-to-oar/commit/8af1069a9c3d51724f53c8d74c63c764ddb61226) - **core-test**: revert to dyn read file *(commit by @SARDONYX-sard)*
+
+### :recycle: Refactors
+- [`20c3c59`](https://github.com/SARDONYX-sard/dar-to-oar/commit/20c3c59109bc08dd90c8b180f7f817cab17e7acc) - **front**: remove unused import *(commit by @SARDONYX-sard)*
+
+### :wrench: Chores
+- [`85542ea`](https://github.com/SARDONYX-sard/dar-to-oar/commit/85542ea5820c0810be1c7a4a3e42e22943cbf523) - **bug-report**: add version selectors *(commit by @SARDONYX-sard)*
+
## [0.1.4] - 2023-10-09
### :sparkles: New Features
- [`20a64c4`](https://github.com/SARDONYX-sard/dar-to-oar/commit/20a64c485b02956647b299e6ba30e5b36f02b8e6) - add dev build ci & new form help text in GUI *(PR [#8](https://github.com/SARDONYX-sard/dar-to-oar/pull/8) by [@SARDONYX-sard](https://github.com/SARDONYX-sard))*
@@ -47,4 +65,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[0.1.2]: https://github.com/SARDONYX-sard/dar-to-oar/compare/0.1.1...0.1.2
[0.1.3]: https://github.com/SARDONYX-sard/dar-to-oar/compare/0.1.2...0.1.3
-[0.1.4]: https://github.com/SARDONYX-sard/dar-to-oar/compare/development...0.1.4
\ No newline at end of file
+[0.1.4]: https://github.com/SARDONYX-sard/dar-to-oar/compare/0.1.3...0.1.4
+[0.1.5]: https://github.com/SARDONYX-sard/dar-to-oar/compare/0.1.4...0.1.5
diff --git a/Cargo.lock b/Cargo.lock
index de3bece..64e15b5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -721,7 +721,7 @@ dependencies = [
[[package]]
name = "dar2oar_cli"
-version = "0.1.5"
+version = "0.1.6"
dependencies = [
"anyhow",
"clap",
@@ -733,7 +733,7 @@ dependencies = [
[[package]]
name = "dar2oar_core"
-version = "0.1.5"
+version = "0.1.6"
dependencies = [
"anyhow",
"criterion",
@@ -1100,7 +1100,7 @@ dependencies = [
[[package]]
name = "g_dar2oar"
-version = "0.1.5"
+version = "0.1.6"
dependencies = [
"anyhow",
"dar2oar_core",
diff --git a/Cargo.toml b/Cargo.toml
index 2f68a6b..10fdbb7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,8 +1,32 @@
[workspace.package]
-version = "0.1.5"
+version = "0.1.6"
description = "DAR to OAR Converter"
[workspace]
members = ["dar2oar_core", "dar2oar_cli", "src-tauri"]
default-members = ["dar2oar_cli"]
resolver = "2"
+
+# The profile that 'cargo dist' will build with
+[profile.dist]
+inherits = "release"
+lto = "thin"
+
+# Config for 'cargo dist'
+[workspace.metadata.dist]
+# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
+cargo-dist-version = "0.3.1"
+# CI backends to support
+ci = ["github"]
+# The installers to generate for each app
+installers = ["shell", "powershell"]
+# Target platforms to build apps for (Rust target-triple syntax)
+targets = [
+ "x86_64-unknown-linux-gnu",
+ "aarch64-apple-darwin",
+ "x86_64-apple-darwin",
+ "x86_64-pc-windows-msvc",
+]
+# Publish jobs to run in CI
+pr-run-mode = "skip"
+allow-dirty = ["ci"]
diff --git a/cspell.jsonc b/cspell.jsonc
index 259af7a..32a1389 100644
--- a/cspell.jsonc
+++ b/cspell.jsonc
@@ -17,6 +17,7 @@
"stperson",
"tauri",
"thiserror",
+ "Unhide",
"unoptimized",
"walkdir",
"Warhammer",
diff --git a/dar2oar_core/src/condition_parser/compare.rs b/dar2oar_core/src/condition_parser/compare.rs
index 705fbfd..e5ce509 100644
--- a/dar2oar_core/src/condition_parser/compare.rs
+++ b/dar2oar_core/src/condition_parser/compare.rs
@@ -3,7 +3,7 @@ use crate::{
conditions::{CompareValues, ConditionSet},
dar_syntax::syntax::FnArg,
get_try_into,
- values::{Cmp, NumericValue},
+ values::{Cmp, NumericValue, PluginValue},
};
/// condition_name: "ValueEqualTo" | "ValueLessThan"
@@ -12,7 +12,7 @@ pub(super) fn parse_compare(
args: Vec>,
negated: bool,
) -> Result {
- let plugin_value = get_try_into!(
+ let plugin_value: PluginValue = get_try_into!(
args[0],
"Plugin value: in ValueEqualTo | ValueLessThan 1st arg",
"None"
@@ -26,7 +26,7 @@ pub(super) fn parse_compare(
let create_compare = |comparison: Cmp| {
ConditionSet::CompareValues(CompareValues {
negated,
- value_a: NumericValue::GlobalVariable(plugin_value),
+ value_a: NumericValue::GlobalVariable(plugin_value.into()),
comparison,
value_b: NumericValue::StaticValue(static_value),
..Default::default()
diff --git a/dar2oar_core/src/condition_parser/conditions.rs b/dar2oar_core/src/condition_parser/conditions.rs
index a2b48df..89ba22d 100644
--- a/dar2oar_core/src/condition_parser/conditions.rs
+++ b/dar2oar_core/src/condition_parser/conditions.rs
@@ -49,7 +49,9 @@ fn parse_condition(condition: Expression<'_>) -> Result parse_compare(fn_name, args, negated)?,
actor if fn_name.starts_with("IsActor") => parse_actor(actor, args, negated)?,
- faction if fn_name.starts_with("IsFaction") => parse_faction(faction, args, negated)?,
+ "IsInFaction" | "IsFactionRankEqualTo" | "IsFactionRankLessThan" => {
+ parse_faction(fn_name, args, negated)?
+ }
equip if fn_name.starts_with("IsEquipped") => parse_equip(equip, args, negated)?,
"IsLevelLessThan" => ConditionSet::Level(Level {
negated,
diff --git a/dar2oar_core/src/condition_parser/dar_interface.rs b/dar2oar_core/src/condition_parser/dar_interface.rs
index 22c0884..1127327 100644
--- a/dar2oar_core/src/condition_parser/dar_interface.rs
+++ b/dar2oar_core/src/condition_parser/dar_interface.rs
@@ -70,10 +70,13 @@ impl From<&FnArg<'_>> for NumericValue {
FnArg::PluginValue {
plugin_name,
form_id,
- } => Self::GlobalVariable(PluginValue {
- plugin_name: plugin_name.to_string(),
- form_id: NumericLiteral::from(form_id).into(),
- }),
+ } => Self::GlobalVariable(
+ PluginValue {
+ plugin_name: plugin_name.to_string(),
+ form_id: NumericLiteral::from(form_id).into(),
+ }
+ .into(),
+ ),
FnArg::Number(num) => match num {
NumberLiteral::Float(value) => Self::StaticValue((*value).into()),
NumberLiteral::Decimal(value) => Self::StaticValue((*value as f32).into()),
diff --git a/dar2oar_core/src/conditions/compare_values.rs b/dar2oar_core/src/conditions/compare_values.rs
index b34eb9a..21271f2 100644
--- a/dar2oar_core/src/conditions/compare_values.rs
+++ b/dar2oar_core/src/conditions/compare_values.rs
@@ -68,7 +68,7 @@ mod tests {
}
}"#;
let serialized = serde_json::to_string_pretty(&compare_values).unwrap();
- assert_eq!(expected, serialized);
+ assert_eq!(serialized, expected);
}
#[test]
@@ -100,7 +100,7 @@ mod tests {
}
}"#;
let serialized = serde_json::to_string_pretty(&compare_values).unwrap();
- assert_eq!(expected, serialized);
+ assert_eq!(serialized, expected);
}
#[test]
@@ -133,20 +133,26 @@ mod tests {
}
}"#;
let serialized = serde_json::to_string_pretty(&compare_values).unwrap();
- assert_eq!(expected, serialized);
+ assert_eq!(serialized, expected);
}
#[test]
fn should_stringify_compare_values_with_global_variable() {
let compare_values = CompareValues {
- value_a: NumericValue::GlobalVariable(PluginValue {
- plugin_name: "my_plugin.esm".to_string(),
- form_id: 1usize.into(),
- }),
- value_b: NumericValue::GlobalVariable(PluginValue {
- plugin_name: "another_plugin.esp".to_string(),
- form_id: "2".into(),
- }),
+ value_a: NumericValue::GlobalVariable(
+ PluginValue {
+ plugin_name: "my_plugin.esm".to_string(),
+ form_id: 1usize.into(),
+ }
+ .into(),
+ ),
+ value_b: NumericValue::GlobalVariable(
+ PluginValue {
+ plugin_name: "another_plugin.esp".to_string(),
+ form_id: "2".into(),
+ }
+ .into(),
+ ),
comparison: Cmp::Gt,
..Default::default()
};
@@ -155,16 +161,20 @@ mod tests {
"condition": "CompareValues",
"requiredVersion": "1.0.0.0",
"Value A": {
- "pluginName": "my_plugin.esm",
- "formID": "1"
+ "form": {
+ "pluginName": "my_plugin.esm",
+ "formID": "1"
+ }
},
"Comparison": ">",
"Value B": {
- "pluginName": "another_plugin.esp",
- "formID": "2"
+ "form": {
+ "pluginName": "another_plugin.esp",
+ "formID": "2"
+ }
}
}"#;
let serialized = serde_json::to_string_pretty(&compare_values).unwrap();
- assert_eq!(expected, serialized);
+ assert_eq!(serialized, expected);
}
}
diff --git a/dar2oar_core/src/fs/path_changer.rs b/dar2oar_core/src/fs/path_changer.rs
index 718b57d..75b8081 100644
--- a/dar2oar_core/src/fs/path_changer.rs
+++ b/dar2oar_core/src/fs/path_changer.rs
@@ -123,7 +123,9 @@ mod test {
assert_eq!(
dar_root,
- PathBuf::from("../ModName/meshes/actors/character/_1stperson/animations/DynamicAnimationReplacer")
+ PathBuf::from(
+ "../ModName/meshes/actors/character/_1stperson/animations/DynamicAnimationReplacer"
+ )
);
assert_eq!(
oar_root,
@@ -147,7 +149,9 @@ mod test {
assert_eq!(
dar_root,
- PathBuf::from("../ModName/meshes/actors/character/animations/DynamicAnimationReplacer.mohidden")
+ PathBuf::from(
+ "../ModName/meshes/actors/character/animations/DynamicAnimationReplacer.mohidden"
+ )
);
assert_eq!(
oar_root,
diff --git a/dar2oar_core/src/values/direction_value.rs b/dar2oar_core/src/values/direction_value.rs
index b563ac3..53b7393 100644
--- a/dar2oar_core/src/values/direction_value.rs
+++ b/dar2oar_core/src/values/direction_value.rs
@@ -136,7 +136,7 @@ mod tests {
"value": 3.0
}"#;
let serialized = serde_json::to_string_pretty(&direction_value).unwrap();
- assert_eq!(expected, serialized);
+ assert_eq!(serialized, expected);
}
#[test]
@@ -150,7 +150,7 @@ mod tests {
value: Direction::Forward,
};
- assert_eq!(expected, deserialized);
+ assert_eq!(deserialized, expected);
}
#[test]
@@ -161,7 +161,7 @@ mod tests {
value: Direction::None,
};
- assert_eq!(expected, default_direction_value);
+ assert_eq!(default_direction_value, expected);
}
#[test]
@@ -170,7 +170,7 @@ mod tests {
let expected = "2.0";
let serialized = serde_json::to_string(&direction).unwrap();
- assert_eq!(expected, serialized);
+ assert_eq!(serialized, expected);
}
#[test]
@@ -180,6 +180,6 @@ mod tests {
let deserialized: Direction = serde_json::from_str(json_str).unwrap();
let expected = Direction::Left;
- assert_eq!(expected, deserialized);
+ assert_eq!(deserialized, expected);
}
}
diff --git a/dar2oar_core/src/values/form_value.rs b/dar2oar_core/src/values/form_value.rs
new file mode 100644
index 0000000..873cabb
--- /dev/null
+++ b/dar2oar_core/src/values/form_value.rs
@@ -0,0 +1,14 @@
+use super::PluginValue;
+use serde::{Deserialize, Serialize};
+
+/// Wrapper for wrapping pluginValue with a key called "form"
+#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
+pub struct FormValue {
+ pub form: PluginValue,
+}
+
+impl From for FormValue {
+ fn from(value: PluginValue) -> Self {
+ Self { form: value }
+ }
+}
diff --git a/dar2oar_core/src/values/graph_value.rs b/dar2oar_core/src/values/graph_value.rs
index 38fefd0..4680b92 100644
--- a/dar2oar_core/src/values/graph_value.rs
+++ b/dar2oar_core/src/values/graph_value.rs
@@ -60,6 +60,6 @@ mod tests {
"graphVariableType": "Float"
}"#;
let serialized = serde_json::to_string_pretty(&graph_value).unwrap();
- assert_eq!(expected, serialized);
+ assert_eq!(serialized, expected);
}
}
diff --git a/dar2oar_core/src/values/keyword_value.rs b/dar2oar_core/src/values/keyword_value.rs
index 29d110e..392a500 100644
--- a/dar2oar_core/src/values/keyword_value.rs
+++ b/dar2oar_core/src/values/keyword_value.rs
@@ -1,4 +1,4 @@
-use super::{LiteralValue, PluginValue};
+use super::{FormValue, LiteralValue};
use serde::{Deserialize, Serialize};
use serde_json::Value;
@@ -8,13 +8,6 @@ pub enum Keyword {
Literal(LiteralValue),
Form(FormValue),
}
-
-/// Wrapper for wrapping pluginValue with a key called "form"
-#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
-pub struct FormValue {
- pub form: PluginValue,
-}
-
impl Default for Keyword {
fn default() -> Self {
Self::Literal(LiteralValue::default())
@@ -59,6 +52,8 @@ impl<'de> Deserialize<'de> for Keyword {
#[cfg(test)]
mod tests {
+ use crate::values::PluginValue;
+
use super::*;
use pretty_assertions::assert_eq;
diff --git a/dar2oar_core/src/values/mod.rs b/dar2oar_core/src/values/mod.rs
index 354b96a..41d03a9 100644
--- a/dar2oar_core/src/values/mod.rs
+++ b/dar2oar_core/src/values/mod.rs
@@ -1,6 +1,7 @@
mod actor_value;
mod comparison;
mod direction_value;
+mod form_value;
mod graph_value;
mod keyword_value;
mod literal_value;
@@ -14,8 +15,9 @@ mod type_value;
pub use self::actor_value::{ActorValue, ActorValueType};
pub use self::comparison::Cmp;
pub use self::direction_value::{Direction, DirectionValue};
+pub use self::form_value::FormValue;
pub use self::graph_value::{GraphValue, GraphVariableType};
-pub use self::keyword_value::{FormValue, Keyword};
+pub use self::keyword_value::Keyword;
pub use self::literal_value::LiteralValue;
pub use self::numeric_literal::NumericLiteral;
pub use self::numeric_value::NumericValue;
@@ -37,3 +39,10 @@ pub(crate) enum ValueSet {
#[default]
Unknown,
}
+
+#[macro_export]
+macro_rules! deserialize_json {
+ ($value:expr) => {
+ serde_json::from_value($value).map_err(|e| serde::de::Error::custom(e.to_string()))
+ };
+}
diff --git a/dar2oar_core/src/values/numeric_value.rs b/dar2oar_core/src/values/numeric_value.rs
index 8aaf517..d3ba146 100644
--- a/dar2oar_core/src/values/numeric_value.rs
+++ b/dar2oar_core/src/values/numeric_value.rs
@@ -1,7 +1,7 @@
use super::{
- actor_value::ActorValue, graph_value::GraphValue, plugin_value::PluginValue,
- static_value::StaticValue,
+ actor_value::ActorValue, graph_value::GraphValue, static_value::StaticValue, FormValue,
};
+use crate::deserialize_json;
use serde::{Deserialize, Serialize};
use serde_json::Value;
@@ -11,7 +11,7 @@ use serde_json::Value;
#[serde(untagged)]
pub enum NumericValue {
StaticValue(StaticValue),
- GlobalVariable(PluginValue),
+ GlobalVariable(FormValue),
ActorValue(ActorValue),
GraphVariable(GraphValue),
}
@@ -32,20 +32,16 @@ impl<'de> Deserialize<'de> for NumericValue {
if let Value::Object(map) = &value {
if map.contains_key("value") {
// If the "value" field is present, assume it's a StaticValue
- let static_value: StaticValue = serde_json::from_value(value).unwrap();
+ let static_value: StaticValue = deserialize_json!(value)?;
Ok(NumericValue::StaticValue(static_value))
- } else if map.contains_key("pluginName") && map.contains_key("formID") {
- // If both "pluginName" and "formID" fields are present, assume it's a GlobalVariable
- let global_variable: PluginValue = serde_json::from_value(value).unwrap();
+ } else if map.contains_key("form") {
+ let global_variable = deserialize_json!(value)?;
Ok(NumericValue::GlobalVariable(global_variable))
} else if map.contains_key("actorValue") {
- // If the "actorValue" field is present, assume it's an ActorValue
- let actor_value: ActorValue = serde_json::from_value(value).unwrap();
+ let actor_value: ActorValue = deserialize_json!(value)?;
Ok(NumericValue::ActorValue(actor_value))
} else if map.contains_key("graphValue") {
- // If the "graphValue" field is present, assume it's a GraphVariable
- let graph_variable: GraphValue = serde_json::from_value(value).unwrap();
- Ok(NumericValue::GraphVariable(graph_variable))
+ Ok(NumericValue::GraphVariable(deserialize_json!(value)?))
} else {
Err(serde::de::Error::custom(
"Unable to determine NumericValue variant",
@@ -62,6 +58,8 @@ impl<'de> Deserialize<'de> for NumericValue {
#[cfg(test)]
mod tests {
+ use crate::values::PluginValue;
+
use super::*;
use pretty_assertions::assert_eq;
@@ -78,11 +76,13 @@ mod tests {
#[test]
fn should_serialize_numeric_value_global_variable() {
- let numeric_value = NumericValue::GlobalVariable(PluginValue::default());
+ let numeric_value = NumericValue::GlobalVariable(FormValue::default());
let expected = r#"{
- "pluginName": "",
- "formID": ""
+ "form": {
+ "pluginName": "",
+ "formID": ""
+ }
}"#;
let serialized = serde_json::to_string_pretty(&numeric_value).unwrap();
assert_eq!(serialized, expected);
@@ -103,15 +103,20 @@ mod tests {
#[test]
fn should_deserialize_numeric_value_global_variable() {
let json_str = r#"{
+ "form": {
"pluginName": "MyPlugin",
"formID": "0x12345"
+ }
}"#;
let deserialized: NumericValue = serde_json::from_str(json_str).unwrap();
- let expected = NumericValue::GlobalVariable(PluginValue {
- plugin_name: "MyPlugin".into(),
- form_id: "0x12345".into(),
- });
+ let expected = NumericValue::GlobalVariable(
+ PluginValue {
+ plugin_name: "MyPlugin".into(),
+ form_id: "0x12345".into(),
+ }
+ .into(),
+ );
assert_eq!(deserialized, expected);
}
diff --git a/dar2oar_core/src/values/type_value.rs b/dar2oar_core/src/values/type_value.rs
index 9ddab52..ff3c026 100644
--- a/dar2oar_core/src/values/type_value.rs
+++ b/dar2oar_core/src/values/type_value.rs
@@ -256,7 +256,7 @@ mod tests {
"value": -1.0
}"#;
let serialized = serde_json::to_string_pretty(&type_value).unwrap();
- assert_eq!(expected, serialized);
+ assert_eq!(serialized, expected);
}
#[test]
@@ -270,7 +270,7 @@ mod tests {
value: WeaponType::Torch,
};
- assert_eq!(expected, deserialized);
+ assert_eq!(deserialized, expected);
}
#[test]
@@ -284,6 +284,6 @@ mod tests {
value: WeaponType::Greatsword,
};
- assert_eq!(expected, deserialized);
+ assert_eq!(deserialized, expected);
}
}
diff --git a/frontend/src/components/buttons/log_file_btn.tsx b/frontend/src/components/buttons/log_file_btn.tsx
index b81c043..ab98097 100644
--- a/frontend/src/components/buttons/log_file_btn.tsx
+++ b/frontend/src/components/buttons/log_file_btn.tsx
@@ -1,18 +1,20 @@
+import toast from "react-hot-toast";
import { Button } from "@mui/material";
+import { FileOpen } from "@mui/icons-material";
import { openLogFile } from "@/tauri_cmd";
-import toast from "react-hot-toast";
export const LogFileButton = () => {
return (
diff --git a/frontend/src/components/buttons/path_selector.tsx b/frontend/src/components/buttons/path_selector.tsx
index 00748c7..939ed2f 100644
--- a/frontend/src/components/buttons/path_selector.tsx
+++ b/frontend/src/components/buttons/path_selector.tsx
@@ -1,5 +1,6 @@
-import { Button } from "@mui/material";
+import FolderOpenIcon from "@mui/icons-material/FolderOpen";
import toast from "react-hot-toast";
+import { Button } from "@mui/material";
import { openPath } from "../../tauri_cmd";
type Props = {
@@ -20,9 +21,10 @@ export function SelectPathButton({ path, isDir = false, setValue }: Props) {
width: "100%",
height: "55px",
}}
- variant="outlined"
- type="button"
onClick={handleClick}
+ startIcon={}
+ type="button"
+ variant="outlined"
>
Select
diff --git a/frontend/src/components/buttons/restore_dar_btn.tsx b/frontend/src/components/buttons/unhide_dar_btn.tsx
similarity index 73%
rename from frontend/src/components/buttons/restore_dar_btn.tsx
rename to frontend/src/components/buttons/unhide_dar_btn.tsx
index f8f36ea..8decc5f 100644
--- a/frontend/src/components/buttons/restore_dar_btn.tsx
+++ b/frontend/src/components/buttons/unhide_dar_btn.tsx
@@ -2,18 +2,18 @@ import { Tooltip } from "@mui/material";
import Button from "@mui/material/Button";
import { restoreDarDir } from "@/tauri_cmd";
import toast from "react-hot-toast";
-import RestoreIcon from "@mui/icons-material/Restore";
+import VisibilityIcon from "@mui/icons-material/Visibility";
type Props = {
path: string;
};
-export const RestoreDarBtn = ({ path }: Props) => {
+export const UnhideDarBtn = ({ path }: Props) => {
return (
- Restore the directory hidden by "Hide DAR".(For MO2 user)
+ Unhide the directory hidden by "Hide DAR".(For MO2 user)
}
>
@@ -32,9 +32,9 @@ export const RestoreDarBtn = ({ path }: Props) => {
toast.error(`${err}`);
}
}}
- startIcon={}
+ startIcon={}
>
- Restore DAR
+ Unhide DAR
);
diff --git a/frontend/src/components/form.tsx b/frontend/src/components/form.tsx
index 1c9af1e..bf65fa8 100644
--- a/frontend/src/components/form.tsx
+++ b/frontend/src/components/form.tsx
@@ -7,16 +7,18 @@ import {
Tooltip,
} from "@mui/material";
import Checkbox from "@mui/material/Checkbox";
+import ClearAllIcon from "@mui/icons-material/ClearAll";
+import ConvertButton from "./buttons/convert_btn";
import Grid from "@mui/material/Unstable_Grid2";
+import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
+import toast from "react-hot-toast";
import type { SubmitHandler } from "react-hook-form";
import { Controller, useForm } from "react-hook-form";
-import toast from "react-hot-toast";
-import { convertDar2oar } from "../tauri_cmd";
-import ConvertButton from "./buttons/convert_btn";
import { LogFileButton } from "./buttons/log_file_btn";
-import { SelectPathButton } from "./buttons/path_selector";
import { RemoveOarBtn } from "./buttons/remove_oar_btn";
-import { RestoreDarBtn } from "./buttons/restore_dar_btn";
+import { SelectPathButton } from "./buttons/path_selector";
+import { UnhideDarBtn } from "./buttons/unhide_dar_btn";
+import { convertDar2oar } from "../tauri_cmd";
type FormProps = {
src: string;
@@ -109,8 +111,9 @@ export function ConvertForm() {
}
+ variant="outlined"
>
All Clear
@@ -385,7 +388,6 @@ export function ConvertForm() {
dirname in "DAR(src) Directory*" to make it a
hidden directory(For MO2 users)
-
NOTE: Failure to cross the drive or No permission.
}
@@ -401,7 +403,12 @@ export function ConvertForm() {
aria-label="Hide DAR"
/>
}
- label="Hide DAR"
+ label={
+
+
+ Hide DAR
+
+ }
/>
)}
@@ -409,7 +416,7 @@ export function ConvertForm() {
-
+
>
diff --git a/package.json b/package.json
index c2d74c3..725be99 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "dar-to-oar",
- "version": "0.1.5",
+ "version": "0.1.6",
"license": "MIT",
"private": true,
"scripts": {
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 13419d5..bc68231 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -8,6 +8,9 @@ repository = "https://github.com/SARDONYX-sard/dar2oar"
edition = "2021"
rust-version = "1.60"
+[package.metadata.dist]
+dist = false # To run CI and build separately from CLI (cargo dist)
+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index e88de3f..3d5d44f 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -8,7 +8,7 @@
},
"package": {
"productName": "g_dar2oar",
- "version": "0.1.5"
+ "version": "../package.json"
},
"tauri": {
"allowlist": {
@@ -28,11 +28,7 @@
"all": true
},
"shell": {
- "all": true,
- "execute": false,
- "open": false,
- "scope": [],
- "sidecar": false
+ "all": true
}
},
"bundle": {