5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-06 06:30:14 +08:00
wails/website/i18n/ja/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx
2024-06-16 13:10:56 +10:00

72 lines
2.3 KiB
Plaintext

# NSISインストーラ
```mdx-code-block
<p style={{ "text-align": "center" }}>
<img
src={require("@site/static/img/nsis.webp").default}
style={{ "max-width": "50%" }}
/>
<br />
</p>
```
Wailsでは、[NSISインストーラ](https://nsis.sourceforge.io/)を使用したWindowsインストーラの生成をサポートしています。
## NSISのインストール
### Windows
インストーラは、[NSISダウンロード](https://nsis.sourceforge.io/Download)ページから入手できます。
You can install with [Scoop](https://scoop.sh/) (which will automatically add it to your PATH):
```
scoop add bucket extras
scoop install nsis
```
Or, you can use Winget (on Windows 10+):
```
winget install NSIS.NSIS --silent
```
Chocolateyパッケージマネージャを使用している場合は、次のスクリプトを実行することでインストールできます:
```
choco install nsis
```
**NOTE:** If you install NSIS manually, you need to add the _Bin_ folder, which contains `makensis.exe`, in your NSIS installation to your path. Windows上でパスを追加する方法については、[こちら](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/)の優れたチュートリアルをご覧ください。
### Linux
`nsis`パッケージは、ディストリビューションのパッケージマネージャから入手できます。
### MacOS
NSISは、homebrew経由でインストールできます: `brew install nsis`。
## インストーラの生成
新しくプロジェクトが作成されると、Wailsは、`build/windows/installer`内に、NSIS構成ファイルを生成します。 構成データは`installer/info.json`から読み込まれますが、当該データはプロジェクトの`wails.json`のInfo§の情報を使用するように設定されています:
```json
// ...
"Info": {
"companyName": "My Company Name",
"productName": "Wails Vite",
"productVersion": "1.0.0",
"copyright": "Copyright.........",
"comments": "Built using Wails (https://wails.io)"
},
```
アプリケーションのインストーラを生成するには、`wails build`コマンド実行時に、`-nsis`フラグを使用します:
```
wails build -nsis
```
これにより、`build/bin`ディレクトリにインストーラが生成されます。