mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4749172aed | |||
| a419721dcd | |||
| e731e2591a | |||
| 59b25edb5c | |||
| 647bc87600 | |||
| ebf56f6585 | |||
| 1644ee152e | |||
| 069fe18b9d | |||
| acf8dea170 | |||
| 7a87b0476e | |||
| 886bcc7b47 | |||
| d599fd80cb | |||
| 2e9f57a60d | |||
| 44c291b297 | |||
| 4ad4d7c7e3 | |||
| dab762937b | |||
| 4e539188e0 | |||
| e705e539c6 | |||
| fcfe278f95 | |||
| 93a616ceef | |||
| 7bc4d5f7e8 | |||
| 63b9cab96f | |||
| 427e41f190 | |||
| 72290a2d58 | |||
| 92470f262e | |||
| 761efed84d | |||
| 427fe7e8d3 | |||
| 98bb3b6361 | |||
| 5a4eae968f | |||
| 9085e1edbb | |||
| 8700d225c1 | |||
| c2b36de510 | |||
| 7fae22b50c | |||
| 7b098fd522 | |||
| e72e4aa179 | |||
| b48579892b | |||
| 083e6b03f3 | |||
| 2859143b2f | |||
| 027edad51b | |||
| a96d51be02 | |||
| fe479876c5 | |||
| 84d2576e06 | |||
| 48b35aaafe | |||
| 7f402bf0c4 | |||
| 1e76b0b52e | |||
| e0a92712fe | |||
| 150dac9ead | |||
| 22cfcbd5a1 | |||
| 61f7b10f36 | |||
| f150d25152 | |||
| 8acbdc246c | |||
| cdbe77a0fc | |||
| 5292ced731 | |||
| abbbf05a79 | |||
| 4c7c3d9d82 | |||
| 8fd16d4be3 | |||
| 4162f097f1 | |||
| 07c971476d | |||
| fa851f29c5 | |||
| 31a5c90673 | |||
| f2ab205415 | |||
| 41edd78953 | |||
| 3dbe6e96c1 | |||
| 28a2b4fbd9 | |||
| 6d857bf61a | |||
| 4814e65da2 | |||
| 644dc653a9 | |||
| 19932bf3ad |
@@ -7,7 +7,7 @@ body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
***Please note: No new bug reports are being accepted for Wails v1***
|
||||
***Please note: No bug reports are currently being accepted for Wails v3***
|
||||
Before submitting this issue, please do the following:
|
||||
- Do a web search for your error. This usually leads to a much better understanding of the issue.
|
||||
- Prove that the error is indeed a Wails bug and not an application bug, with a specific set of steps to reproduce.
|
||||
@@ -84,4 +84,4 @@ body:
|
||||
description: Add any other context about the problem here.
|
||||
placeholder: Add any other context about the problem here.
|
||||
validations:
|
||||
required: false
|
||||
required: false
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
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
|
||||
@@ -36,3 +36,6 @@ v2/cmd/wails/internal/commands/initialise/templates/testtemplates/
|
||||
/v3/examples/build/bin/testapp
|
||||
/websitev3/site/
|
||||
/v3/examples/plugins/bin/testapp
|
||||
|
||||
# Temporary called mkdocs, should be renamed to more standard -website or similar
|
||||
/mkdocs-website/site
|
||||
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Construye aplicaciones de escritorio usando Go y tecnologías 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://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&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) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## Tabla de Contenidos
|
||||
|
||||
- [Tabla de Contenidos](#tabla-de-contenidos)
|
||||
- [Introducción](#introducción)
|
||||
- [Funcionalidades](#funcionalidades)
|
||||
- [Plan de Trabajo](#plan-de-trabajo)
|
||||
- [Empezando](#empezando)
|
||||
- [Patrocinadores](#patrocinadores)
|
||||
- [Preguntas Frecuentes](#preguntas-frecuentes)
|
||||
- [Estrellas a lo Largo del Tiempo](#estrellas-a-lo-largo-del-tiempo)
|
||||
- [Colaboradores](#colaboradores)
|
||||
- [Licencia](#licencia)
|
||||
- [Inspiración](#inspiración)
|
||||
|
||||
## Introducción
|
||||
|
||||
El método tradicional para proveer una interfaz web en programas hechos con Go
|
||||
es a través del servidor web incorporado. Wails ofrece un enfoque diferente al
|
||||
permitir combinar el código hecho en Go con un frontend web en un solo archivo
|
||||
binario. Las herramientas que proporcionamos facilitan este trabajo para ti, al
|
||||
crear, compilar y empaquetar tu proyecto. ¡Lo único que debes hacer es ponerte
|
||||
creativo!
|
||||
|
||||
## Funcionalidades
|
||||
|
||||
- Utiliza Go estándar para el backend
|
||||
- Utiliza cualquier tecnología frontend con la que ya estés familiarizado para
|
||||
construir tu interfaz de usuario
|
||||
- Crea rápidamente interfaces de usuario enriquecidas para tus programas en Go
|
||||
utilizando plantillas predefinidas
|
||||
- Invoca fácilmente métodos de Go desde Javascript
|
||||
- Definiciones de Typescript generadas automáticamente para tus structs y
|
||||
métodos de Go
|
||||
- Diálogos y menús nativos
|
||||
- Soporte nativo de modo oscuro / claro
|
||||
- Soporte de translucidez y efectos de ventana esmerilada
|
||||
- Sistema de eventos unificado entre Go y Javascript
|
||||
- Herramienta CLI potente para generar y construir tus proyectos rápidamente
|
||||
- Multiplataforma
|
||||
- Usa motores de renderizado nativos - ¡_sin navegador integrado_!
|
||||
|
||||
### Plan de Trabajo
|
||||
|
||||
El plan de trabajo se puede encontrar
|
||||
[aqui](https://github.com/wailsapp/wails/discussions/1484). Por favor,
|
||||
consúltalo antes de abrir una solicitud de mejora.
|
||||
|
||||
## Empezando
|
||||
|
||||
Las instrucciones de instalacion se encuentran en nuestra
|
||||
[pagina web oficial](https://wails.io/docs/gettingstarted/installation).
|
||||
|
||||
## Patrocinadores
|
||||
|
||||
Este Proyecto cuenta con el apoyo de estas amables personas/ compañías:
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## Preguntas Frecuentes
|
||||
|
||||
- ¿Es esta una alternativa a Electron?
|
||||
|
||||
Depende de tus requisitos. Está diseñado para facilitar a los programadores de
|
||||
Go la creación de aplicaciones de escritorio livianas o agregar una interfaz
|
||||
gráfica a sus aplicaciones existentes. Wails ofrece elementos nativos como
|
||||
menús y diálogos, por lo que podría considerarse una alternativa liviana a
|
||||
Electron.
|
||||
|
||||
- ¿A quien esta dirigido este proyecto?
|
||||
|
||||
El proyecto esta dirigido a programadores de Go que desean integrar una
|
||||
interfaz HMTL/JS/CSS en sus aplicaciones, sin tener que recurrir a la creación
|
||||
de un servidor y abrir el navegador para visualizarla.
|
||||
|
||||
- ¿Cual es el significado del nombre?
|
||||
|
||||
Cuando vi WebView, pensé: "Lo que realmente quiero es una herramienta para
|
||||
construir una aplicación WebView, algo similar a lo que Rails es para Ruby".
|
||||
Así que inicialmente fue un juego de palabras (WebView en Rails). Además, por
|
||||
casualidad, también es homófono del nombre en inglés del
|
||||
[país](https://en.wikipedia.org/wiki/Wales) del que provengo. Así que se quedó
|
||||
con ese nombre.
|
||||
|
||||
## Estrellas a lo Largo del Tiempo
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## Colaboradores
|
||||
|
||||
¡La lista de colaboradores se está volviendo demasiado grande para el archivo
|
||||
readme! Todas las personas increíbles que han contribuido a este proyecto tienen
|
||||
su propia página [aqui](https://wails.io/credits#contributors).
|
||||
|
||||
## Licencia
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
## Inspiración
|
||||
|
||||
Este proyecto fue construido mientras se escuchaban estos álbumes:
|
||||
|
||||
- [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)
|
||||
[Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
+3
-1
@@ -42,7 +42,9 @@
|
||||
<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) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
+3
-1
@@ -42,7 +42,9 @@
|
||||
<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) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
@@ -40,7 +40,9 @@
|
||||
<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) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Crie aplicativos de desktop usando Go e tecnologias 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://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&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) · [Español](README.es.md) · [Português](README.pt-br.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## Índice
|
||||
|
||||
- [Índice](#índice)
|
||||
- [Introdução](#introdução)
|
||||
- [Recursos e funcionalidades](#recursos-e-funcionalidades)
|
||||
- [Plano de trabalho](#plano-de-trabalho)
|
||||
- [Iniciando](#iniciando)
|
||||
- [Patrocinadores](#patrocinadores)
|
||||
- [Perguntas frequentes](#perguntas-frequentes)
|
||||
- [Estrelas ao longo do tempo](#estrelas-ao-longo-do-tempo)
|
||||
- [Colaboradores](#colaboradores)
|
||||
- [Licença](#licença)
|
||||
- [Inspiração](#inspiração)
|
||||
|
||||
## Introdução
|
||||
|
||||
O método tradicional de fornecer interfaces da Web para programas Go é por meio de um servidor da Web integrado. Wails oferece uma
|
||||
abordagem: fornece a capacidade de agrupar o código Go e um front-end da Web em um único binário. As ferramentas são fornecidas para
|
||||
que torne isso mais fácil para você lidando com a criação, compilação e agrupamento de projetos. Tudo o que você precisa fazer é ser criativo!
|
||||
|
||||
## Recursos e funcionalidades
|
||||
|
||||
- Use Go padrão para o back-end
|
||||
- Use qualquer tecnologia de front-end com a qual você já esteja familiarizado para criar sua interface do usuário
|
||||
- Crie rapidamente um front-end avançado para seus programas Go usando modelos pré-construídos
|
||||
- Chame facilmente métodos Go com JavaScript
|
||||
- Definições TypeScript geradas automaticamente para suas estruturas e métodos Go
|
||||
- Diálogos e menus nativos
|
||||
- Suporte nativo ao modo escuro/claro
|
||||
- Suporta translucidez moderna e efeitos de "janela fosca"
|
||||
- Sistema de eventos unificado entre Go e JavaScript
|
||||
- Poderosa ferramenta cli para gerar e construir rapidamente seus projetos
|
||||
- Multiplataforma
|
||||
- Usa mecanismos de renderização nativos - _sem navegador incorporado_!
|
||||
|
||||
### Plano de trabalho
|
||||
|
||||
O plano de trabalho do projeto pode ser encontrado [aqui](https://github.com/wailsapp/wails/discussions/1484). Por favor consulte
|
||||
isso antes de abrir um pedido de melhoria.
|
||||
|
||||
## Iniciando
|
||||
|
||||
As instruções de instalação estão no [site oficial](https://wails.io/docs/gettingstarted/installation).
|
||||
|
||||
## Patrocinadores
|
||||
|
||||
Este projeto é apoiado por estas simpáticas pessoas/empresas:
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## Perguntas frequentes
|
||||
|
||||
- Esta é uma alternativa ao Electron?
|
||||
|
||||
Depende de seus requisitos. Ele foi projetado para tornar mais fácil para os programadores Go criar aplicações desktop
|
||||
e adicionar um front-end aos seus aplicativos existentes. O Wails oferece elementos nativos, como menus
|
||||
e diálogos, por isso pode ser considerada uma alternativa leve, se comparado ao Electron.
|
||||
|
||||
- A quem se destina este projeto?
|
||||
|
||||
Programadores Go que desejam agrupar um front-end HTML/JS/CSS com seus aplicativos, sem recorrer à criação de um
|
||||
servidor e abrir um navegador para visualizá-lo.
|
||||
|
||||
- Qual é o significado do nome?
|
||||
|
||||
Quando vi o WebView, pensei "O que eu realmente quero é ferramentas para construir um aplicativo WebView, algo semelhante ao que Rails é para Ruby". Portanto, inicialmente era um jogo de palavras (WebView on Rails). Por acaso, também era um homófono do
|
||||
Nome em inglês para o [país](https://en.wikipedia.org/wiki/Wales) de onde eu sou. Então ficou com esse nome.
|
||||
|
||||
## Estrelas ao longo do tempo
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## Colaboradores
|
||||
|
||||
A lista de colaboradores está ficando grande demais para o arquivo readme! Todas as pessoas incríveis que contribuíram para o
|
||||
projeto tem sua própria página [aqui](https://wails.io/credits#contributors).
|
||||
|
||||
## Licença
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
## Inspiração
|
||||
|
||||
Este projeto foi construído ouvindo esses álbuns:
|
||||
|
||||
- [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)
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Собирайте Desktop приложения используя 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://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&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) · [Español](README.es.md) · [Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## Содержание
|
||||
|
||||
- [Содержание](#содержание)
|
||||
- [Вступление](#вступление)
|
||||
- [Особенности](#особенности)
|
||||
- [Roadmap](#roadmap)
|
||||
- [Быстрый старт](#быстрый-старт)
|
||||
- [Спонсоры](#спонсоры)
|
||||
- [FAQ](#faq)
|
||||
- [График звёздочек](#график-звёздочек-репозитория-относительно-времени)
|
||||
- [Контребьюторы](#контребьюторы)
|
||||
- [Лицензия](#лицензия)
|
||||
- [Вдохновение](#вдохновение)
|
||||
|
||||
## Вступление
|
||||
|
||||
Обычно, веб-интерфейсы для программ Go - это встроенный веб-сервер и веб-браузер.
|
||||
У Walls другой подход: он оборачивает как код Go, так и веб-интерфейс в один бинарник (EXE файл).
|
||||
Облегчает вам создание вашего приложения, управляя созданием, компиляцией и объединением проектов.
|
||||
Все ограничивается лишь вашей фантазией!
|
||||
|
||||
## Особенности
|
||||
|
||||
- Использование Go для backend
|
||||
- Поддержка любой frontend технологии, с которой вы уже знакомы для создания вашего UI
|
||||
- Быстрое создание frontend для ваших программ, используя готовые шаблоны
|
||||
- Очень лёгкий вызов функция Go из JavaScript
|
||||
- Автогене рация TypeScript типов для Go структур и функций
|
||||
- Нативные диалоги и меню
|
||||
- Нативная поддержка тёмной и светлой темы
|
||||
- Поддержка современной прозрачности и эффекта "матового окна"
|
||||
- Единая система Эвентов для Go и JavaScript
|
||||
- Мощный CLI для быстрого создания ваших проектов
|
||||
- Мультиплатформенность
|
||||
- Использование нативного движка рендеринга - нет встроенному браузеру!
|
||||
|
||||
### Roadmap
|
||||
|
||||
Roadmap проекта вы можете найти [здесь](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;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## FAQ
|
||||
|
||||
- Это альтернатива Electron?
|
||||
|
||||
Зависит от ваших требований. Wails разработан для легкого создания Desktop приложений или расширения интерфейсной
|
||||
части к своим существующим приложениям программистам Go. Wails действительно предлагает встроенные элементы, такие как
|
||||
меню и диалоги, так что его можно считать облегченной альтернативой Electron.
|
||||
|
||||
- Для кого нацелен этот проект?
|
||||
|
||||
Для Golang программистов, которые хотят создавать приложение используя HTML JS и CSS, без создания Web сервера и
|
||||
открытия браузера для его просмотра.
|
||||
|
||||
- Что это за название?
|
||||
|
||||
Когда я увидел WebView, я подумал: "Что мне действительно нужно, так это инструменты для создания приложения WebView,
|
||||
немного похожие на Rails для Ruby". Итак, изначально это была игра слов (Webview on Rails). Просто так получилось, что
|
||||
это также омофон английского названия для [Страны](https://en.wikipedia.org/wiki/Wales) от куда я родом. Так что это
|
||||
прижилось.
|
||||
|
||||
## График звёздочек репозитория, относительно времени
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## Контребьюторы
|
||||
|
||||
Список участников слишком большой для README! У всех замечательных людей, которые внесли свой вклад в этот
|
||||
проект, есть своя [страничка](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)
|
||||
+4
-2
@@ -42,7 +42,9 @@
|
||||
<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) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
@@ -87,7 +89,7 @@
|
||||
|
||||
## 快速入门
|
||||
|
||||
使用说明在 [官网](https://wails.io/docs/gettingstarted/installation)。
|
||||
使用说明在 [官网](https://wails.io/zh-Hans/docs/gettingstarted/installation/)。
|
||||
|
||||
## 赞助商
|
||||
|
||||
|
||||
Generated
+24
-18
@@ -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"
|
||||
}
|
||||
@@ -1443,9 +1446,9 @@
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.3.8",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||
"version": "7.5.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",
|
||||
"integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
@@ -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": {
|
||||
|
||||
@@ -4,6 +4,7 @@ version: "3"
|
||||
|
||||
tasks:
|
||||
release:
|
||||
summary: Release a new version of Task. Call with `task v2:release -- <version>`
|
||||
dir: tools/release
|
||||
cmds:
|
||||
- go run release.go {{.CLI_ARGS}}
|
||||
|
||||
@@ -57,6 +57,7 @@ func buildApplication(f *flags.Build) error {
|
||||
OutputFile: f.OutputFilename,
|
||||
CleanBinDirectory: f.Clean,
|
||||
Mode: f.GetBuildMode(),
|
||||
Devtools: f.Debug || f.Devtools,
|
||||
Pack: !f.NoPackage,
|
||||
LDFlags: f.LdFlags,
|
||||
Compiler: f.Compiler,
|
||||
@@ -82,6 +83,7 @@ func buildApplication(f *flags.Build) error {
|
||||
{"Compiler", f.GetCompilerPath()},
|
||||
{"Skip Bindings", bool2Str(f.SkipBindings)},
|
||||
{"Build Mode", f.GetBuildModeAsString()},
|
||||
{"Devtools", bool2Str(buildOptions.Devtools)},
|
||||
{"Frontend Directory", projectOptions.GetFrontendDir()},
|
||||
{"Obfuscated", bool2Str(f.Obfuscated)},
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ type Build struct {
|
||||
ForceBuild bool `name:"f" description:"Force build of application"`
|
||||
UpdateWailsVersionGoMod bool `name:"u" description:"Updates go.mod to use the same Wails version as the CLI"`
|
||||
Debug bool `description:"Builds the application in debug mode"`
|
||||
Devtools bool `description:"Enable Devtools in productions, Already enabled in debug mode (-debug)"`
|
||||
NSIS bool `description:"Generate NSIS installer for Windows"`
|
||||
TrimPath bool `description:"Remove all file system paths from the resulting executable"`
|
||||
WindowsConsole bool `description:"Keep the console when building for Windows"`
|
||||
|
||||
@@ -22,6 +22,7 @@ type Dev struct {
|
||||
Browser bool `flag:"browser" description:"Open the application in a browser"`
|
||||
NoReload bool `flag:"noreload" description:"Disable reload on asset change"`
|
||||
NoColour bool `flag:"nocolor" description:"Disable colour in output"`
|
||||
NoGoRebuild bool `flag:"nogorebuild" description:"Disable automatic rebuilding on backend file changes/additions"`
|
||||
WailsJSDir string `flag:"wailsjsdir" description:"Directory to generate the Wails JS modules"`
|
||||
LogLevel string `flag:"loglevel" description:"LogLevel to use - Trace, Debug, Info, Warning, Error)"`
|
||||
ForceBuild bool `flag:"f" description:"Force build of application"`
|
||||
@@ -120,6 +121,7 @@ func (d *Dev) GenerateBuildOptions() *build.Options {
|
||||
result := &build.Options{
|
||||
OutputType: "dev",
|
||||
Mode: build.Dev,
|
||||
Devtools: true,
|
||||
Arch: runtime.GOARCH,
|
||||
Pack: true,
|
||||
Platform: runtime.GOOS,
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
@@ -80,7 +81,7 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
|
||||
|
||||
// Setup signal handler
|
||||
quitChannel := make(chan os.Signal, 1)
|
||||
signal.Notify(quitChannel, os.Interrupt, os.Kill, syscall.SIGTERM)
|
||||
signal.Notify(quitChannel, os.Interrupt, syscall.SIGTERM)
|
||||
exitCodeChannel := make(chan int, 1)
|
||||
|
||||
// Build the frontend if requested, but ignore building the application itself.
|
||||
@@ -138,20 +139,6 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
|
||||
}
|
||||
}
|
||||
|
||||
// create the project files watcher
|
||||
watcher, err := initialiseWatcher(cwd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func(watcher *fsnotify.Watcher) {
|
||||
err := watcher.Close()
|
||||
if err != nil {
|
||||
logger.Fatal(err.Error())
|
||||
}
|
||||
}(watcher)
|
||||
|
||||
logutils.LogGreen("Watching (sub)/directory: %s", cwd)
|
||||
logutils.LogGreen("Using DevServer URL: %s", f.DevServerURL())
|
||||
if f.FrontendDevServerURL != "" {
|
||||
logutils.LogGreen("Using Frontend DevServer URL: %s", f.FrontendDevServerURL)
|
||||
@@ -165,7 +152,10 @@ func Application(f *flags.Dev, logger *clilogger.CLILogger) error {
|
||||
}()
|
||||
|
||||
// Watch for changes and trigger restartApp()
|
||||
debugBinaryProcess = doWatcherLoop(buildOptions, debugBinaryProcess, f, watcher, exitCodeChannel, quitChannel, f.DevServerURL(), legacyUseDevServerInsteadofCustomScheme)
|
||||
debugBinaryProcess, err = doWatcherLoop(cwd, buildOptions, debugBinaryProcess, f, exitCodeChannel, quitChannel, f.DevServerURL(), legacyUseDevServerInsteadofCustomScheme)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Kill the current program if running and remove dev binary
|
||||
if err := killProcessAndCleanupBinary(debugBinaryProcess, appBinary); err != nil {
|
||||
@@ -255,8 +245,8 @@ func runFrontendDevWatcherCommand(frontendDirectory string, devCommand string, d
|
||||
|
||||
const (
|
||||
stateRunning int32 = 0
|
||||
stateCanceling = 1
|
||||
stateStopped = 2
|
||||
stateCanceling int32 = 1
|
||||
stateStopped int32 = 2
|
||||
)
|
||||
state := stateRunning
|
||||
go func() {
|
||||
@@ -337,7 +327,23 @@ func restartApp(buildOptions *build.Options, debugBinaryProcess *process.Process
|
||||
}
|
||||
|
||||
// doWatcherLoop is the main watch loop that runs while dev is active
|
||||
func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, watcher *fsnotify.Watcher, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL, legacyUseDevServerInsteadofCustomScheme bool) *process.Process {
|
||||
func doWatcherLoop(cwd string, buildOptions *build.Options, debugBinaryProcess *process.Process, f *flags.Dev, exitCodeChannel chan int, quitChannel chan os.Signal, devServerURL *url.URL, legacyUseDevServerInsteadofCustomScheme bool) (*process.Process, error) {
|
||||
// create the project files watcher
|
||||
watcher, err := initialiseWatcher(cwd)
|
||||
if err != nil {
|
||||
logutils.LogRed("Unable to create filesystem watcher. Reloads will not occur.")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer func(watcher *fsnotify.Watcher) {
|
||||
err := watcher.Close()
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
}(watcher)
|
||||
|
||||
logutils.LogGreen("Watching (sub)/directory: %s", cwd)
|
||||
|
||||
// Main Loop
|
||||
var extensionsThatTriggerARebuild = sliceToMap(strings.Split(f.Extensions, ","))
|
||||
var dirsThatTriggerAReload []string
|
||||
@@ -351,6 +357,12 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
continue
|
||||
}
|
||||
dirsThatTriggerAReload = append(dirsThatTriggerAReload, thePath)
|
||||
err = watcher.Add(thePath)
|
||||
if err != nil {
|
||||
logutils.LogRed("Unable to watch path: %s due to error %v", thePath, err)
|
||||
} else {
|
||||
logutils.LogGreen("Watching (sub)/directory: %s", thePath)
|
||||
}
|
||||
}
|
||||
|
||||
quit := false
|
||||
@@ -366,7 +378,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
|
||||
assetDirURL := joinPath(devServerURL, "/wails/assetdir")
|
||||
reloadURL := joinPath(devServerURL, "/wails/reload")
|
||||
for quit == false {
|
||||
for !quit {
|
||||
// reload := false
|
||||
select {
|
||||
case exitCode := <-exitCodeChannel:
|
||||
@@ -441,16 +453,21 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
case <-timer.C:
|
||||
if rebuild {
|
||||
rebuild = false
|
||||
logutils.LogGreen("[Rebuild triggered] files updated")
|
||||
// Try and build the app
|
||||
newBinaryProcess, _, err := restartApp(buildOptions, debugBinaryProcess, f, exitCodeChannel, legacyUseDevServerInsteadofCustomScheme)
|
||||
if err != nil {
|
||||
logutils.LogRed("Error during build: %s", err.Error())
|
||||
continue
|
||||
}
|
||||
// If we have a new process, saveConfig it
|
||||
if newBinaryProcess != nil {
|
||||
debugBinaryProcess = newBinaryProcess
|
||||
if f.NoGoRebuild {
|
||||
logutils.LogGreen("[Rebuild triggered] skipping due to flag -nogorebuild")
|
||||
} else {
|
||||
logutils.LogGreen("[Rebuild triggered] files updated")
|
||||
// Try and build the app
|
||||
|
||||
newBinaryProcess, _, err := restartApp(buildOptions, debugBinaryProcess, f, exitCodeChannel, legacyUseDevServerInsteadofCustomScheme)
|
||||
if err != nil {
|
||||
logutils.LogRed("Error during build: %s", err.Error())
|
||||
continue
|
||||
}
|
||||
// If we have a new process, saveConfig it
|
||||
if newBinaryProcess != nil {
|
||||
debugBinaryProcess = newBinaryProcess
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,7 +511,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
quit = true
|
||||
}
|
||||
}
|
||||
return debugBinaryProcess
|
||||
return debugBinaryProcess, nil
|
||||
}
|
||||
|
||||
func joinPath(url *url.URL, subPath string) string {
|
||||
|
||||
@@ -38,7 +38,6 @@ func initialiseWatcher(cwd string) (*fsnotify.Watcher, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
println("watching: " + dir)
|
||||
}
|
||||
return watcher, nil
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.5.1
|
||||
v2.6.0
|
||||
Executable
BIN
Binary file not shown.
@@ -45,6 +45,9 @@ VIAddVersionKey "FileVersion" "${INFO_PRODUCTVERSION}"
|
||||
VIAddVersionKey "LegalCopyright" "${INFO_COPYRIGHT}"
|
||||
VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}"
|
||||
|
||||
# Enable HiDPI support. https://nsis.sourceforge.io/Reference/ManifestDPIAware
|
||||
ManifestDPIAware true
|
||||
|
||||
!include "MUI.nsh"
|
||||
|
||||
!define MUI_ICON "..\icon.ico"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user