mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ace627177 | |||
| 42f98e95e1 |
@@ -14,10 +14,6 @@ body:
|
||||
- Search the issue tracker using [this link](https://github.com/wailsapp/wails/issues?q=is%3Aissue+).
|
||||
- Search the [discussion forums](https://github.com/wailsapp/wails/discussions?discussions_q=type+your+issue+here).
|
||||
- Read the [Troubleshooting Guide](https://wails.io/docs/next/guides/troubleshooting).
|
||||
- Create a [Minimal Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) and link to it in the issue.
|
||||
- If your issue is related to TypeScript generation, please open a ticket and create a PR with a failing test case.
|
||||
TS tests can be found [here](https://github.com/wailsapp/wails/tree/master/v2/internal/binding/binding_test). Remember to add
|
||||
your test to the `binding_test.go` file.
|
||||
- Try to fix it yourself. Keep a list of things you have done to fix the problem.
|
||||
|
||||
If after doing all the above, the problem remains, please continue with this ticket providing *all* the information requested.
|
||||
|
||||
@@ -2,18 +2,18 @@ name: Build + Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [release/*, master]
|
||||
branches: [ release/*, master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test_go:
|
||||
test:
|
||||
name: Run Go Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
go-version: [1.18, 1.19]
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
go-version: [ 1.18, 1.19 ]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -23,73 +23,24 @@ jobs:
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
|
||||
- name: Setup Go
|
||||
- name: Set up Go 1.18
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest'
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
test_js:
|
||||
name: Run JS Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
run: go test -v ./...
|
||||
|
||||
test_templates:
|
||||
name: Test Templates
|
||||
needs: test_go
|
||||
needs: test
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
template:
|
||||
[
|
||||
svelte,
|
||||
svelte-ts,
|
||||
vue,
|
||||
vue-ts,
|
||||
react,
|
||||
react-ts,
|
||||
preact,
|
||||
preact-ts,
|
||||
lit,
|
||||
lit-ts,
|
||||
vanilla,
|
||||
vanilla-ts,
|
||||
plain,
|
||||
]
|
||||
go-version: [1.18, 1.19]
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
template: [ svelte, svelte-ts, vue, vue-ts, react, react-ts, preact, preact-ts, lit, lit-ts, vanilla, vanilla-ts, plain ]
|
||||
go-version: [ 1.18, 1.19 ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -0,0 +1,25 @@
|
||||
name: Check Docs
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ 'feature/*' ]
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
name: Website Updated
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v11.1
|
||||
id: verify-changed-files
|
||||
with:
|
||||
files: |
|
||||
website/**/*.mdx
|
||||
website/**/*.md
|
||||
|
||||
- name: Run step only when files change.
|
||||
if: steps.verify-changed-files.outputs.files_changed != 'true'
|
||||
run: |
|
||||
echo "Feature branch does not contain any changes to the website."
|
||||
@@ -7,18 +7,17 @@ on:
|
||||
|
||||
jobs:
|
||||
update-sponsors:
|
||||
name: Update Sponsors
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set Node
|
||||
- name: Set node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
- name: Update Sponsors
|
||||
- name: Update sponsors
|
||||
run: cd scripts/sponsors && chmod 755 ./generate-sponsor-image.sh && ./generate-sponsor-image.sh
|
||||
env:
|
||||
SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORS_TOKEN }}
|
||||
|
||||
+15
-33
@@ -1,39 +1,30 @@
|
||||
name: PR Checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
types: [ submitted ]
|
||||
|
||||
jobs:
|
||||
check_docs:
|
||||
name: Check Docs
|
||||
if: ${{github.repository == 'wailsapp/wails' && contains(github.head_ref,'feature/')}}
|
||||
check_branch_name:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
name: Check branch name
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
if ! [[ "$(echo ${GITHUB_HEAD_REF} | cut -d "/" -f1)" =~ (feature|bugfix|release|chore) ]]; then
|
||||
echo "PRs are only accepted for branches starting with: feature/, bugfix/, chore/ or release/"
|
||||
exit 1
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v11.1
|
||||
id: verify-changed-files
|
||||
with:
|
||||
files: |
|
||||
website/**/*.mdx
|
||||
website/**/*.md
|
||||
|
||||
- name: Run step only when files change.
|
||||
if: steps.verify-changed-files.outputs.files_changed != 'true'
|
||||
run: |
|
||||
echo "::warning::Feature branch does not contain any changes to the website."
|
||||
|
||||
test_go:
|
||||
test:
|
||||
name: Run Go Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.event.review.state == 'approved'
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
go-version: [1.18, 1.19]
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
go-version: [ 1.18, 1.19 ]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -43,19 +34,10 @@ jobs:
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
|
||||
- name: Setup Go
|
||||
- name: Set up Go 1.18
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest'
|
||||
working-directory: ./v2
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
name: Push Checks
|
||||
name: Push files to Crowdin
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push_files_to_crowdin:
|
||||
docs:
|
||||
name: Push files to Crowdin
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
@@ -1,31 +0,0 @@
|
||||
name: Sync Translated Documents
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync-translated-documents:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
- name: Sync Translated Documents
|
||||
run: cd scripts && chmod 755 ./sync-translated-documents.sh && ./sync-translated-documents.sh
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
commit-message: "docs: sync documents"
|
||||
title: "docs: sync documents"
|
||||
body: "- [x] Sync translated documents"
|
||||
branch: feature/documents
|
||||
delete-branch: true
|
||||
draft: true
|
||||
@@ -0,0 +1,32 @@
|
||||
name: Test JS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ release/*, master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run JS Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
<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)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
-151
@@ -1,151 +0,0 @@
|
||||
<h1 align="center">Wails</h1>
|
||||
|
||||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Go & Web 기술을 사용하여 데스크탑 애플리케이션을 빌드하세요.
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
|
||||
</a>
|
||||
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
|
||||
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
|
||||
</a>
|
||||
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
|
||||
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/issues">
|
||||
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
|
||||
</a>
|
||||
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
|
||||
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
|
||||
</a>
|
||||
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
|
||||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://app.slack.com/client/T029RQSE6/CJ4P9F7MZ">
|
||||
<img alt="Slack" src="https://img.shields.io/badge/slack-gophers%2Fwails%20-blue?logo=slack"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/workflow/status/wailsapp/wails/Build?logo=github" alt="Build" />
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
|
||||
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## 목차
|
||||
|
||||
- [목차](#목차)
|
||||
- [소개](#소개)
|
||||
- [기능](#기능)
|
||||
- [로드맵](#로드맵)
|
||||
- [시작하기](#시작하기)
|
||||
- [스폰서](#스폰서)
|
||||
- [FAQ](#faq)
|
||||
- [기여자](#기여자)
|
||||
- [라이센스](#라이센스)
|
||||
- [영감](#영감)
|
||||
|
||||
## 소개
|
||||
|
||||
Go 프로그램에 웹 인터페이스를 제공하는 전통적인 방법은 내장 웹 서버를 이용하는 것입니다.
|
||||
Wails는 다르게 접근합니다: Go 코드와 웹 프론트엔드를 단일 바이너리로 래핑하는 기능을 제공합니다.
|
||||
프로젝트 생성, 컴파일 및 번들링을 처리하여 이를 쉽게 수행할 수 있도록 도구가 제공됩니다.
|
||||
창의력을 발휘하기만 하면 됩니다!
|
||||
|
||||
## 기능
|
||||
|
||||
- 백엔드에 표준 Go 사용
|
||||
- 이미 익숙한 프론트엔드 기술을 사용하여 UI 구축
|
||||
- 사전 구축된 템플릿을 사용하여 Go 프로그램을 위한 풍부한 프론트엔드를 빠르게 생성
|
||||
- Javascript에서 Go 메서드를 쉽게 호출
|
||||
- Go 구조체 및 메서드에 대한 자동 생성된 Typescript 정의
|
||||
- 기본 대화 및 메뉴
|
||||
- 네이티브 다크/라이트 모드 지원
|
||||
- 최신 반투명도 및 "반투명 창" 효과 지원
|
||||
- Go와 Javascript 간의 통합 이벤트 시스템
|
||||
- 프로젝트를 빠르게 생성하고 구축하는 강력한 CLI 도구
|
||||
- 멀티플랫폼
|
||||
- 기본 렌더링 엔진 사용 - _내장 브라우저 없음_!
|
||||
|
||||
### 로드맵
|
||||
|
||||
프로젝트 로드맵은 [여기](https://github.com/wailsapp/wails/discussions/1484)에서
|
||||
확인할 수 있습니다. 개선 요청을 하기 전에 이것을 참조하십시오.
|
||||
|
||||
## 시작하기
|
||||
|
||||
설치 지침은
|
||||
[공식 웹사이트](https://wails.io/docs/gettingstarted/installation)에 있습니다.
|
||||
|
||||
## 스폰서
|
||||
|
||||
이 프로젝트는 친절한 사람들 / 회사들이 지원합니다.
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
## FAQ
|
||||
|
||||
- 이것은 Electron의 대안인가요?
|
||||
|
||||
요구 사항에 따라 다릅니다. Go 프로그래머가 쉽게 가벼운 데스크톱 애플리케이션을
|
||||
만들거나 기존 애플리케이션에 프론트엔드를 추가할 수 있도록 설계되었습니다.
|
||||
Wails는 메뉴 및 대화 상자와 같은 기본 요소를 제공하므로 가벼운 Electron 대안으로
|
||||
간주될 수 있습니다.
|
||||
|
||||
- 이 프로젝트는 누구를 대상으로 하나요?
|
||||
|
||||
서버를 생성하고 이를 보기 위해 브라우저를 열 필요 없이 HTML/JS/CSS 프런트엔드를
|
||||
애플리케이션과 함께 묶고자 하는 프로그래머를 대상으로 합니다.
|
||||
|
||||
- Wails 이름의 의미는 무엇인가요?
|
||||
|
||||
WebView를 보았을 때 저는 "내가 정말로 원하는 것은 WebView 앱을 구축하기 위한
|
||||
도구를 사용하는거야. 마치 Ruby on Rails 처럼 말이야."라고 생각했습니다.
|
||||
그래서 처음에는 말장난(Webview on Rails)이었습니다.
|
||||
[국가](https://en.wikipedia.org/wiki/Wales)에 대한 영어 이름의 동음이의어이기도 하여 정했습니다.
|
||||
|
||||
## Stargazers 성장 추세
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## 기여자
|
||||
|
||||
기여자 목록이 추가 정보에 비해 너무 커지고 있습니다! 이 프로젝트에 기여한 모든 놀라운 사람들은
|
||||
[여기](https://wails.io/credits#contributors)에 자신의 페이지를 가지고 있습니다.
|
||||
|
||||
## 라이센스
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
## 영감
|
||||
|
||||
이 프로젝트는 주로 다음 앨범을 들으며 코딩되었습니다.
|
||||
|
||||
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
|
||||
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
|
||||
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
|
||||
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
|
||||
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
|
||||
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
|
||||
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
|
||||
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
|
||||
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
|
||||
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
|
||||
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
|
||||
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
|
||||
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
@@ -40,7 +40,7 @@
|
||||
<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)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
<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)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
Generated
+9
-9
@@ -2551,9 +2551,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"decode-uri-component": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
|
||||
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
|
||||
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
|
||||
"dev": true
|
||||
},
|
||||
"deep-is": {
|
||||
@@ -4223,9 +4223,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
|
||||
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.1.tgz",
|
||||
"integrity": "sha512-1Qo97Y2oKaU+Ro2xnDMR26g1BwMT29jNbem1EvcujW2jqt+j5COXyscjM7bLQkM9HaxI7pkWeW7gnI072yMI9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
@@ -4376,9 +4376,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
|
||||
Executable → Regular
+1
-2
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
npm install sponsorkit@0.6.1
|
||||
npm install
|
||||
npx sponsorkit -o ../../website/static/img/
|
||||
|
||||
Generated
+2197
-411
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "sponsors",
|
||||
"name": "scripts",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"sponsorkit": "^0.6.1"
|
||||
"devDependencies": {
|
||||
"sponsorkit": "^0.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd ../website
|
||||
|
||||
npx @crowdin/cli@latest pull -b master
|
||||
@@ -1,257 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/leaanthony/slicer"
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/flags"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/internal/gomod"
|
||||
"github.com/wailsapp/wails/v2/internal/colour"
|
||||
"github.com/wailsapp/wails/v2/internal/project"
|
||||
"github.com/wailsapp/wails/v2/pkg/clilogger"
|
||||
"github.com/wailsapp/wails/v2/pkg/commands/build"
|
||||
)
|
||||
|
||||
func buildApplication(f *flags.Build) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
}
|
||||
|
||||
quiet := f.Verbosity == flags.Quiet
|
||||
|
||||
// Create logger
|
||||
logger := clilogger.New(os.Stdout)
|
||||
logger.Mute(quiet)
|
||||
|
||||
if quiet {
|
||||
pterm.DisableOutput()
|
||||
} else {
|
||||
app.PrintBanner()
|
||||
}
|
||||
|
||||
err := f.Process()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
projectOptions, err := project.Load(cwd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Create BuildOptions
|
||||
buildOptions := &build.Options{
|
||||
Logger: logger,
|
||||
OutputType: "desktop",
|
||||
OutputFile: f.OutputFilename,
|
||||
CleanBinDirectory: f.Clean,
|
||||
Mode: f.GetBuildMode(),
|
||||
Pack: !f.NoPackage,
|
||||
LDFlags: f.LdFlags,
|
||||
Compiler: f.Compiler,
|
||||
SkipModTidy: f.SkipModTidy,
|
||||
Verbosity: f.Verbosity,
|
||||
ForceBuild: f.ForceBuild,
|
||||
IgnoreFrontend: f.SkipFrontend,
|
||||
Compress: f.Upx,
|
||||
CompressFlags: f.UpxFlags,
|
||||
UserTags: f.GetTags(),
|
||||
WebView2Strategy: f.GetWebView2Strategy(),
|
||||
TrimPath: f.TrimPath,
|
||||
RaceDetector: f.RaceDetector,
|
||||
WindowsConsole: f.WindowsConsole,
|
||||
Obfuscated: f.Obfuscated,
|
||||
GarbleArgs: f.GarbleArgs,
|
||||
SkipBindings: f.SkipBindings,
|
||||
ProjectData: projectOptions,
|
||||
}
|
||||
|
||||
tableData := pterm.TableData{
|
||||
{"Platform(s)", f.Platform},
|
||||
{"Compiler", f.GetCompilerPath()},
|
||||
{"Skip Bindings", bool2Str(f.SkipBindings)},
|
||||
{"Build Mode", f.GetBuildModeAsString()},
|
||||
{"Frontend Directory", projectOptions.GetFrontendDir()},
|
||||
{"Obfuscated", bool2Str(f.Obfuscated)},
|
||||
}
|
||||
if f.Obfuscated {
|
||||
tableData = append(tableData, []string{"Garble Args", f.GarbleArgs})
|
||||
}
|
||||
tableData = append(tableData, pterm.TableData{
|
||||
{"Skip Frontend", bool2Str(f.SkipFrontend)},
|
||||
{"Compress", bool2Str(f.Upx)},
|
||||
{"Package", bool2Str(!f.NoPackage)},
|
||||
{"Clean Bin Dir", bool2Str(f.Clean)},
|
||||
{"LDFlags", f.LdFlags},
|
||||
{"Tags", "[" + strings.Join(f.GetTags(), ",") + "]"},
|
||||
{"Race Detector", bool2Str(f.RaceDetector)},
|
||||
}...)
|
||||
if len(buildOptions.OutputFile) > 0 && f.GetTargets().Length() == 1 {
|
||||
tableData = append(tableData, []string{"Output File", f.OutputFilename})
|
||||
}
|
||||
pterm.DefaultSection.Println("Build Options")
|
||||
|
||||
err = pterm.DefaultTable.WithData(tableData).Render()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !f.NoSyncGoMod {
|
||||
err = gomod.SyncGoMod(logger, f.UpdateWailsVersionGoMod)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Check platform
|
||||
validPlatformArch := slicer.String([]string{
|
||||
"darwin",
|
||||
"darwin/amd64",
|
||||
"darwin/arm64",
|
||||
"darwin/universal",
|
||||
"linux",
|
||||
"linux/amd64",
|
||||
"linux/arm64",
|
||||
"linux/arm",
|
||||
"windows",
|
||||
"windows/amd64",
|
||||
"windows/arm64",
|
||||
"windows/386",
|
||||
})
|
||||
|
||||
outputBinaries := map[string]string{}
|
||||
|
||||
// Allows cancelling the build after the first error. It would be nice if targets.Each would support funcs
|
||||
// returning an error.
|
||||
var targetErr error
|
||||
targets := f.GetTargets()
|
||||
targets.Each(func(platform string) {
|
||||
if targetErr != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if !validPlatformArch.Contains(platform) {
|
||||
buildOptions.Logger.Println("platform '%s' is not supported - skipping. Supported platforms: %s", platform, validPlatformArch.Join(","))
|
||||
return
|
||||
}
|
||||
|
||||
desiredFilename := projectOptions.OutputFilename
|
||||
if desiredFilename == "" {
|
||||
desiredFilename = projectOptions.Name
|
||||
}
|
||||
desiredFilename = strings.TrimSuffix(desiredFilename, ".exe")
|
||||
|
||||
// Calculate platform and arch
|
||||
platformSplit := strings.Split(platform, "/")
|
||||
buildOptions.Platform = platformSplit[0]
|
||||
buildOptions.Arch = f.GetDefaultArch()
|
||||
if len(platformSplit) > 1 {
|
||||
buildOptions.Arch = platformSplit[1]
|
||||
}
|
||||
banner := "Building target: " + buildOptions.Platform + "/" + buildOptions.Arch
|
||||
pterm.DefaultSection.Println(banner)
|
||||
|
||||
if f.Upx && platform == "darwin/universal" {
|
||||
pterm.Warning.Println("Warning: compress flag unsupported for universal binaries. Ignoring.")
|
||||
f.Upx = false
|
||||
}
|
||||
|
||||
switch buildOptions.Platform {
|
||||
case "linux":
|
||||
if runtime.GOOS != "linux" {
|
||||
pterm.Warning.Println("Crosscompiling to Linux not currently supported.")
|
||||
return
|
||||
}
|
||||
case "darwin":
|
||||
if runtime.GOOS != "darwin" {
|
||||
pterm.Warning.Println("Crosscompiling to Mac not currently supported.")
|
||||
return
|
||||
}
|
||||
macTargets := targets.Filter(func(platform string) bool {
|
||||
return strings.HasPrefix(platform, "darwin")
|
||||
})
|
||||
if macTargets.Length() == 2 {
|
||||
buildOptions.BundleName = fmt.Sprintf("%s-%s.app", desiredFilename, buildOptions.Arch)
|
||||
}
|
||||
}
|
||||
|
||||
if targets.Length() > 1 {
|
||||
// target filename
|
||||
switch buildOptions.Platform {
|
||||
case "windows":
|
||||
desiredFilename = fmt.Sprintf("%s-%s", desiredFilename, buildOptions.Arch)
|
||||
case "linux", "darwin":
|
||||
desiredFilename = fmt.Sprintf("%s-%s-%s", desiredFilename, buildOptions.Platform, buildOptions.Arch)
|
||||
}
|
||||
}
|
||||
if buildOptions.Platform == "windows" {
|
||||
desiredFilename += ".exe"
|
||||
}
|
||||
buildOptions.OutputFile = desiredFilename
|
||||
|
||||
if f.OutputFilename != "" {
|
||||
buildOptions.OutputFile = f.OutputFilename
|
||||
}
|
||||
|
||||
if f.Obfuscated && f.SkipBindings {
|
||||
pterm.Warning.Println("obfuscated flag overrides skipbindings flag.")
|
||||
buildOptions.SkipBindings = false
|
||||
}
|
||||
|
||||
if !f.DryRun {
|
||||
// Start Time
|
||||
start := time.Now()
|
||||
|
||||
compiledBinary, err := build.Build(buildOptions)
|
||||
if err != nil {
|
||||
pterm.Error.Println(err.Error())
|
||||
targetErr = err
|
||||
return
|
||||
}
|
||||
|
||||
buildOptions.IgnoreFrontend = true
|
||||
buildOptions.CleanBinDirectory = false
|
||||
|
||||
// Output stats
|
||||
buildOptions.Logger.Println(fmt.Sprintf("Built '%s' in %s.\n", compiledBinary, time.Since(start).Round(time.Millisecond).String()))
|
||||
|
||||
outputBinaries[buildOptions.Platform+"/"+buildOptions.Arch] = compiledBinary
|
||||
} else {
|
||||
pterm.Info.Println("Dry run: skipped build.")
|
||||
}
|
||||
})
|
||||
|
||||
if targetErr != nil {
|
||||
return targetErr
|
||||
}
|
||||
|
||||
if f.DryRun {
|
||||
return nil
|
||||
}
|
||||
|
||||
if f.NSIS {
|
||||
amd64Binary := outputBinaries["windows/amd64"]
|
||||
arm64Binary := outputBinaries["windows/arm64"]
|
||||
if amd64Binary == "" && arm64Binary == "" {
|
||||
return fmt.Errorf("cannot build nsis installer - no windows targets")
|
||||
}
|
||||
|
||||
if err := build.GenerateNSISInstaller(buildOptions, amd64Binary, arm64Binary); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/flags"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/internal/dev"
|
||||
"github.com/wailsapp/wails/v2/internal/colour"
|
||||
"github.com/wailsapp/wails/v2/pkg/clilogger"
|
||||
"os"
|
||||
)
|
||||
|
||||
func devApplication(f *flags.Dev) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
}
|
||||
|
||||
quiet := f.Verbosity == flags.Quiet
|
||||
|
||||
// Create logger
|
||||
logger := clilogger.New(os.Stdout)
|
||||
logger.Mute(quiet)
|
||||
|
||||
if quiet {
|
||||
pterm.DisableOutput()
|
||||
} else {
|
||||
app.PrintBanner()
|
||||
}
|
||||
|
||||
err := f.Process()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return dev.Application(f, logger)
|
||||
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/flags"
|
||||
"github.com/wailsapp/wails/v2/internal/colour"
|
||||
"github.com/wailsapp/wails/v2/internal/system"
|
||||
"github.com/wailsapp/wails/v2/internal/system/packagemanager"
|
||||
)
|
||||
|
||||
func diagnoseEnvironment(f *flags.Doctor) error {
|
||||
|
||||
if f.NoColour {
|
||||
pterm.DisableColor()
|
||||
colour.ColourEnabled = false
|
||||
}
|
||||
|
||||
app.PrintBanner()
|
||||
|
||||
pterm.Print("Scanning system - Please wait (this may take a long time)...")
|
||||
|
||||
// Get system info
|
||||
info, err := system.GetInfo()
|
||||
if err != nil {
|
||||
pterm.Println("Failed.")
|
||||
return err
|
||||
}
|
||||
pterm.Println("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 {
|
||||
return err
|
||||
}
|
||||
|
||||
pterm.DefaultSection.Println("Wails")
|
||||
|
||||
wailsTableData := [][]string{
|
||||
{"Version", app.Version()},
|
||||
}
|
||||
|
||||
if buildInfo, _ := debug.ReadBuildInfo(); buildInfo != nil {
|
||||
buildSettingToName := map[string]string{
|
||||
"vcs.revision": "Revision",
|
||||
"vcs.modified": "Modified",
|
||||
}
|
||||
for _, buildSetting := range buildInfo.Settings {
|
||||
name := buildSettingToName[buildSetting.Key]
|
||||
if name == "" {
|
||||
continue
|
||||
}
|
||||
wailsTableData = append(wailsTableData, []string{name, buildSetting.Value})
|
||||
}
|
||||
}
|
||||
|
||||
// Exit early if PM not found
|
||||
if info.PM != nil {
|
||||
wailsTableData = append(wailsTableData, []string{"Package Manager", info.PM.Name()})
|
||||
}
|
||||
|
||||
err = pterm.DefaultTable.WithData(wailsTableData).Render()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pterm.DefaultSection.Println("Dependencies")
|
||||
|
||||
// Output Dependencies Status
|
||||
var dependenciesMissing = []string{}
|
||||
var externalPackages = []*packagemanager.Dependency{}
|
||||
var dependenciesAvailableRequired = 0
|
||||
var dependenciesAvailableOptional = 0
|
||||
|
||||
dependenciesTableData := [][]string{
|
||||
{"Dependency", "Package Name", "Status", "Version"},
|
||||
}
|
||||
|
||||
hasOptionalDependencies := false
|
||||
// Loop over dependencies
|
||||
for _, dependency := range info.Dependencies {
|
||||
|
||||
name := dependency.Name
|
||||
if dependency.Optional {
|
||||
name = "*" + name
|
||||
hasOptionalDependencies = true
|
||||
}
|
||||
packageName := "Unknown"
|
||||
status := "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"
|
||||
} else {
|
||||
// Generate meaningful status text
|
||||
status = "Available"
|
||||
|
||||
if dependency.Optional {
|
||||
dependenciesAvailableOptional++
|
||||
} else {
|
||||
dependenciesAvailableRequired++
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if !dependency.Optional {
|
||||
dependenciesMissing = append(dependenciesMissing, dependency.Name)
|
||||
}
|
||||
|
||||
if dependency.External {
|
||||
externalPackages = append(externalPackages, dependency)
|
||||
}
|
||||
}
|
||||
|
||||
dependenciesTableData = append(dependenciesTableData, []string{name, packageName, status, dependency.Version})
|
||||
}
|
||||
|
||||
err = pterm.DefaultTable.WithHasHeader(true).WithData(dependenciesTableData).Render()
|
||||
|
||||
if hasOptionalDependencies {
|
||||
pterm.Println("* - Optional Dependency")
|
||||
}
|
||||
|
||||
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())
|
||||
}
|
||||
|
||||
if dependenciesAvailableOptional != 0 {
|
||||
pterm.Println("Optional package(s) installation details: \n" + info.Dependencies.InstallAllOptionalCommand())
|
||||
}
|
||||
|
||||
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")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user