Token导航 LogoToken导航TokenDH.com
AI 工具敏感数据github未标认证来源可访问clear审计通过

distributing-tauri-for-windowsdistributing Tauri FOR windows 命令行

Agent Skill

distributing-tauri-for-windows 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,704

周安装

71

GitHub Stars

18

下载量

568
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:distributing-tauri-for-windows(distributing Tauri FOR windows 命令行)
来源仓库:https://github.com/dchuk/claude-code-tauri-skills
仓库路径:skills/distributing-tauri-for-windows
安装命令:
npx skills add https://github.com/dchuk/claude-code-tauri-skills --skill distributing-tauri-for-windows
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/dchuk/claude-code-tauri-skills --skill distributing-tauri-for-windows

简介

distributing-tauri-for-windows 提供 Tauri v2 应用在 Windows 平台的分发方案与打包指南。

  • 适用于生成 MSI 或 NSIS 安装程序,以及 Microsoft Store 提交流程。
  • 支持多架构构建和跨平台编译环境下的 Windows 安装包制作。
  • 需确认是否具备 Windows 构建环境或交叉编译配置能力。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Distributing Tauri Applications for Windows

This skill covers Windows distribution for Tauri v2 applications, including MSI/NSIS installer creation, customization, and Microsoft Store submission.

Installer Formats Overview

Tauri supports two Windows installer formats:

FormatExtensionBuild PlatformNotes
WiX MSI.msiWindows onlyTraditional Windows installer
NSIS-setup.exeCross-platformCan build on Linux/macOS

Building Installers

Standard Build (Windows)

npm run tauri build
# or
yarn tauri build
# or
pnpm tauri build
# or
cargo tauri build

Target Architectures

# 64-bit (default)
npm run tauri build -- --target x86_64-pc-windows-msvc

# 32-bit
npm run tauri build -- --target i686-pc-windows-msvc

# ARM64 (requires additional VS build tools)
npm run tauri build -- --target aarch64-pc-windows-msvc

Cross-Platform NSIS Build (Linux/macOS)

NSIS installers can be built on non-Windows systems:

Prerequisites (Linux):

# Install NSIS and build tools (Debian/Ubuntu)
sudo apt install nsis lld llvm clang

# Install Windows Rust target
rustup target add x86_64-pc-windows-msvc

# Install cargo-xwin
cargo install --locked cargo-xwin

Prerequisites (macOS):

# Install via Homebrew
brew install nsis llvm

# Add LLVM to PATH
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"

# Install Windows Rust target
rustup target add x86_64-pc-windows-msvc

# Install cargo-xwin
cargo install --locked cargo-xwin

Build command:

npm run tauri build -- --runner cargo-xwin --target x86_64-pc-windows-msvc

WebView2 Installation Modes

Configure how WebView2 runtime is installed on end-user machines:

ModeInternet RequiredSize ImpactBest For
downloadBootstrapperYes0 MBDefault, smallest installer
embedBootstrapperYes~1.8 MBBetter Windows 7 support
offlineInstallerNo~127 MBOffline/air-gapped environments
fixedVersionNo~180 MBControlled enterprise deployment
skipNo0 MBNot recommended

Configuration

{
  "bundle": {
    "windows": {
      "webviewInstallMode": {
        "type": "embedBootstrapper"  // or: downloadBootstrapper, offlineInstaller, fixedVersion
      }
    }
  }
}

For fixedVersion, add the path: "path": "./WebView2Runtime"

WiX MSI Customization

Custom WiX Template

Replace the default template:

{
  "bundle": {
    "windows": {
      "wix": {
        "template": "./windows/custom-template.wxs"
      }
    }
  }
}

WiX Fragments

Add custom functionality via XML fragments:

1. Create fragment file (src-tauri/windows/fragments/registry.wxs):

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>
    <ComponentGroup Id="MyFragmentRegistryEntries">
      <Component Id="MyRegistryEntry" Directory="INSTALLDIR">
        <RegistryKey Root="HKCU" Key="Software\MyApp">
          <RegistryValue Type="string" Name="InstallPath" Value="[INSTALLDIR]" KeyPath="yes"/>
        </RegistryKey>
      </Component>
    </ComponentGroup>
  </Fragment>
</Wix>

2. Reference in configuration:

{
  "bundle": {
    "windows": {
      "wix": {
        "fragmentPaths": ["./windows/fragments/registry.wxs"],
        "componentRefs": ["MyFragmentRegistryEntries"]
      }
    }
  }
}

Internationalization (WiX)

{
  "bundle": {
    "windows": {
      "wix": {
        "language": ["en-US", "fr-FR", "de-DE"],  // Single: "fr-FR"
        "localePath": "./windows/locales"  // Optional: custom locale files
      }
    }
  }
}

NSIS Installer Customization

Install Modes

ModeAdmin RequiredInstall LocationUse Case
perUserNo%LOCALAPPDATA%Default, no elevation
perMachineYes%PROGRAMFILES%System-wide install
bothYesUser choiceFlexible deployment
{
  "bundle": {
    "windows": {
      "nsis": {
        "installMode": "perMachine"
      }
    }
  }
}

Installer Hooks

Extend installation with custom NSIS scripts:

1. Create hooks file (src-tauri/windows/hooks.nsh):

!macro NSIS_HOOK_PREINSTALL
  ; Run before file installation
  DetailPrint "Preparing installation..."
!macroend

