Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid bundling dll resources #957

Open
terminaate opened this issue Nov 16, 2024 · 2 comments
Open

Invalid bundling dll resources #957

terminaate opened this issue Nov 16, 2024 · 2 comments

Comments

@terminaate
Copy link

Here's my src-tauri file structure -

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         16-Nov-24     01:50                binaries
d-----         16-Nov-24     01:50                capabilities
d-----         16-Nov-24     08:53                gen
d-----         16-Nov-24     01:50                icons
d-----         16-Nov-24     01:50                mp
d-----         16-Nov-24     01:50                src
d-----         16-Nov-24     08:52                target
-a----         16-Nov-24     01:50            173 .gitignore
-a----         16-Nov-24     01:50             22 .taurignore
-a----         16-Nov-24     01:50            375 2
-a----         16-Nov-24     01:50           1076 build.rs
-a----         16-Nov-24     09:07         140430 Cargo.lock
-a----         16-Nov-24     09:06            800 Cargo.toml
-a----         16-Nov-24     09:41           1775 tauri.conf.json

Inside the mp folder there are a bunch of different dll and exe files, everything works fine for me locally, all the dlls are normally in the bundle. But when I run the build via ci/cd for some reason the dll files seem to be filtered, I attached a zip archive that stores two files, one from the build that I assembled locally on my computer, and the second one that was assembled using ci/cd

tauri.conf -

{
  "build": {
    "beforeDevCommand": "npm run dev",
    "beforeBuildCommand": "npm run build",
    "frontendDist": "../dist",
    "devUrl": "http://localhost:1420"
  },
  "bundle": {
    "externalBin": [
      "binaries/server"
    ],
    "resources": [
      "mp/**/*"
    ],
    "active": true,
    "targets": "all",
    "icon": [
      "icons/32x32.png",
      "icons/128x128.png",
      "icons/[email protected]",
      "icons/icon.icns",
      "icons/icon.ico"
    ],
    "createUpdaterArtifacts": true
  },
  "productName": "...",
  "mainBinaryName": "...",
  "version": "1.1.3",
  "identifier": "...",
  "plugins": {
    "updater": {
    ...
    }
  },
  "app": {
    "security": {
      "csp": null
    },
    "withGlobalTauri": true,
    "windows": [
     ...
    ]
  }
}

ci/cd main.yaml -

name: 'release'

on:
  push:
    branches:
      - main

jobs:
  build:
    permissions:
      contents: write
    strategy:
      fail-fast: false
      matrix:
        include:
          - platform: 'windows-latest'
            args: ''

    runs-on: ${{ matrix.platform }}
    steps:
      - uses: actions/checkout@v4

      - name: setup node
        uses: actions/setup-node@v4
        with:
          node-version: lts/*
          cache: 'npm' # Set this to npm, yarn or pnpm.

      - name: install Rust stable
        uses: dtolnay/rust-toolchain@stable
        with:
          # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
          targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

      - name: Rust cache
        uses: swatinem/rust-cache@v2
        with:
          workspaces: './src-tauri -> target'

      - name: install frontend dependencies
        # If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
        run: npm i -f

      - uses: tauri-apps/tauri-action@v0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
          TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
        with:
          tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
          releaseName: 'v__VERSION__'
          releaseBody: 'See the assets to download this version and install.'
          releaseDraft: true
          prerelease: false
          includeUpdaterJson: true
          args: ${{ matrix.args }}
@FabianLars
Copy link
Member

just to be sure, can you delete your src-tauri/target/ folder and try again locally?

if this still works i'm afraid i don't know how to help without a minimal reproduction repo.

@terminaate
Copy link
Author

just to be sure, can you delete your src-tauri/target/ folder and try again locally?

if this still works i'm afraid i don't know how to help without a minimal reproduction repo.

I tried this many times, deleting all cache, i guess later i could create a minimal repo for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants