0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

TauriでWindows向け日本語インストーラーをビルドするw/NSIS

Last updated at Posted at 2025-03-29

セットアップも終わってウキウキでnpm tauri buildを実行したら「light.exeが実行できなかった」と言われてしまいました。
情報共有記事です。「こうすれば解決できたのに...」という手段があれば是非教えて頂きたいです。

解決

wixではなく、NSISを使うことで解決

NSISでのビルドはTauriの方ではExperimental(実験段階)として提供されています。予めご確認をお願いします。

1. tauri.config.jsonを修正

tauri.config.json
{
  // 省略
  "bundle": {
    "active": true,
    "targets": ["nsis"], // +-修正
    // 省略
    "windows": {
      "nsis": {
        "languages": ["Japanese"]
      }
    }
  }
}

2. LLD(LLVM)をインストール

3. Rustの方の設定

シェルの方で実行してください。

rustup target add x86_64-pc-windows-msvc
cargo install --locked cargo-xwin

4. ビルドスクリプトを追記

package.json
{
  // 省略
  "scripts": {
    // 省略
    "tauri:build": "tauri build --runner cargo-xwin --target x86_64-pc-windows-msvc",
  },
  // 省略
}

あとはnpm run tauri:buildを実行していただくだけです。お疲れ様でした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?