5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-06 01:40:03 +08:00
wails/website/i18n/vi/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx
github-actions[bot] a4428022ec
docs: sync translations (#3543)
* docs: sync translations

* Fix build

---------

Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-06-22 14:07:04 +10:00

72 lines
2.1 KiB
Plaintext

# NSIS installer
```mdx-code-block
<p style={{ "text-align": "center" }}>
<img
src={require("@site/static/img/nsis.webp").default}
style={{ "max-width": "50%" }}
/>
<br />
</p>
```
Wails supports generating Windows installers using the [NSIS installer](https://nsis.sourceforge.io/).
## Installing NSIS
### Windows
The installer is available on the [NSIS Download](https://nsis.sourceforge.io/Download) page.
You can install with [Scoop](https://scoop.sh/) (which will automatically add it to your PATH):
```
scoop bucket add extras
scoop install nsis
```
Or, you can use Winget (on Windows 10+):
```
winget install NSIS.NSIS --silent
```
Nếu bạn sử dụng chocolatey package manager, chạy đoạn mã lệnh sau:
```
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. [Đây](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) là một ví dụ cụ thể về cách thức thêm đường dẫn trên Windows.
### Linux
Gói `NSIS` sẽ có sẵn thông qua quá trình phân phối của package manager.
### MacOS
NSIS sẽ có sẵn để cài đặt thông qua homebrew: `brew install nsis`.
## Khởi Tạo Trình Cài Đặt
Khi một dư án mới được khởi tạo, Wails sẽ tự động thiết lập các tệp cấu hình cho NSIS trong thư mục `build/windows/installer`. Các dữ liệu của cấu hình được đọc trong tệp `installer/info.json` và các cấu hình đó được sử dụng trong phần Info của file dự án `wails.json`:
```json
// ...
"Info": {
"companyName": "My Company Name",
"productName": "Wails Vite",
"productVersion": "1.0.0",
"copyright": "Copyright.........",
"comments": "Built using Wails (https://wails.io)"
},
```
Để khởi tạo trình cài đặt cho ứng dụng, bạn hãy dùng thêm lệnh `-nsis` phía sau lệnh `wails build`:
```
wails build -nsis
```
Trình cài đặt giờ đay đã sẵn sàng để sử dụng trong thue mục `build/bin`.