mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 16:02:07 +08:00

* Add changelog. Fix zoom docs. Add Info.dev.plist info * Update build assets README.md * Update changelog * actions/checkout@v2 => v3 * Docs
80 lines
4.1 KiB
Plaintext
80 lines
4.1 KiB
Plaintext
---
|
|
sidebar_position: 1
|
|
---
|
|
|
|
# インストール
|
|
|
|
## サポートされているプラットフォーム
|
|
|
|
- Windows 10/11 AMD64/ARM64
|
|
- MacOS 10.13+ AMD64
|
|
- MacOS 11.0+ ARM64
|
|
- Linux AMD64/ARM64
|
|
|
|
## 依存関係
|
|
|
|
Wailsをインストールする前に、下記のものを導入しておく必要があります。
|
|
|
|
- Go 1.18+
|
|
- NPM (Node 15+)
|
|
|
|
### Go
|
|
|
|
Download Go from the [Go Downloads Page](https://go.dev/dl/).
|
|
|
|
公式の[Goインストール手順](https://go.dev/doc/install)に従って、Goをインストールしてください。 その際、`PATH`環境変数に`~/go/bin`ディレクトリへのパスが含まれていることも確認してください。 それらが終わったら、ターミナルを再起動し、以下の確認をしてください:
|
|
|
|
- Goが正しくインストールされているかを確認する: `go version`
|
|
- "~/go/bin"のディレクトリパスがPATH環境変数に含まれているか確認する: `echo $PATH | grep go/bin`
|
|
|
|
### NPM
|
|
|
|
[Nodeダウンロードページ](https://nodejs.org/ja/download/)からNPMをダウンロードしてください。 最新版を利用することをお勧めします。なぜなら、私たちは最新版に対してテストを実施しているためです。
|
|
|
|
`npm --version`を実行して、インストールが完了しているかを確認してください。
|
|
|
|
## プラットフォーム固有の依存関係
|
|
|
|
開発作業を行うプラットフォームによって、必要な依存関係が存在します:
|
|
|
|
```mdx-code-block
|
|
import Tabs from "@theme/Tabs";
|
|
import TabItem from "@theme/TabItem";
|
|
|
|
<Tabs
|
|
defaultValue="Windows"
|
|
values={[
|
|
{ label: "Windows", value: "Windows" },
|
|
{ label: "MacOS", value: "MacOS" },
|
|
{ label: "Linux", value: "Linux" },
|
|
]}
|
|
>
|
|
<TabItem value="MacOS">
|
|
Wails requires that the xcode command line tools are installed. This can be
|
|
done by running <code>xcode-select --install</code>.
|
|
</TabItem>
|
|
<TabItem value="Windows">
|
|
Wails requires that the <a href="https://developer.microsoft.com/en-us/microsoft-edge/webview2/">WebView2</a> runtime is installed. Some Windows installations will already have this installed. You can check using the <code>wails doctor</code> command.
|
|
</TabItem>
|
|
<TabItem value={"Linux"}>
|
|
Linux required the standard <code>gcc</code> build tools plus <code>libgtk3</code> and <code>libwebkit</code>. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run <code>wails doctor</code> after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please consult the <a href={"/docs/guides/linux-distro-support"}>Add Linux Distro</a> guide.
|
|
</TabItem>
|
|
</Tabs>
|
|
```
|
|
|
|
## 任意の依存関係
|
|
|
|
- [UPX](https://upx.github.io/)を導入することで、構築したアプリを圧縮できます。
|
|
|
|
## Wailsのインストール
|
|
|
|
`go install github.com/wailsapp/wails/v2/cmd/wails@latest`を実行して、Wails CLIをインストールしてください。
|
|
|
|
## システムチェック
|
|
|
|
`wails doctor`を実行すると、必要な依存関係が正しくインストールされているかを確認することができます。 正しくインストールされていない場合は、その内容をあなたにお知らせして、どうすれば解決できるかを教えてくれます。
|
|
|
|
## `wails`コマンドが見つからないのですが?
|
|
|
|
`wails`コマンドが見つからないとシステムに怒られた場合は、Goが、公式のGoインストール手順に従って導入されているかを確認してください。 コマンドが見つからないほとんどの理由は、あなたのホームディレクトリ配下にある`go/bin`ディレクトリのパスが、`PATH`環境変数に含まれていないからです。 また、インストールによって行われた環境変更を反映させるために、もともと開いていたコマンドプロンプト(ターミナル)がある場合はそれらをいったん閉じて、再度開きなおしてください。
|