mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d9e077389c | |||
| 94a936e3ad | |||
| 639389022b | |||
| a5fba5b218 | |||
| 96fa18846c | |||
| 4d7959dd5b | |||
| ef6263c164 | |||
| 7b501a8fd1 | |||
| 24dbd71be0 | |||
| f4adff1cb3 | |||
| 7effede62b | |||
| 7f733d787f | |||
| 2d4f7f4de8 | |||
| de1d032f10 | |||
| 4ca0580ced | |||
| 855c74ff30 | |||
| c62c915fdc | |||
| c78f59bbc1 | |||
| 2a20049ea7 | |||
| 504531f340 | |||
| eae90df323 | |||
| eee6797907 | |||
| bd378b2e0f | |||
| 130f4cc36a | |||
| f3cbd383a3 | |||
| ef32ea2575 | |||
| 6a3b89d212 | |||
| 40e326a708 | |||
| de49b1f125 | |||
| 2690250378 | |||
| 32e9cb30bf | |||
| 13532e00a0 | |||
| 3ed0d69d61 | |||
| d92e8d43c8 | |||
| c05666af7b | |||
| e7188e877f | |||
| 37954141cc | |||
| d699e77c33 | |||
| 60a59f12b2 | |||
| 5421f559df | |||
| b1e04772d9 | |||
| 941218d1c8 | |||
| b2069c871d | |||
| e22cfc18c9 | |||
| 2d61278125 | |||
| 9f81013530 | |||
| 52845a7ca5 | |||
| 1571b10b84 | |||
| f5549db85d | |||
| 953e67e7ed | |||
| 73b9dead5d | |||
| 211eb52747 | |||
| 91d0d96359 | |||
| fbf11aa088 | |||
| fd32734382 | |||
| 48b3fb0f51 | |||
| 8bbbb0f148 | |||
| 495c129ec6 |
@@ -1,7 +1,7 @@
|
||||
name: Bug Report
|
||||
description: Create a report to help us improve
|
||||
# title: ""
|
||||
labels: ["bug"]
|
||||
labels: ["Bug"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Documentation
|
||||
description: Report an issue related to documentation.
|
||||
# title: ""
|
||||
labels: ["documentation"]
|
||||
labels: ["Documentation"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
# title: ""
|
||||
labels: ["enhancement"]
|
||||
labels: ["Enhancement"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: "master"
|
||||
submodules: true
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
name: Release
|
||||
name: Build + Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ release/* ]
|
||||
pull_request:
|
||||
branches: [ release/* ]
|
||||
branches: [ release/*, master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run Go Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -18,7 +17,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
@@ -35,7 +34,6 @@ jobs:
|
||||
test_templates:
|
||||
name: Test Templates
|
||||
needs: test
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
@@ -45,7 +43,7 @@ jobs:
|
||||
go-version: [ 1.18, 1.19 ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
@@ -0,0 +1,24 @@
|
||||
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: |
|
||||
v2/website/*.mdx
|
||||
|
||||
- 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."
|
||||
@@ -4,14 +4,13 @@ on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
update-sponsors:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set node
|
||||
uses: actions/setup-node@v2
|
||||
@@ -24,10 +23,12 @@ jobs:
|
||||
SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORS_TOKEN }}
|
||||
SPONSORKIT_GITHUB_LOGIN: wailsapp
|
||||
|
||||
- name: Commit
|
||||
uses: EndBug/add-and-commit@v4
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
message: "chore: update sponsors.svg"
|
||||
add: "website/static/img/sponsors.svg"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "chore: update sponsors.svg"
|
||||
add-paths: "website/static/img/sponsors.svg"
|
||||
title: Update Sponsor Image
|
||||
body: Generated new image
|
||||
branch: update-sponsors
|
||||
delete-branch: true
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
name: 'issue-translator'
|
||||
on:
|
||||
issue_comment:
|
||||
types: [ created ]
|
||||
issues:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- uses: tomsun28/issues-translate-action@v2.6
|
||||
with:
|
||||
IS_MODIFY_TITLE: false
|
||||
CUSTOM_BOT_NOTE: The issue body's language is not English, translating it automatically...
|
||||
@@ -7,6 +7,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: is-sponsor-label
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: JasonEtco/is-sponsor-label-action@v1
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
name: PR Checks
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_review:
|
||||
types: [ submitted ]
|
||||
|
||||
jobs:
|
||||
check_branch_name:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
name: Check branch name
|
||||
steps:
|
||||
- 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
|
||||
|
||||
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 ]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install linux dependencies
|
||||
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: Set up Go 1.18
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
@@ -0,0 +1,17 @@
|
||||
name: Update Project
|
||||
|
||||
on:
|
||||
project_card:
|
||||
types: [ moved ]
|
||||
|
||||
jobs:
|
||||
projectcardautolabel_job:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- name: Run ProjectCard AutoLabel
|
||||
id: runprojectcardautolabel
|
||||
uses: Matticusau/projectcard-autolabel@v1.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
autolabel-config: '[{"column": "TODO", "add_labels":["TODO"], "remove_labels":["In Progress", "Ready For Testing"]},{"column":"In progress", "add_labels":["In Progress"], "remove_labels":["TODO", "Ready For Testing"]},{"column":"In review", "add_labels":["Ready For Testing"], "remove_labels":["TODO", "In Progress"]}, {"column":"Done", "add_labels":["Done"], "remove_labels":["TODO", "In Progress", "Ready For Testing"]}]'
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
name: Rebuild the runtime
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.17.6
|
||||
|
||||
@@ -115,7 +115,7 @@ This project is supported by these kind people / companies:
|
||||
|
||||
## Stargazers over time
|
||||
|
||||
[](https://starchart.cc/wailsapp/wails)
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## Contributors
|
||||
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@
|
||||
|
||||
## 星星增长趋势
|
||||
|
||||
[](https://starchart.cc/wailsapp/wails)
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## 贡献者
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
}
|
||||
|
||||
buildOptions := generateBuildOptions(flags)
|
||||
buildOptions.SkipBindings = flags.skipBindings
|
||||
buildOptions.Logger = logger
|
||||
|
||||
userTags, err := buildtags.Parse(flags.tags)
|
||||
@@ -169,7 +170,12 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
|
||||
buildOptions.UserTags = userTags
|
||||
|
||||
if !flags.skipBindings {
|
||||
err = build.CreateEmbedDirectories(cwd, buildOptions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !buildOptions.SkipBindings {
|
||||
if flags.verbosity == build.VERBOSE {
|
||||
LogGreen("Generating Bindings...")
|
||||
}
|
||||
@@ -192,7 +198,6 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
// Build the frontend if requested, but ignore building the application itself.
|
||||
ignoreFrontend := buildOptions.IgnoreFrontend
|
||||
if !ignoreFrontend {
|
||||
logger.Println("Building frontend for development...")
|
||||
buildOptions.IgnoreApplication = true
|
||||
if _, err := build.Build(buildOptions); err != nil {
|
||||
return err
|
||||
@@ -573,7 +578,19 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
case err := <-watcher.Errors:
|
||||
LogDarkYellow(err.Error())
|
||||
case item := <-watcher.Events:
|
||||
// Check for file writes
|
||||
isEligibleFile := func(fileName string) bool {
|
||||
// Iterate all file patterns
|
||||
ext := filepath.Ext(fileName)
|
||||
if ext != "" {
|
||||
ext = ext[1:]
|
||||
if _, exists := extensionsThatTriggerARebuild[ext]; exists {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Handle write operations
|
||||
if item.Op&fsnotify.Write == fsnotify.Write {
|
||||
// Ignore directories
|
||||
itemName := item.Name
|
||||
@@ -581,15 +598,10 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
continue
|
||||
}
|
||||
|
||||
// Iterate all file patterns
|
||||
ext := filepath.Ext(itemName)
|
||||
if ext != "" {
|
||||
ext = ext[1:]
|
||||
if _, exists := extensionsThatTriggerARebuild[ext]; exists {
|
||||
rebuild = true
|
||||
timer.Reset(interval)
|
||||
continue
|
||||
}
|
||||
if isEligibleFile(itemName) {
|
||||
rebuild = true
|
||||
timer.Reset(interval)
|
||||
continue
|
||||
}
|
||||
|
||||
for _, reloadDir := range dirsThatTriggerAReload {
|
||||
@@ -605,7 +617,8 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
|
||||
timer.Reset(interval)
|
||||
}
|
||||
// Check for new directories
|
||||
|
||||
// Handle new fs entries that are created
|
||||
if item.Op&fsnotify.Create == fsnotify.Create {
|
||||
// If this is a folder, add it to our watch list
|
||||
if fs.DirExists(item.Name) {
|
||||
@@ -617,6 +630,14 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
}
|
||||
LogGreen("Added new directory to watcher: %s", item.Name)
|
||||
}
|
||||
} else if isEligibleFile(item.Name) {
|
||||
// Handle creation of new file.
|
||||
// Note: On some platforms an update to a file is represented as
|
||||
// REMOVE -> CREATE instead of WRITE, so this is not only new files
|
||||
// but also updates to existing files
|
||||
rebuild = true
|
||||
timer.Reset(interval)
|
||||
continue
|
||||
}
|
||||
}
|
||||
case <-timer.C:
|
||||
|
||||
@@ -55,6 +55,7 @@ func main() {
|
||||
DisableWindowIcon: false,
|
||||
// DisableFramelessWindowDecorations: false,
|
||||
WebviewUserDataPath: "",
|
||||
ZoomFactor: 1.0,
|
||||
},
|
||||
// Mac platform specific options
|
||||
Mac: &mac.Options{
|
||||
|
||||
@@ -40,7 +40,7 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
|
||||
// For CI
|
||||
ciMode := false
|
||||
command.BoolFlag("ci", "CI Mode", &ciMode).Hidden()
|
||||
command.BoolFlag("ci", "CI Mode", &ciMode)
|
||||
|
||||
// Setup project directory
|
||||
projectDirectory := ""
|
||||
@@ -189,6 +189,12 @@ func initProject(options *templates.Options, quiet bool, ciMode bool) error {
|
||||
updateReplaceLine(workspace)
|
||||
}
|
||||
|
||||
// Remove the `.git`` directory in the template project
|
||||
err = os.RemoveAll(".git")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if options.InitGit {
|
||||
err = initGit(options)
|
||||
if err != nil {
|
||||
|
||||
@@ -56,6 +56,8 @@ func main() {
|
||||
DisableWindowIcon: false,
|
||||
// DisableFramelessWindowDecorations: false,
|
||||
WebviewUserDataPath: "",
|
||||
IsZoomControlEnabled: false,
|
||||
ZoomFactor: float64,
|
||||
},
|
||||
Mac: &mac.Options{
|
||||
TitleBar: &mac.TitleBar{
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.0.0
|
||||
v2.1.0
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/wailsapp/wails/v2
|
||||
|
||||
go 1.19
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/Masterminds/semver v1.5.0
|
||||
@@ -13,7 +13,7 @@ require (
|
||||
github.com/imdario/mergo v0.3.12
|
||||
github.com/jackmordaunt/icns v1.0.0
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e
|
||||
github.com/labstack/echo/v4 v4.7.2
|
||||
github.com/labstack/echo/v4 v4.9.0
|
||||
github.com/leaanthony/clir v1.0.4
|
||||
github.com/leaanthony/debme v1.2.1
|
||||
github.com/leaanthony/go-ansi-parser v1.0.1
|
||||
@@ -29,9 +29,9 @@ require (
|
||||
github.com/tkrajina/go-reflector v0.5.5
|
||||
github.com/wailsapp/mimetype v1.4.1
|
||||
github.com/wzshiming/ctc v1.2.3
|
||||
golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -44,6 +44,7 @@ require (
|
||||
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
|
||||
github.com/samber/lo v1.27.1
|
||||
github.com/stretchr/testify v1.7.1
|
||||
golang.org/x/tools v0.1.12
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -78,13 +79,12 @@ require (
|
||||
github.com/valyala/fasttemplate v1.2.1 // indirect
|
||||
github.com/wzshiming/winseq v0.0.0-20200112104235-db357dc107ae // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.0 // indirect
|
||||
github.com/yuin/goldmark v1.4.4 // indirect
|
||||
github.com/yuin/goldmark v1.4.13 // indirect
|
||||
github.com/yuin/goldmark-emoji v1.0.1 // indirect
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
|
||||
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
|
||||
golang.org/x/image v0.0.0-20201208152932-35266b937fa6 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user