From ae4b9dfbe3a89cc8471872697a2e5e998f005f81 Mon Sep 17 00:00:00 2001 From: dvub Date: Wed, 18 Dec 2024 16:55:26 -0800 Subject: [PATCH] I THINK ITS GETTING GOOD --- .github/workflows/build.yml | 15 +++++++++++++-- .gitignore | 1 + gui/next.config.ts | 2 +- src/editor.rs | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f83f52..b75cdf2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: include: - - { name: Ubuntu (latest), os: ubuntu-latest, cross-target: "" } + - { name: Ubuntu (latest), os: ubuntu-latest, cross-target: "" } # - { # name: macos-universal, # os: macos-latest, @@ -78,7 +78,18 @@ jobs: - name: Package all targets from bundler.toml # Instead of hardcoding which targets to build and package, we'll # package everything that's got en entry in the `bundler.toml` file - run: cargo xtask bundle midiometry --release + run: | + runner_name=${{ matrix.name }} + if [[ $runner_name = 'macos-universal' ]]; then + export MACOSX_DEPLOYMENT_TARGET=10.13 + cargo xtask bundle-universal midiometry --release + else + cross_target=${{ matrix.cross-target }} + if [[ -n $cross_target ]]; then + package_args+=("--target" "$cross_target") + fi + cargo xtask bundle midiometry --release + fi - name: Determine build archive name run: | diff --git a/.gitignore b/.gitignore index ea8c4bf..b11c544 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +/assets \ No newline at end of file diff --git a/gui/next.config.ts b/gui/next.config.ts index 6bba932..1f7ee96 100644 --- a/gui/next.config.ts +++ b/gui/next.config.ts @@ -3,7 +3,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { /* config options here */ output: 'export', - distDir: '../target/bundled/dist/' + distDir: '../assets' }; export default nextConfig; diff --git a/src/editor.rs b/src/editor.rs index 1db70a2..7cd99ea 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -41,7 +41,7 @@ pub fn create_editor(buffer: Consumer>) -> WebViewEditor { &path[1..] }; - let dir = include_dir!("$CARGO_MANIFEST_DIR/target/bundled/dist"); + let dir = include_dir!("$CARGO_MANIFEST_DIR/assets/"); // mime guess is awesome! let mime_type =