mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c3faf60707 | |||
| 3dbe6e96c1 | |||
| 28a2b4fbd9 | |||
| 6d857bf61a | |||
| 4814e65da2 | |||
| 644dc653a9 | |||
| 19932bf3ad | |||
| d3a4d89786 | |||
| 84919468ba | |||
| bd5b7e5e3f | |||
| 4f3dc1b0e1 | |||
| 65c68301a0 | |||
| 37e43dabc0 | |||
| ec19458c1b | |||
| 35eb1e0160 | |||
| 12a9ff17d6 | |||
| a7116ff5e7 |
@@ -1,29 +1,35 @@
|
||||
# Description
|
||||
|
||||
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
|
||||
Please include a summary of the change and which issue is fixed. Please also
|
||||
include relevant motivation and context. List any dependencies that are required
|
||||
for this change.
|
||||
|
||||
Fixes # (issue)
|
||||
|
||||
## Type of change
|
||||
|
||||
|
||||
Please delete options that are not relevant.
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to
|
||||
not work as expected)
|
||||
- [ ] This change requires a documentation update
|
||||
|
||||
# How Has This Been Tested?
|
||||
|
||||
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using `wails doctor`.
|
||||
|
||||
Please describe the tests that you ran to verify your changes. Provide
|
||||
instructions so we can reproduce. Please also list any relevant details for your
|
||||
test configuration using `wails doctor`.
|
||||
|
||||
- [ ] Windows
|
||||
- [ ] macOS
|
||||
- [ ] Linux
|
||||
|
||||
|
||||
## Test Configuration
|
||||
|
||||
Please paste the output of `wails doctor`. If you are unable to run this command, please describe your environment in as much detail as possible.
|
||||
Please paste the output of `wails doctor`. If you are unable to run this
|
||||
command, please describe your environment in as much detail as possible.
|
||||
|
||||
# Checklist:
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Format Markdown Files
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
format_markdown_files:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.x
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Format All Markdown Files
|
||||
run: task format-all-md
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
commit-message: "docs: format document"
|
||||
title: "docs: format document"
|
||||
body: "- [x] Format all Markdown(x) documents"
|
||||
branch: chore/format-markdown-files
|
||||
delete-branch: true
|
||||
draft: false
|
||||
@@ -2,6 +2,8 @@ name: Sync Translations
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
sync-translated-documents:
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
website
|
||||
v2
|
||||
v3
|
||||
@@ -0,0 +1,6 @@
|
||||
overrides:
|
||||
- files:
|
||||
- "**/*.md"
|
||||
options:
|
||||
printWidth: 80
|
||||
proseWrap: always
|
||||
+2
-1
@@ -1 +1,2 @@
|
||||
The current Contribution Guidelines can be found at: https://wails.io/community-guide
|
||||
The current Contribution Guidelines can be found at:
|
||||
https://wails.io/community-guide
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
|
||||
The latest contributors list may be found at: https://wails.io/credits#contributors
|
||||
The latest contributors list may be found at:
|
||||
https://wails.io/credits#contributors
|
||||
|
||||
+43
-20
@@ -42,7 +42,8 @@
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
@@ -66,38 +67,46 @@
|
||||
|
||||
## はじめに
|
||||
|
||||
Go プログラムにウェブインタフェースを提供する従来の方法は内蔵のウェブサーバを経由するものですが、 Wails では異なるアプローチを提供します。
|
||||
Wails では Go のコードとウェブフロントエンドを単一のバイナリにまとめる機能を提供します。
|
||||
また、プロジェクトの作成、コンパイル、ビルドを行うためのツールが提供されています。あなたがすべきことは創造性を発揮することです!
|
||||
Go プログラムにウェブインタフェースを提供する従来の方法は内蔵のウェブサーバを経
|
||||
由するものですが、 Wails では異なるアプローチを提供します。 Wails では Go のコー
|
||||
ドとウェブフロントエンドを単一のバイナリにまとめる機能を提供します。また、プロジ
|
||||
ェクトの作成、コンパイル、ビルドを行うためのツールが提供されています。あなたがす
|
||||
べきことは創造性を発揮することです!
|
||||
|
||||
### 公式サイト
|
||||
|
||||
Version 2:
|
||||
|
||||
Wails v2 が 3 つのプラットフォームでベータ版としてリリースされました。興味のある方は[新しいウェブサイト](https://wails.io)をご覧ください。
|
||||
Wails v2 が 3 つのプラットフォームでベータ版としてリリースされました。興味のある
|
||||
方は[新しいウェブサイト](https://wails.io)をご覧ください。
|
||||
|
||||
レガシー版 v1:
|
||||
|
||||
レガシー版 v1 のドキュメントは[https://wails.app](https://wails.app)で見ることができます。
|
||||
レガシー版 v1 のドキュメントは[https://wails.app](https://wails.app)で見ることが
|
||||
できます。
|
||||
|
||||
### ロードマップ
|
||||
|
||||
プロジェクトのロードマップは[こちら](https://github.com/wailsapp/wails/discussions/1484)になります。
|
||||
プロジェクトのロードマップ
|
||||
は[こちら](https://github.com/wailsapp/wails/discussions/1484)になります。
|
||||
機能拡張のリクエストを出す前にご覧ください。
|
||||
|
||||
## 特徴
|
||||
|
||||
- バックエンドには Go を利用しています
|
||||
- 使い慣れたフロントエンド技術を利用して UI を構築できます
|
||||
- あらかじめ用意されたテンプレートを利用することで、リッチなフロントエンドを備えた Go プログラムを作成できます
|
||||
- あらかじめ用意されたテンプレートを利用することで、リッチなフロントエンドを備え
|
||||
た Go プログラムを作成できます
|
||||
- JavaScript から Go のメソッドを簡単に呼び出すことができます
|
||||
- あなたの書いた Go の構造体やメソットに応じた TypeScript の定義が自動生成されます
|
||||
- あなたの書いた Go の構造体やメソットに応じた TypeScript の定義が自動生成されま
|
||||
す
|
||||
- ネイティブのダイアログとメニューが利用できます
|
||||
- モダンな半透明や「frosted window」エフェクトをサポートしています
|
||||
- Go と JavaScript 間で統一されたイベント・システムを備えています
|
||||
- プロジェクトを素早く生成して構築する強力な cli ツールを用意しています
|
||||
- マルチプラットフォームに対応しています
|
||||
- ネイティブなレンダリングエンジンを使用しています - _つまりブラウザを埋め込んでいるわけではありません!_
|
||||
- ネイティブなレンダリングエンジンを使用しています - _つまりブラウザを埋め込んで
|
||||
いるわけではありません!_
|
||||
|
||||
## スポンサー
|
||||
|
||||
@@ -106,25 +115,34 @@ Wails v2 が 3 つのプラットフォームでベータ版としてリリー
|
||||
|
||||
## 始め方
|
||||
|
||||
インストール方法は[公式サイト](https://wails.io/docs/gettingstarted/installation)に掲載されています。
|
||||
インストール方法
|
||||
は[公式サイト](https://wails.io/docs/gettingstarted/installation)に掲載されてい
|
||||
ます。
|
||||
|
||||
## FAQ
|
||||
|
||||
- Electron の代替品になりますか?
|
||||
|
||||
それはあなたの求める要件によります。Wails は Go プログラマーが簡単に軽量のデスクトップアプリケーションを作成したり、既存のアプリケーションにフロントエンドを追加できるように設計されています。
|
||||
Wails v2 ではメニューやダイアログといったネイティブな要素を提供するようになったため、軽量な Electron の代替となりつつあります。
|
||||
それはあなたの求める要件によります。Wails は Go プログラマーが簡単に軽量のデス
|
||||
クトップアプリケーションを作成したり、既存のアプリケーションにフロントエンドを
|
||||
追加できるように設計されています。 Wails v2 ではメニューやダイアログといったネ
|
||||
イティブな要素を提供するようになったため、軽量な Electron の代替となりつつあり
|
||||
ます。
|
||||
|
||||
- このプロジェクトは誰に向けたものですか?
|
||||
|
||||
HTML/JS/CSS のフロントエンド技術をアプリケーションにバンドルさせることで、サーバーを作成してブラウザ経由で表示させることなくアプリケーションを利用したい Go プログラマにおすすめです。
|
||||
HTML/JS/CSS のフロントエンド技術をアプリケーションにバンドルさせることで、サー
|
||||
バーを作成してブラウザ経由で表示させることなくアプリケーションを利用したい Go
|
||||
プログラマにおすすめです。
|
||||
|
||||
- 名前の由来を教えて下さい
|
||||
|
||||
WebView を見たとき、私はこう思いました。
|
||||
「私が本当に欲しいのは、WebView アプリを構築するためのツールであり、Ruby に対する Rails のようなものである」と。
|
||||
「私が本当に欲しいのは、WebView アプリを構築するためのツールであり、Ruby に対
|
||||
する Rails のようなものである」と。
|
||||
そのため、最初は言葉遊びのつもりでした(Webview on Rails)。
|
||||
また、私の[出身国](https://en.wikipedia.org/wiki/Wales)の英語名と同音異義語でもあります。そしてこの名前が定着しました。
|
||||
また、私の[出身国](https://en.wikipedia.org/wiki/Wales)の英語名と同音異義語で
|
||||
もあります。そしてこの名前が定着しました。
|
||||
|
||||
## スター数の推移
|
||||
|
||||
@@ -133,15 +151,20 @@ Wails v2 が 3 つのプラットフォームでベータ版としてリリー
|
||||
## コントリビューター
|
||||
|
||||
貢献してくれた方のリストが大きくなりすぎて、readme に入りきらなくなりました!
|
||||
このプロジェクトに貢献してくれた素晴らしい方々のページは[こちら](https://wails.io/credits#contributors)です。
|
||||
このプロジェクトに貢献してくれた素晴らしい方々のページ
|
||||
は[こちら](https://wails.io/credits#contributors)です。
|
||||
|
||||
## 特記事項
|
||||
|
||||
このプロジェクトは以下の方々の協力がなければ、実現しなかったと思います。
|
||||
|
||||
- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - 彼のサポートとフィードバックはとても大きいものでした。
|
||||
- [Serge Zaitsev](https://github.com/zserge) - Wails のウィンドウで使用している[Webview](https://github.com/zserge/webview)の作者です。
|
||||
- [Byron](https://github.com/bh90210) - 時には Byron が一人でこのプロジェクトを存続させてくれたこともありました。彼の素晴らしいインプットがなければ v1 に到達することはなかったでしょう。
|
||||
- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - 彼のサポートとフィード
|
||||
バックはとても大きいものでした。
|
||||
- [Serge Zaitsev](https://github.com/zserge) - Wails のウィンドウで使用してい
|
||||
る[Webview](https://github.com/zserge/webview)の作者です。
|
||||
- [Byron](https://github.com/bh90210) - 時には Byron が一人でこのプロジェクトを
|
||||
存続させてくれたこともありました。彼の素晴らしいインプットがなければ v1 に到達
|
||||
することはなかったでしょう。
|
||||
|
||||
プロジェクトを進める際に、以下のアルバムたちも支えてくれています。
|
||||
|
||||
|
||||
+25
-21
@@ -42,7 +42,8 @@
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
@@ -64,16 +65,17 @@
|
||||
|
||||
## 소개
|
||||
|
||||
Go 프로그램에 웹 인터페이스를 제공하는 전통적인 방법은 내장 웹 서버를 이용하는 것입니다.
|
||||
Wails는 다르게 접근합니다: Go 코드와 웹 프론트엔드를 단일 바이너리로 래핑하는 기능을 제공합니다.
|
||||
프로젝트 생성, 컴파일 및 번들링을 처리하여 이를 쉽게 수행할 수 있도록 도구가 제공됩니다.
|
||||
창의력을 발휘하기만 하면 됩니다!
|
||||
Go 프로그램에 웹 인터페이스를 제공하는 전통적인 방법은 내장 웹 서버를 이용하는
|
||||
것입니다. Wails는 다르게 접근합니다: Go 코드와 웹 프론트엔드를 단일 바이너리로
|
||||
래핑하는 기능을 제공합니다. 프로젝트 생성, 컴파일 및 번들링을 처리하여 이를 쉽게
|
||||
수행할 수 있도록 도구가 제공됩니다. 창의력을 발휘하기만 하면 됩니다!
|
||||
|
||||
## 기능
|
||||
|
||||
- 백엔드에 표준 Go 사용
|
||||
- 이미 익숙한 프론트엔드 기술을 사용하여 UI 구축
|
||||
- 사전 구축된 템플릿을 사용하여 Go 프로그램을 위한 풍부한 프론트엔드를 빠르게 생성
|
||||
- 사전 구축된 템플릿을 사용하여 Go 프로그램을 위한 풍부한 프론트엔드를 빠르게 생
|
||||
성
|
||||
- Javascript에서 Go 메서드를 쉽게 호출
|
||||
- Go 구조체 및 메서드에 대한 자동 생성된 Typescript 정의
|
||||
- 기본 대화 및 메뉴
|
||||
@@ -86,13 +88,13 @@ Wails는 다르게 접근합니다: Go 코드와 웹 프론트엔드를 단일
|
||||
|
||||
### 로드맵
|
||||
|
||||
프로젝트 로드맵은 [여기](https://github.com/wailsapp/wails/discussions/1484)에서
|
||||
프로젝트 로드맵은 [여기](https://github.com/wailsapp/wails/discussions/1484)에서
|
||||
확인할 수 있습니다. 개선 요청을 하기 전에 이것을 참조하십시오.
|
||||
|
||||
## 시작하기
|
||||
|
||||
설치 지침은
|
||||
[공식 웹사이트](https://wails.io/docs/gettingstarted/installation)에 있습니다.
|
||||
설치 지침은 [공식 웹사이트](https://wails.io/docs/gettingstarted/installation)에
|
||||
있습니다.
|
||||
|
||||
## 스폰서
|
||||
|
||||
@@ -103,22 +105,23 @@ Wails는 다르게 접근합니다: Go 코드와 웹 프론트엔드를 단일
|
||||
|
||||
- 이것은 Electron의 대안인가요?
|
||||
|
||||
요구 사항에 따라 다릅니다. Go 프로그래머가 쉽게 가벼운 데스크톱 애플리케이션을
|
||||
만들거나 기존 애플리케이션에 프론트엔드를 추가할 수 있도록 설계되었습니다.
|
||||
Wails는 메뉴 및 대화 상자와 같은 기본 요소를 제공하므로 가벼운 Electron 대안으로
|
||||
간주될 수 있습니다.
|
||||
요구 사항에 따라 다릅니다. Go 프로그래머가 쉽게 가벼운 데스크톱 애플리케이션을
|
||||
만들거나 기존 애플리케이션에 프론트엔드를 추가할 수 있도록 설계되었습니다.
|
||||
Wails는 메뉴 및 대화 상자와 같은 기본 요소를 제공하므로 가벼운 Electron 대안으
|
||||
로 간주될 수 있습니다.
|
||||
|
||||
- 이 프로젝트는 누구를 대상으로 하나요?
|
||||
|
||||
서버를 생성하고 이를 보기 위해 브라우저를 열 필요 없이 HTML/JS/CSS 프런트엔드를
|
||||
애플리케이션과 함께 묶고자 하는 프로그래머를 대상으로 합니다.
|
||||
서버를 생성하고 이를 보기 위해 브라우저를 열 필요 없이 HTML/JS/CSS 프런트엔드
|
||||
를 애플리케이션과 함께 묶고자 하는 프로그래머를 대상으로 합니다.
|
||||
|
||||
- Wails 이름의 의미는 무엇인가요?
|
||||
|
||||
WebView를 보았을 때 저는 "내가 정말로 원하는 것은 WebView 앱을 구축하기 위한
|
||||
도구를 사용하는거야. 마치 Ruby on Rails 처럼 말이야."라고 생각했습니다.
|
||||
그래서 처음에는 말장난(Webview on Rails)이었습니다.
|
||||
[국가](https://en.wikipedia.org/wiki/Wales)에 대한 영어 이름의 동음이의어이기도 하여 정했습니다.
|
||||
WebView를 보았을 때 저는 "내가 정말로 원하는 것은 WebView 앱을 구축하기 위한
|
||||
도구를 사용하는거야. 마치 Ruby on Rails 처럼 말이야."라고 생각했습니다. 그래서
|
||||
처음에는 말장난(Webview on Rails)이었습니다.
|
||||
[국가](https://en.wikipedia.org/wiki/Wales)에 대한 영어 이름의 동음이의어이기
|
||||
도 하여 정했습니다.
|
||||
|
||||
## Stargazers 성장 추세
|
||||
|
||||
@@ -126,8 +129,9 @@ Wails는 다르게 접근합니다: Go 코드와 웹 프론트엔드를 단일
|
||||
|
||||
## 기여자
|
||||
|
||||
기여자 목록이 추가 정보에 비해 너무 커지고 있습니다! 이 프로젝트에 기여한 모든 놀라운 사람들은
|
||||
[여기](https://wails.io/credits#contributors)에 자신의 페이지를 가지고 있습니다.
|
||||
기여자 목록이 추가 정보에 비해 너무 커지고 있습니다! 이 프로젝트에 기여한 모든
|
||||
놀라운 사람들은 [여기](https://wails.io/credits#contributors)에 자신의 페이지를
|
||||
가지고 있습니다.
|
||||
|
||||
## 라이센스
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
@@ -62,9 +63,11 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
The traditional method of providing web interfaces to Go programs is via a built-in web server. Wails offers a different
|
||||
approach: it provides the ability to wrap both Go code and a web frontend into a single binary. Tools are provided to
|
||||
make this easy for you by handling project creation, compilation and bundling. All you have to do is get creative!
|
||||
The traditional method of providing web interfaces to Go programs is via a
|
||||
built-in web server. Wails offers a different approach: it provides the ability
|
||||
to wrap both Go code and a web frontend into a single binary. Tools are provided
|
||||
to make this easy for you by handling project creation, compilation and
|
||||
bundling. All you have to do is get creative!
|
||||
|
||||
## Features
|
||||
|
||||
@@ -83,12 +86,14 @@ make this easy for you by handling project creation, compilation and bundling. A
|
||||
|
||||
### Roadmap
|
||||
|
||||
The project roadmap may be found [here](https://github.com/wailsapp/wails/discussions/1484). Please consult
|
||||
this before open up an enhancement request.
|
||||
The project roadmap may be found
|
||||
[here](https://github.com/wailsapp/wails/discussions/1484). Please consult this
|
||||
before open up an enhancement request.
|
||||
|
||||
## Getting Started
|
||||
|
||||
The installation instructions are on the [official website](https://wails.io/docs/gettingstarted/installation).
|
||||
The installation instructions are on the
|
||||
[official website](https://wails.io/docs/gettingstarted/installation).
|
||||
|
||||
## Sponsors
|
||||
|
||||
@@ -103,20 +108,24 @@ This project is supported by these kind people / companies:
|
||||
|
||||
- Is this an alternative to Electron?
|
||||
|
||||
Depends on your requirements. It's designed to make it easy for Go programmers to make lightweight desktop
|
||||
applications or add a frontend to their existing applications. Wails does offer native elements such as menus
|
||||
and dialogs, so it could be considered a lightweight electron alternative.
|
||||
Depends on your requirements. It's designed to make it easy for Go programmers
|
||||
to make lightweight desktop applications or add a frontend to their existing
|
||||
applications. Wails does offer native elements such as menus and dialogs, so
|
||||
it could be considered a lightweight electron alternative.
|
||||
|
||||
- Who is this project aimed at?
|
||||
|
||||
Go programmers who want to bundle an HTML/JS/CSS frontend with their applications, without resorting to creating a
|
||||
server and opening a browser to view it.
|
||||
Go programmers who want to bundle an HTML/JS/CSS frontend with their
|
||||
applications, without resorting to creating a server and opening a browser to
|
||||
view it.
|
||||
|
||||
- What's with the name?
|
||||
|
||||
When I saw WebView, I thought "What I really want is tooling around building a WebView app, a bit like Rails is to
|
||||
Ruby". So initially it was a play on words (Webview on Rails). It just so happened to also be a homophone of the
|
||||
English name for the [Country](https://en.wikipedia.org/wiki/Wales) I am from. So it stuck.
|
||||
When I saw WebView, I thought "What I really want is tooling around building a
|
||||
WebView app, a bit like Rails is to Ruby". So initially it was a play on words
|
||||
(Webview on Rails). It just so happened to also be a homophone of the English
|
||||
name for the [Country](https://en.wikipedia.org/wiki/Wales) I am from. So it
|
||||
stuck.
|
||||
|
||||
## Stargazers over time
|
||||
|
||||
@@ -124,8 +133,9 @@ This project is supported by these kind people / companies:
|
||||
|
||||
## Contributors
|
||||
|
||||
The contributors list is getting too big for the readme! All the amazing people who have contributed to this
|
||||
project have their own page [here](https://wails.io/credits#contributors).
|
||||
The contributors list is getting too big for the readme! All the amazing people
|
||||
who have contributed to this project have their own page
|
||||
[here](https://wails.io/credits#contributors).
|
||||
|
||||
## License
|
||||
|
||||
|
||||
+18
-9
@@ -42,7 +42,8 @@
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
@@ -64,8 +65,9 @@
|
||||
|
||||
## 项目介绍
|
||||
|
||||
为 Go 程序提供 Web 界面的传统方法是通过内置 Web 服务器。Wails 提供了一种不同的方法:它提供了将 Go 代码和 Web
|
||||
前端一起打包成单个二进制文件的能力。通过提供的工具,可以很轻松的完成项目的创建、编译和打包。你所要做的就是发挥创造力!
|
||||
为 Go 程序提供 Web 界面的传统方法是通过内置 Web 服务器。Wails 提供了一种不同的方
|
||||
法:它提供了将 Go 代码和 Web 前端一起打包成单个二进制文件的能力。通过提供的工具
|
||||
,可以很轻松的完成项目的创建、编译和打包。你所要做的就是发挥创造力!
|
||||
|
||||
## 功能
|
||||
|
||||
@@ -83,7 +85,8 @@
|
||||
|
||||
### 路线图
|
||||
|
||||
项目路线图可在 [此处](https://github.com/wailsapp/wails/discussions/1484) 找到。在提出增强请求之前请查阅此内容。
|
||||
项目路线图可在 [此处](https://github.com/wailsapp/wails/discussions/1484) 找到。
|
||||
在提出增强请求之前请查阅此内容。
|
||||
|
||||
## 快速入门
|
||||
|
||||
@@ -99,16 +102,21 @@
|
||||
|
||||
- 它是 Electron 的替代品吗?
|
||||
|
||||
取决于您的要求。它旨在使 Go 程序员可以轻松制作轻量级桌面应用程序或在其现有应用程序中添加前端。尽管 Wails 当前不提供对诸如菜单之类的原生元素的钩子,但将来可能会改变。
|
||||
取决于您的要求。它旨在使 Go 程序员可以轻松制作轻量级桌面应用程序或在其现有应用
|
||||
程序中添加前端。尽管 Wails 当前不提供对诸如菜单之类的原生元素的钩子,但将来可
|
||||
能会改变。
|
||||
|
||||
- 这个项目针对的是哪些人?
|
||||
|
||||
希望将 HTML / JS / CSS 前端与其应用程序捆绑在一起的程序员,而不是借助创建服务并打开浏览器进行查看的方式。
|
||||
希望将 HTML / JS / CSS 前端与其应用程序捆绑在一起的程序员,而不是借助创建服务
|
||||
并打开浏览器进行查看的方式。
|
||||
|
||||
- 名字怎么来的?
|
||||
|
||||
当我看到 WebView 时,我想"我真正想要的是围绕构建 WebView 应用程序工作,有点像 Rails 对于 Ruby"。因此,最初它是一个文字游戏(Webview on
|
||||
Rails)。碰巧也是我来自的 [国家](https://en.wikipedia.org/wiki/Wales) 的英文名字的同音。所以就是它了。
|
||||
当我看到 WebView 时,我想"我真正想要的是围绕构建 WebView 应用程序工作,有点像
|
||||
Rails 对于 Ruby"。因此,最初它是一个文字游戏(Webview on Rails)。碰巧也是我来
|
||||
自的 [国家](https://en.wikipedia.org/wiki/Wales) 的英文名字的同音。所以就是它
|
||||
了。
|
||||
|
||||
## 星星增长趋势
|
||||
|
||||
@@ -116,7 +124,8 @@
|
||||
|
||||
## 贡献者
|
||||
|
||||
贡献者列表对于 README 文件来说太大了!所有为这个项目做出贡献的了不起的人在[这里](https://wails.io/credits#contributors)都有自己的页面。
|
||||
贡献者列表对于 README 文件来说太大了!所有为这个项目做出贡献的了不起的人
|
||||
在[这里](https://wails.io/credits#contributors)都有自己的页面。
|
||||
|
||||
## 许可证
|
||||
|
||||
|
||||
+28
-5
@@ -2,8 +2,19 @@
|
||||
|
||||
version: "3"
|
||||
|
||||
vars:
|
||||
GREETING: Hello, World!
|
||||
includes:
|
||||
website:
|
||||
taskfile: website
|
||||
dir: website
|
||||
|
||||
v2:
|
||||
taskfile: v2
|
||||
dir: v2
|
||||
optional: true
|
||||
v3:
|
||||
taskfile: v3
|
||||
dir: v3
|
||||
optional: true
|
||||
|
||||
tasks:
|
||||
contributors:check:
|
||||
@@ -18,7 +29,19 @@ tasks:
|
||||
cmds:
|
||||
- npx -y all-contributors-cli generate
|
||||
|
||||
release:
|
||||
dir: v2/tools/release
|
||||
format:md:
|
||||
cmds:
|
||||
- go run release.go {{.CLI_ARGS}}
|
||||
- npx prettier --write "**/*.md"
|
||||
|
||||
format:
|
||||
cmds:
|
||||
- task: format:md
|
||||
|
||||
format-all-md:
|
||||
cmds:
|
||||
- task: format:md
|
||||
- task: website:format:md
|
||||
- task: v2:format:md
|
||||
# - task: v2:website:format
|
||||
- task: v3:format:md
|
||||
# - task: v3:website:format:md
|
||||
|
||||
Generated
+21
-15
@@ -13,9 +13,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@antfu/utils": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmmirror.com/@antfu/utils/-/utils-0.5.2.tgz",
|
||||
"integrity": "sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA=="
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.4.tgz",
|
||||
"integrity": "sha512-qe8Nmh9rYI/HIspLSTwtbMFPj6dISG6+dJnOguTlPNXtCvS2uezdxscVBb7/3DrmNbQK49TDqpkSQ1chbRGdpQ==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
@@ -419,9 +422,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/defu": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/defu/-/defu-6.1.1.tgz",
|
||||
"integrity": "sha512-aA964RUCsBt0FGoNIlA3uFgo2hO+WWC0fiC6DBps/0SFzkKcYoM/3CzVLIa5xSsrFjdioMdYgAIbwo80qp2MoA=="
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/defu/-/defu-6.1.2.tgz",
|
||||
"integrity": "sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ=="
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
@@ -951,9 +954,9 @@
|
||||
"integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g=="
|
||||
},
|
||||
"node_modules/jiti": {
|
||||
"version": "1.16.0",
|
||||
"resolved": "https://registry.npmmirror.com/jiti/-/jiti-1.16.0.tgz",
|
||||
"integrity": "sha512-L3BJStEf5NAqNuzrpfbN71dp43mYIcBUlCRea/vdyv5dW/AYa1d4bpelko4SHdY3I6eN9Wzyasxirj1/vv5kmg==",
|
||||
"version": "1.18.2",
|
||||
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz",
|
||||
"integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==",
|
||||
"bin": {
|
||||
"jiti": "bin/jiti.js"
|
||||
}
|
||||
@@ -1765,13 +1768,16 @@
|
||||
"integrity": "sha512-fk6CmUgwKCfX79EzcDQQpSCMxrHstvbLswFChHS0Vump+kFkw7nJBfTZoC1j0bOGoY9I7R3n2DGek5ajbcYnOw=="
|
||||
},
|
||||
"node_modules/unconfig": {
|
||||
"version": "0.3.7",
|
||||
"resolved": "https://registry.npmmirror.com/unconfig/-/unconfig-0.3.7.tgz",
|
||||
"integrity": "sha512-1589b7oGa8ILBYpta7TndM5mLHLzHUqBfhszeZxuUBrjO/RoQ52VGVWsS3w0C0GLNxO9RPmqkf6BmIvBApaRdA==",
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/unconfig/-/unconfig-0.3.9.tgz",
|
||||
"integrity": "sha512-8yhetFd48M641mxrkWA+C/lZU4N0rCOdlo3dFsyFPnBHBjMJfjT/3eAZBRT2RxCRqeBMAKBVgikejdS6yeBjMw==",
|
||||
"dependencies": {
|
||||
"@antfu/utils": "^0.5.2",
|
||||
"defu": "^6.1.0",
|
||||
"jiti": "^1.16.0"
|
||||
"@antfu/utils": "^0.7.2",
|
||||
"defu": "^6.1.2",
|
||||
"jiti": "^1.18.2"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
website
|
||||
@@ -0,0 +1,6 @@
|
||||
overrides:
|
||||
- files:
|
||||
- "**/*.md"
|
||||
options:
|
||||
printWidth: 80
|
||||
proseWrap: always
|
||||
+25
-16
@@ -62,9 +62,11 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
The traditional method of providing web interfaces to Go programs is via a built-in web server. Wails offers a different
|
||||
approach: it provides the ability to wrap both Go code and a web frontend into a single binary. Tools are provided to
|
||||
make this easy for you by handling project creation, compilation and bundling. All you have to do is get creative!
|
||||
The traditional method of providing web interfaces to Go programs is via a
|
||||
built-in web server. Wails offers a different approach: it provides the ability
|
||||
to wrap both Go code and a web frontend into a single binary. Tools are provided
|
||||
to make this easy for you by handling project creation, compilation and
|
||||
bundling. All you have to do is get creative!
|
||||
|
||||
## Features
|
||||
|
||||
@@ -83,8 +85,9 @@ make this easy for you by handling project creation, compilation and bundling. A
|
||||
|
||||
### Roadmap
|
||||
|
||||
The project roadmap may be found [here](https://github.com/wailsapp/wails/discussions/1484). Please consult
|
||||
this before open up an enhancement request.
|
||||
The project roadmap may be found
|
||||
[here](https://github.com/wailsapp/wails/discussions/1484). Please consult this
|
||||
before open up an enhancement request.
|
||||
|
||||
## Sponsors
|
||||
|
||||
@@ -185,26 +188,31 @@ This project is supported by these kind people / companies:
|
||||
|
||||
## Getting Started
|
||||
|
||||
The installation instructions are on the [official website](https://wails.io/docs/gettingstarted/installation).
|
||||
The installation instructions are on the
|
||||
[official website](https://wails.io/docs/gettingstarted/installation).
|
||||
|
||||
## FAQ
|
||||
|
||||
- Is this an alternative to Electron?
|
||||
|
||||
Depends on your requirements. It's designed to make it easy for Go programmers to make lightweight desktop
|
||||
applications or add a frontend to their existing applications. Wails does offer native elements such as menus
|
||||
and dialogs, so it could be considered a lightweight electron alternative.
|
||||
Depends on your requirements. It's designed to make it easy for Go programmers
|
||||
to make lightweight desktop applications or add a frontend to their existing
|
||||
applications. Wails does offer native elements such as menus and dialogs, so
|
||||
it could be considered a lightweight electron alternative.
|
||||
|
||||
- Who is this project aimed at?
|
||||
|
||||
Go programmers who want to bundle an HTML/JS/CSS frontend with their applications, without resorting to creating a
|
||||
server and opening a browser to view it.
|
||||
Go programmers who want to bundle an HTML/JS/CSS frontend with their
|
||||
applications, without resorting to creating a server and opening a browser to
|
||||
view it.
|
||||
|
||||
- What's with the name?
|
||||
|
||||
When I saw WebView, I thought "What I really want is tooling around building a WebView app, a bit like Rails is to
|
||||
Ruby". So initially it was a play on words (Webview on Rails). It just so happened to also be a homophone of the
|
||||
English name for the [Country](https://en.wikipedia.org/wiki/Wales) I am from. So it stuck.
|
||||
When I saw WebView, I thought "What I really want is tooling around building a
|
||||
WebView app, a bit like Rails is to Ruby". So initially it was a play on words
|
||||
(Webview on Rails). It just so happened to also be a homophone of the English
|
||||
name for the [Country](https://en.wikipedia.org/wiki/Wales) I am from. So it
|
||||
stuck.
|
||||
|
||||
## Stargazers over time
|
||||
|
||||
@@ -212,8 +220,9 @@ The installation instructions are on the [official website](https://wails.io/doc
|
||||
|
||||
## Contributors
|
||||
|
||||
The contributors list is getting too big for the readme! All the amazing people who have contributed to this
|
||||
project have their own page [here](https://wails.io/credits#contributors).
|
||||
The contributors list is getting too big for the readme! All the amazing people
|
||||
who have contributed to this project have their own page
|
||||
[here](https://wails.io/credits#contributors).
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
release:
|
||||
dir: tools/release
|
||||
cmds:
|
||||
- go run release.go {{.CLI_ARGS}}
|
||||
|
||||
format:md:
|
||||
cmds:
|
||||
- npx prettier --write "**/*.md"
|
||||
|
||||
format:
|
||||
cmds:
|
||||
- task: format:md
|
||||
+49
-39
@@ -14,43 +14,33 @@ import (
|
||||
)
|
||||
|
||||
func diagnoseEnvironment(f *flags.Doctor) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
}
|
||||
|
||||
app.PrintBanner()
|
||||
pterm.DefaultSection = *pterm.DefaultSection.
|
||||
WithBottomPadding(0).
|
||||
WithStyle(pterm.NewStyle(pterm.FgBlue, pterm.Bold))
|
||||
|
||||
spinner, _ := pterm.DefaultSpinner.Start("Scanning system - Please wait (this may take a long time)...")
|
||||
pterm.Println() // Spacer
|
||||
pterm.DefaultHeader.WithBackgroundStyle(pterm.NewStyle(pterm.BgLightBlue)).WithMargin(10).Println("Wails Doctor")
|
||||
pterm.Println() // Spacer
|
||||
|
||||
spinner, _ := pterm.DefaultSpinner.WithRemoveWhenDone().Start("Scanning system - Please wait (this may take a long time)...")
|
||||
|
||||
// Get system info
|
||||
info, err := system.GetInfo()
|
||||
if err != nil {
|
||||
spinner.Fail("Failed.")
|
||||
return err
|
||||
}
|
||||
spinner.Success("Done.")
|
||||
|
||||
pterm.DefaultSection.Println("System")
|
||||
|
||||
systemTabledata := [][]string{
|
||||
{"OS", info.OS.Name},
|
||||
{"Version", info.OS.Version},
|
||||
{"ID", info.OS.ID},
|
||||
{"Go Version", runtime.Version()},
|
||||
{"Platform", runtime.GOOS},
|
||||
{"Architecture", runtime.GOARCH},
|
||||
}
|
||||
|
||||
err = pterm.DefaultTable.WithData(systemTabledata).Render()
|
||||
if err != nil {
|
||||
spinner.Fail()
|
||||
pterm.Error.Println("Failed to get system information")
|
||||
return err
|
||||
}
|
||||
spinner.Success()
|
||||
|
||||
pterm.DefaultSection.Println("Wails")
|
||||
|
||||
wailsTableData := [][]string{
|
||||
wailsTableData := pterm.TableData{
|
||||
{"Version", app.Version()},
|
||||
}
|
||||
|
||||
@@ -78,41 +68,57 @@ func diagnoseEnvironment(f *flags.Doctor) error {
|
||||
return err
|
||||
}
|
||||
|
||||
pterm.DefaultSection.Println("System")
|
||||
|
||||
systemTabledata := pterm.TableData{
|
||||
{pterm.Bold.Sprint("OS"), info.OS.Name},
|
||||
{pterm.Bold.Sprint("Version"), info.OS.Version},
|
||||
{pterm.Bold.Sprint("ID"), info.OS.ID},
|
||||
{pterm.Bold.Sprint("Go Version"), runtime.Version()},
|
||||
{pterm.Bold.Sprint("Platform"), runtime.GOOS},
|
||||
{pterm.Bold.Sprint("Architecture"), runtime.GOARCH},
|
||||
}
|
||||
|
||||
err = pterm.DefaultTable.WithBoxed().WithData(systemTabledata).Render()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pterm.DefaultSection.Println("Dependencies")
|
||||
|
||||
// Output Dependencies Status
|
||||
var dependenciesMissing = []string{}
|
||||
var externalPackages = []*packagemanager.Dependency{}
|
||||
var dependenciesMissing []string
|
||||
var externalPackages []*packagemanager.Dependency
|
||||
var dependenciesAvailableRequired = 0
|
||||
var dependenciesAvailableOptional = 0
|
||||
|
||||
dependenciesTableData := [][]string{
|
||||
dependenciesTableData := pterm.TableData{
|
||||
{"Dependency", "Package Name", "Status", "Version"},
|
||||
}
|
||||
|
||||
hasOptionalDependencies := false
|
||||
// Loop over dependencies
|
||||
for _, dependency := range info.Dependencies {
|
||||
|
||||
name := dependency.Name
|
||||
|
||||
if dependency.Optional {
|
||||
name = "*" + name
|
||||
name = pterm.Gray("*") + name
|
||||
hasOptionalDependencies = true
|
||||
}
|
||||
|
||||
packageName := "Unknown"
|
||||
status := "Not Found"
|
||||
status := pterm.LightRed("Not Found")
|
||||
|
||||
// If we found the package
|
||||
if dependency.PackageName != "" {
|
||||
|
||||
packageName = dependency.PackageName
|
||||
|
||||
// If it's installed, update the status
|
||||
if dependency.Installed {
|
||||
status = "Installed"
|
||||
status = pterm.LightGreen("Installed")
|
||||
} else {
|
||||
// Generate meaningful status text
|
||||
status = "Available"
|
||||
status = pterm.LightMagenta("Available")
|
||||
|
||||
if dependency.Optional {
|
||||
dependenciesAvailableOptional++
|
||||
@@ -133,22 +139,19 @@ func diagnoseEnvironment(f *flags.Doctor) error {
|
||||
dependenciesTableData = append(dependenciesTableData, []string{name, packageName, status, dependency.Version})
|
||||
}
|
||||
|
||||
err = pterm.DefaultTable.WithHasHeader(true).WithData(dependenciesTableData).Render()
|
||||
dependenciesTableString, _ := pterm.DefaultTable.WithHasHeader(true).WithData(dependenciesTableData).Srender()
|
||||
dependenciesBox := pterm.DefaultBox.WithTitleBottomCenter()
|
||||
|
||||
if hasOptionalDependencies {
|
||||
pterm.Println("* - Optional Dependency")
|
||||
dependenciesBox = dependenciesBox.WithTitle(pterm.Gray("*") + " - Optional Dependency")
|
||||
}
|
||||
|
||||
dependenciesBox.Println(dependenciesTableString)
|
||||
|
||||
pterm.DefaultSection.Println("Diagnosis")
|
||||
|
||||
// Generate an appropriate diagnosis
|
||||
|
||||
if len(dependenciesMissing) == 0 && dependenciesAvailableRequired == 0 {
|
||||
pterm.Println("Your system is ready for Wails development!")
|
||||
} else {
|
||||
pterm.Println("Your system has missing dependencies!")
|
||||
}
|
||||
|
||||
if dependenciesAvailableRequired != 0 {
|
||||
pterm.Println("Required package(s) installation details: \n" + info.Dependencies.InstallAllRequiredCommand())
|
||||
}
|
||||
@@ -157,11 +160,18 @@ func diagnoseEnvironment(f *flags.Doctor) error {
|
||||
pterm.Println("Optional package(s) installation details: \n" + info.Dependencies.InstallAllOptionalCommand())
|
||||
}
|
||||
|
||||
if len(dependenciesMissing) == 0 && dependenciesAvailableRequired == 0 {
|
||||
pterm.Success.Println("Your system is ready for Wails development!")
|
||||
} else {
|
||||
pterm.Warning.Println("Your system has missing dependencies!")
|
||||
}
|
||||
|
||||
if len(dependenciesMissing) != 0 {
|
||||
pterm.Println("Fatal:")
|
||||
pterm.Println("Required dependencies missing: " + strings.Join(dependenciesMissing, " "))
|
||||
pterm.Println("Please read this article on how to resolve this: https://wails.io/guides/resolving-missing-packages")
|
||||
}
|
||||
|
||||
pterm.Println() // Spacer for sponsor message
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -6,8 +6,9 @@ About your template
|
||||
|
||||
## Live Development
|
||||
|
||||
To run in live development mode, run `wails dev` in the project directory. In another terminal, go into the `frontend`
|
||||
directory and run `npm run dev`. The frontend dev server will run on http://localhost:34115. Connect to this in your
|
||||
To run in live development mode, run `wails dev` in the project directory. In
|
||||
another terminal, go into the `frontend` directory and run `npm run dev`. The
|
||||
frontend dev server will run on http://localhost:34115. Connect to this in your
|
||||
browser and connect to your application.
|
||||
|
||||
## Building
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# README
|
||||
|
||||
This is an example project that shows how to use a custom layout.
|
||||
Run `wails build` in the `cmd/customlayout` directory to build the project.
|
||||
This is an example project that shows how to use a custom layout. Run
|
||||
`wails build` in the `cmd/customlayout` directory to build the project.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user