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

Building installer on Windows with wix options specified failed for the first ever call #2927

Closed
kimlimjustin opened this issue Nov 19, 2021 · 5 comments
Labels
platform: Windows priority: 2 medium scope: bundler The bundler used in our cli to make installers type: bug

Comments

@kimlimjustin
Copy link
Contributor

Describe the bug

Building installer on Windows with Wix options (license, template) specified failed if the user never called the build before.

To Reproduce

Steps to reproduce the behavior:

  1. Run yarn create tauri-app.
  2. Select the vanilla template and leave everything simple
  3. Open the tauri-app generated
  4. Create a LICENSE file
  5. Link that LICENSE file by adding license key into tauri.bundle.windows.wix of src-tauri/tauri.conf.json with the value of ../LICENSE
  6. Run build
  7. See the error

Now to fix that:

  1. Remove the license section
  2. Run build
  3. Add back the license section
  4. Now it's ok

Expected behavior

It works fine even on the first call, cuz when calling the build via workflow, it will all fail (unless trick it by running prebuild and postbuild)

Screenshots

Code Structure:
image

Platform and Versions (required):

Operating System - Windows, version 10.0.22000 X64
Webview2 - 95.0.1020.53

Node.js environment
  Node.js - 16.0.0
  @tauri-apps/cli - 1.0.0-beta.10
  @tauri-apps/api - Not installed

Global packages
  npm - 7.10.0
  yarn - 1.22.11

Rust environment
  rustc - 1.56.0
  cargo - 1.56.0

App directory structure
/dist
/node_modules
/src-tauri

App
  tauri.rs - 1.0.0-beta.8
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  distDir - ../dist
  devPath - ../dist
build-type
CSP
@amrbashir
Copy link
Member

amrbashir commented Nov 30, 2021

Opened a PR at #2987 that should fix this. Please next time include the error, it would've saved me some time.

@kimlimjustin
Copy link
Contributor Author

Not sure if I tested it correctly, but it still does not work.

tauri = { git="https://github.com/tauri-apps/tauri", branch="feat/active-toolchain", features = ["api-all"] }

image

Please next time include the error, it would've saved me some time.

Really sorry but I thought the error message is not something significant because it's not that informative (for me) and I didn't even understand what it's saying about

@amrbashir
Copy link
Member

amrbashir commented Nov 30, 2021

@kimlimjustin Oh sorry I linked the wrong PR (updated the comment)>

To test this you need to build the cli.rs crate not the tauri crate. try cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch fix/wix-license .

@kimlimjustin
Copy link
Contributor Author

@FabianLars
Copy link
Member

I don't think it's fixed tho...

Like amr said, you need to use the git version of the rust based cli. That workflow run used the npm package, which will use the last released version of cli.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows priority: 2 medium scope: bundler The bundler used in our cli to make installers type: bug
Projects
None yet
Development

No branches or pull requests

3 participants