!macro NSIS_HOOK_POSTINSTALL
  ; Run after installation completes
  DetailPrint "Configuring application..."
  ; Example: Install VC++ Redistributable
  ReadRegStr $0 HKLM "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" "Installed"
  ${If} $0 != "1"
    ExecWait '"$INSTDIR\vc_redist.x64.exe" /quiet /norestart'
  ${EndIf}
!macroend

!macro NSIS_HOOK_PREUNINSTALL
  ; Run before uninstallation
  DetailPrint "Cleaning up..."
!macroend

!macro NSIS_HOOK_POSTUNINSTALL
  ; Run after uninstallation
  DetailPrint "Removal complete"
!macroend

2. Reference in configuration:

{
  "bundle": {
    "windows": {
      "nsis": {
        "installerHooks": "./windows/hooks.nsh"
      }
    }
  }
}

Internationalization (NSIS)

NSIS installers support multiple languages in a single file:

{
  "bundle": {
    "windows": {
      "nsis": {
        "languages": ["English", "French", "German", "Spanish"],
        "displayLanguageSelector": true
      }
    }
  }
}

Minimum WebView2 Version

Require a specific WebView2 version:

{
  "bundle": {
    "windows": {
      "nsis": {
        "minimumWebview2Version": "110.0.1531.0"
      }
    }
  }
}

Complete Configuration Example

{
  "bundle": {
    "active": true,
    "targets": ["msi", "nsis"],
    "icon": ["icons/icon.ico"],
    "windows": {
      "certificateThumbprint": "YOUR_CERTIFICATE_THUMBPRINT",
      "timestampUrl": "http://timestamp.digicert.com",
      "webviewInstallMode": {
        "type": "embedBootstrapper"
      },
      "wix": {
        "language": ["en-US", "de-DE"],
        "fragmentPaths": ["./windows/fragments/registry.wxs"],
        "componentRefs": ["MyRegistryEntries"]
      },
      "nsis": {
        "installMode": "both",
        "installerHooks": "./windows/hooks.nsh",
        "languages": ["English", "German"],
        "displayLanguageSelector": true,
        "minimumWebview2Version": "110.0.1531.0"
      }
    }
  }
}

Special Configurations

Windows 7 Support

{
  "bundle": {
    "windows": {
      "webviewInstallMode": {
        "type": "embedBootstrapper"
      }
    }
  }
}

Enable Windows 7 notification support in Cargo.toml:

[dependencies]
tauri = { version = "2", features = ["windows7-compat"] }

FIPS Compliance

Set environment variable before building:

PowerShell:

$env:TAURI_BUNDLER_WIX_FIPS_COMPLIANT = "true"
npm run tauri build

Command Prompt:

set TAURI_BUNDLER_WIX_FIPS_COMPLIANT=true
npm run tauri build

Microsoft Store Distribution

Requirements

  1. Microsoft account with developer enrollment
  2. Offline installer WebView2 mode (required by Store policy)
  3. Publisher name different from product name

Store-Specific Configuration

Create tauri.microsoftstore.conf.json:

{
  "bundle": {
    "windows": {
      "webviewInstallMode": {
        "type": "offlineInstaller"
      }
    }
  },
  "identifier": "com.yourcompany.yourapp",
  "publisher": "Your Company Name"
}

Generate Store Icons

npm run tauri icon /path/to/app-icon.png

This generates all required icon sizes including Microsoft Store assets.

Build for Store

npm run tauri build -- --config tauri.microsoftstore.conf.json

Submission Process

  1. Build with offline installer configuration
  2. Sign installer with valid code signing certificate
  3. Create app listing in Partner Center (Apps and Games)
  4. Reserve unique app name
  5. Upload installer to distribution service
  6. Link installer URL in Store listing
  7. Submit for certification

Publisher Name Constraint

Your publisher name cannot match your product name. If your bundle identifier is com.myapp.myapp, explicitly set a different publisher:

{
  "identifier": "com.myapp.myapp",
  "publisher": "MyApp Software Inc"
}

Code Signing

Using Certificate Thumbprint

{
  "bundle": {
    "windows": {
      "certificateThumbprint": "YOUR_CERTIFICATE_THUMBPRINT",
      "timestampUrl": "http://timestamp.digicert.com"
    }
  }
}

Environment Variables

# Certificate path
export TAURI_SIGNING_PRIVATE_KEY_PASSWORD="your-password"

# Or via tauri.conf.json

Timestamp Servers

Common timestamp servers:

  • DigiCert: http://timestamp.digicert.com
  • Sectigo: http://timestamp.sectigo.com
  • GlobalSign: http://timestamp.globalsign.com/tsa/r6advanced1

Troubleshooting

MSI Build Fails on Non-Windows

MSI files can only be built on Windows using WiX Toolset. Use NSIS for cross-platform builds.

WebView2 Not Installing

  1. Check webview install mode configuration
  2. Verify internet connectivity for bootstrapper modes
  3. For offline mode, ensure installer size is acceptable

NSIS Cross-Compilation Errors

  1. Verify NSIS is installed and in PATH
  2. Check LLVM/clang installation
  3. Ensure Windows Rust target is installed
  4. Verify cargo-xwin is installed

Certificate Not Found

  1. Verify certificate is installed in Windows certificate store
  2. Check thumbprint matches exactly (no spaces)
  3. Ensure certificate has private key access

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.83%
按下载量换算152

Gemini CLI

23.24%
按下载量换算132

Antigravity

16.85%
按下载量换算96

windsurf

13.84%
按下载量换算79

OpenCode

8.24%
按下载量换算47

Codex

3.29%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills