Compare commits

...

8 Commits

Author SHA1 Message Date
Lea Anthony 4ace627177 Merge branch 'master' into docs/rename_bleeding_edge 2022-11-13 21:02:13 +11:00
Lea Anthony 42f98e95e1 Rename bleeding edge -> local development 2022-11-13 21:00:34 +11:00
stffabi 0607777bec [darwin, inspector] Fix build (#2082) 2022-11-12 21:02:53 +11:00
stffabi f6e46ac1c3 [debug] Introducing debug options for debug builds to allow opening the inspector on startup (#2080) 2022-11-12 19:51:54 +11:00
Antonio Cheong e3e20bdb42 Reference NSIS as optional dependency and provide more info (#2070)
* Update system.go

* Update installation.mdx

* Update base docs
2022-11-12 18:36:57 +11:00
stffabi 6d0ae669f9 [dev] Fix noreload flag and only skip reloads triggered by assetdir (#2081) 2022-11-12 17:08:54 +11:00
Misite Bao 8c4c4a9df3 docs: sync documents (#2073)
* docs: fix document formatting

* docs: sync documents
2022-11-12 08:30:16 +11:00
github-actions[bot] fc312a5f04 chore: update sponsors.svg (#2077)
Co-authored-by: leaanthony <leaanthony@users.noreply.github.com>
2022-11-11 23:46:30 +11:00
23 changed files with 593 additions and 272 deletions
+5 -7
View File
@@ -572,6 +572,9 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
assetDir := ""
changedPaths := map[string]struct{}{}
// If we are using an external dev server, the reloading of the frontend part can be skipped or if the user requested it
skipAssetsReload := (flags.frontendDevServerURL != "" || flags.noReload)
assetDirURL := joinPath(devServerURL, "/wails/assetdir")
reloadURL := joinPath(devServerURL, "/wails/reload")
for quit == false {
@@ -662,11 +665,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
}
}
if flags.frontendDevServerURL != "" {
// If we are using an external dev server, the reloading of the frontend part can be skipped
continue
}
if len(changedPaths) != 0 {
if !skipAssetsReload && len(changedPaths) != 0 {
if assetDir == "" {
resp, err := http.Get(assetDirURL)
if err != nil {
@@ -692,8 +691,6 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
} else if len(dirsThatTriggerAReload) == 0 {
LogRed("Reloading couldn't be triggered: Please specify -assetdir or -reloaddirs")
}
changedPaths = map[string]struct{}{}
}
if reload {
reload = false
@@ -702,6 +699,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
LogRed("Error during refresh: %s", err.Error())
}
}
changedPaths = map[string]struct{}{}
case <-quitChannel:
LogGreen("\nCaught quit")
quit = true
@@ -0,0 +1,11 @@
//go:build darwin && !dev
package darwin
import (
"unsafe"
)
func showInspector(context unsafe.Pointer) {
}
@@ -0,0 +1,41 @@
//go:build darwin && dev
package darwin
// We are using private APIs here, make sure this is only included in a dev build and not in a production build.
// Otherwise the binary might get rejected by the AppReview-Team when pushing it to the AppStore.
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Foundation -framework Cocoa -framework WebKit
#import <Foundation/Foundation.h>
#import "WailsContext.h"
@interface _WKInspector : NSObject
- (void)show;
- (void)detach;
@end
@interface WKWebView ()
- (_WKInspector *)_inspector;
@end
void showInspector(void *inctx) {
WailsContext *ctx = (__bridge WailsContext*) inctx;
[ctx.webview._inspector show];
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
// Detach must be deferred a little bit and is ignored directly after a show.
[ctx.webview._inspector detach];
});
}
*/
import "C"
import (
"unsafe"
)
func showInspector(context unsafe.Pointer) {
C.showInspector(context)
}
@@ -112,6 +112,9 @@ func NewWindow(frontendOptions *options.App, debugMode bool) *Window {
result.SetApplicationMenu(frontendOptions.Menu)
}
if debugMode && frontendOptions.Debug.OpenInspectorOnStartup {
showInspector(result.context)
}
return result
}
+7 -2
View File
@@ -232,10 +232,15 @@ GtkWidget* setupWebview(void* contentManager, GtkWindow* window, int hideWindowO
return webview;
}
void devtoolsEnabled(void* webview, int enabled) {
void devtoolsEnabled(void* webview, int enabled, bool showInspector) {
WebKitSettings *settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webview));
gboolean genabled = enabled == 1 ? true : false;
webkit_settings_set_enable_developer_extras(settings, genabled);
if (genabled && showInspector) {
WebKitWebInspector *inspector = webkit_web_view_get_inspector(WEBKIT_WEB_VIEW(webview));
webkit_web_inspector_show(WEBKIT_WEB_INSPECTOR(inspector));
}
}
void loadIndex(void* webview, char* url) {
@@ -704,7 +709,7 @@ func NewWindow(appoptions *options.App, debug bool) *Window {
C.connectButtons(unsafe.Pointer(webview))
if debug {
C.devtoolsEnabled(unsafe.Pointer(webview), C.int(1))
C.devtoolsEnabled(unsafe.Pointer(webview), C.int(1), C.bool(appoptions.Debug.OpenInspectorOnStartup))
} else {
C.DisableContextMenu(unsafe.Pointer(webview))
}
@@ -443,7 +443,6 @@ func (f *Frontend) setupChromium() {
if err != nil {
log.Fatal(err)
}
}
err = settings.PutIsStatusBarEnabled(false)
@@ -459,6 +458,10 @@ func (f *Frontend) setupChromium() {
log.Fatal(err)
}
if f.debug && f.frontendOptions.Debug.OpenInspectorOnStartup {
chromium.OpenDevToolsWindow()
}
// Setup focus event handler
onFocus := f.mainWindow.OnSetFocus()
onFocus.Bind(f.onFocus)
@@ -363,4 +363,8 @@ func (e *Chromium) PutZoomFactor(zoomFactor float64) {
if err != nil {
log.Fatal(err)
}
}
}
func (e *Chromium) OpenDevToolsWindow() {
e.webview.OpenDevToolsWindow()
}
@@ -469,3 +469,14 @@ func (i *ICoreWebView2) AddNavigationCompleted(eventHandler *ICoreWebView2Naviga
}
return nil
}
func (i *ICoreWebView2) OpenDevToolsWindow() error {
var err error
_, _, err = i.vtbl.OpenDevToolsWindow.Call(
uintptr(unsafe.Pointer(i)),
)
if err != windows.ERROR_SUCCESS {
return err
}
return nil
}
+1 -1
View File
@@ -91,7 +91,7 @@ func checkNSIS() *packagemanager.Dependency {
Name: "nsis ",
PackageName: "N/A",
Installed: installed,
InstallCommand: "Available at https://nsis.sourceforge.io/Download",
InstallCommand: "More info at https://wails.io/docs/guides/windows-installer/",
Version: version,
Optional: true,
External: false,
+7
View File
@@ -0,0 +1,7 @@
package options
// Debug options which are taken into account in debug builds.
type Debug struct {
// OpenInspectorOnStartup opens the inspector on startup of the app.
OpenInspectorOnStartup bool
}
+3
View File
@@ -78,6 +78,9 @@ type App struct {
// Experimental options
Experimental *Experimental
// Debug options for debug builds. These options will be ignored in a production build.
Debug Debug
}
type RGBA struct {
@@ -65,6 +65,7 @@ import TabItem from "@theme/TabItem";
## Optional Dependencies
- [UPX](https://upx.github.io/) for compressing your applications.
- [NSIS](https://wails.io/docs/guides/windows-installer/) for generating Windows installers.
## Installing Wails
@@ -1,4 +1,4 @@
# Bleeding Edge
# Local Development
## Overview
+18 -1
View File
@@ -102,6 +102,9 @@ func main() {
Icon: icon,
WindowIsTranslucent: false,
},
Debug: options.Debug{
OpenInspectorOnStartup: false,
},
})
if err != nil {
log.Fatal(err)
@@ -821,4 +824,18 @@ Scaling is postponed until the last minute, when the desired final size is known
Setting this to `true` will make the window background translucent. Some window managers may ignore it, or result in a black window.
Name: WindowIsTranslucent<br/>
Type: `bool`
Type: `bool`
### Debug
This defines [Debug specific options](#Debug) that apply to debug builds.
Name: Debug<br/>
Type: `options.Debug`
#### OpenInspectorOnStartup
Setting this to `true` will open the WebInspector on startup of the application.
Name: OpenInspectorOnStartup<br/>
Type: `bool`
@@ -11,6 +11,8 @@ The project config resides in the `wails.json` file in the project directory. Th
"name": "[The project name]",
"assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]",
"reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]",
"build:dir": "[The directory where the build files reside. Defaults to 'build']",
"frontend:dir": "[Relative path to the frontend directory. Defaults to 'frontend']",
"frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]",
"frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]",
"frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]",
@@ -0,0 +1,38 @@
{
"version.label": {
"message": "v2.2.0",
"description": "The label for version v2.2.0"
},
"sidebar.docs.category.Getting Started": {
"message": "はじめよう",
"description": "The label for category Getting Started in sidebar docs"
},
"sidebar.docs.category.Reference": {
"message": "リファレンス",
"description": "The label for category Reference in sidebar docs"
},
"sidebar.docs.category.Runtime": {
"message": "Runtime",
"description": "The label for category Runtime in sidebar docs"
},
"sidebar.docs.category.Community": {
"message": "コミュニティ",
"description": "The label for category Community in sidebar docs"
},
"sidebar.docs.category.Showcase": {
"message": "事例紹介",
"description": "The label for category Showcase in sidebar docs"
},
"sidebar.docs.category.Guides": {
"message": "ガイド",
"description": "The label for category Guides in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "チュートリアル",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.link.Contributing": {
"message": "コントリビューション",
"description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing"
}
}
@@ -4,81 +4,135 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.
## [Unreleased]
## v2.2.0 - 2022-11-09
### Added
- Wails now uses a purpose built, native Go implementation of Microsoft's webview2loader dll. This means there is no need to embed the `Webview2Loader.dll` file in your binaries, meaning filesizes will be ~130k smaller! Thanks to @stffabi for this [awesome contribution](https://github.com/wailsapp/wails/pull/1974)!
- This release provides much more control over custom asset handling via the new [AssetServer](https://wails.io/docs/reference/options#assetserver) options. This allows you to provide your own custom asset handler and hook into the request chain through middleware. Thanks to @stffabi for this [awesome contribution](https://github.com/wailsapp/wails/pull/2016) and @mholt for the [initial idea](https://github.com/wailsapp/wails/issues/2007) and extensive testing.
- It is now possible to customise the layout of your Wails projects using 2 new options in `wails.json`:
- `build:dir` can be used to specify where the build files reside
- `frontend:dir` can be used to specify where the frontend files reside
- If `go.mod` is not found in the same directory as `wails.json`, the cli will look up the parent directories to find it. Fixed by @leaanthony in this [PR](https://github.com/wailsapp/wails/pull/2009)
- Colour output in the CLI can now be turned off by using the `--nocolor` flag. This is useful for CI/CD pipelines. Thanks to @scottopell for the [PR](https://github.com/wailsapp/wails/pull/1947)
- A JSON schema definition for the `wails.json` file has been added. IDEs should now provide code complete when editing `wails.json`. Thanks to @binyamin for the [PR](https://github.com/wailsapp/wails/pull/1864)
- The `EventsOn*` methods now return a function that can be called to deregister the listener. Thanks to @joshbuddy for the [PR](https://github.com/wailsapp/wails/pull/1969)
### Fixed
- Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989
- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999)
- When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Thanks to @stffabi for the [fix](https://github.com/wailsapp/wails/pull/2043)
### Changed
- The troubleshooting guide was updated to provide guidance when [Vite fails to start](https://wails.io/docs/guides/troubleshooting#cannot-start-service-host-version-xxx-does-not-match-binary-version-xxx). Thanks to @willdot for the [PR](https://github.com/wailsapp/wails/pull/2000).
- English, Chinese and Japanese documentation updates. Thanks to @misitebao.
### Deprecated
- The [AssetsHandler](https://wails.io/docs/reference/options#assetshandler) option has been deprecated. Please use the [AssetServer](https://wails.io/docs/reference/options#assetserver) option instead.
### New Contributors
- @willdot made their first contribution in https://github.com/wailsapp/wails/pull/2000
- @ParkourLiu made their first contribution in https://github.com/wailsapp/wails/pull/1999
- @binyamin made their first contribution in https://github.com/wailsapp/wails/pull/1864
- @joshbuddy made their first contribution in https://github.com/wailsapp/wails/pull/1969
- @sgosiaco made their first contribution in https://github.com/wailsapp/wails/pull/2062
## v2.1.0 - 2022-10-18
### Removed
* The `RGBA` option in `options.App` has now been removed. Use `BackgroundColour` instead.
- The `RGBA` option in `options.App` has now been removed. Use `BackgroundColour` instead.
### Added
* [Support for defaulting to No button in Windows dialogs](https://wails.io/docs/reference/runtime/dialog/#windows) - @leaanthony in https://github.com/wailsapp/wails/pull/1875
* Add missing resize for frameless window on Linux - @Lyimmi in https://github.com/wailsapp/wails/pull/1918
* [Add window transparency for linux](https://wails.io/docs/reference/options#windowistranslucent-2) - @Lyimmi in https://github.com/wailsapp/wails/pull/1926
* [Add WindowExecJS method](https://wails.io/docs/reference/runtime/window#windowexecjs) - @leaanthony in https://github.com/wailsapp/wails/pull/1927
* [Add support for `Info.dev.plist` on macOS](https://wails.io/docs//reference/cli#dev) - @leaanthony in https://github.com/wailsapp/wails/pull/1960
* [Add ZoomFactor get/set and add the respective windows only options](https://wails.io/docs/reference/options#zoomfactor) - @pierrejoye in https://github.com/wailsapp/wails/pull/1463
- [Support for defaulting to No button in Windows dialogs](https://wails.io/docs/reference/runtime/dialog/#windows) - @leaanthony in https://github.com/wailsapp/wails/pull/1875
- Add missing resize for frameless window on Linux - @Lyimmi in https://github.com/wailsapp/wails/pull/1918
- [Add window transparency for linux](https://wails.io/docs/reference/options#windowistranslucent-2) - @Lyimmi in https://github.com/wailsapp/wails/pull/1926
- [Add WindowExecJS method](https://wails.io/docs/reference/runtime/window#windowexecjs) - @leaanthony in https://github.com/wailsapp/wails/pull/1927
- [Add support for `Info.dev.plist` on macOS](https://wails.io/docs//reference/cli#dev) - @leaanthony in https://github.com/wailsapp/wails/pull/1960
- [Add ZoomFactor get/set and add the respective windows only options](https://wails.io/docs/reference/options#zoomfactor) - @pierrejoye in https://github.com/wailsapp/wails/pull/1463
### Fixed
* Embed directories auto-created if they don't exist - @leaanthony in https://github.com/wailsapp/wails/pull/1983
* Quote command arguments if they have a space - @leaanthony in https://github.com/wailsapp/wails/pull/1892
* Fixed Linux frameless window drag - @Lyimmi in https://github.com/wailsapp/wails/pull/1916
* Fix gtk_window_begin_resize_drag's mouse button - @Lyimmi in https://github.com/wailsapp/wails/pull/1920
* Fix binding generation special cases - @JulioDRF in https://github.com/wailsapp/wails/pull/1902
* Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929
* Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931
* Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946
* Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942
* [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972
* Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976
- Embed directories auto-created if they don't exist - @leaanthony in https://github.com/wailsapp/wails/pull/1983
- Quote command arguments if they have a space - @leaanthony in https://github.com/wailsapp/wails/pull/1892
- Fixed Linux frameless window drag - @Lyimmi in https://github.com/wailsapp/wails/pull/1916
- Fix gtk_window_begin_resize_drag's mouse button - @Lyimmi in https://github.com/wailsapp/wails/pull/1920
- Fix binding generation special cases - @JulioDRF in https://github.com/wailsapp/wails/pull/1902
- Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929
- Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931
- Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946
- Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942
- [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972
- Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976
### Changed
* Add PR checks - @leaanthony in https://github.com/wailsapp/wails/pull/1879
* Auto label project cards - @leaanthony in https://github.com/wailsapp/wails/pull/1881
* Add issue translator - @leaanthony in https://github.com/wailsapp/wails/pull/1891
* Update label names in the issue template - @misitebao in https://github.com/wailsapp/wails/pull/1893
* obfuscated instead of obfuscate in the docs - @arifali123 in https://github.com/wailsapp/wails/pull/1895
* [assetHandler] Remove redundant log prefix - @stffabi in https://github.com/wailsapp/wails/pull/1896
* [dev] Do not generate bindings in the dev app itself - @stffabi in https://github.com/wailsapp/wails/pull/1899
* Update Chinese translation - @almas1992 in https://github.com/wailsapp/wails/pull/1894
* Refactor app - @leaanthony in https://github.com/wailsapp/wails/pull/1909
* Update documents - @misitebao in https://github.com/wailsapp/wails/pull/1907 https://github.com/wailsapp/wails/pull/1936
* Adding Tutorial link - @raguay in https://github.com/wailsapp/wails/pull/1903
* Add react-ts-vite-tailwind template - @hotafrika in https://github.com/wailsapp/wails/pull/1930
* Update README.zh-Hans.md - @o8x in https://github.com/wailsapp/wails/pull/1949
* Add Elm Tailwind CSS community template - @rnice01 in https://github.com/wailsapp/wails/pull/1939
* Chore/generate sponsors - @leaanthony in https://github.com/wailsapp/wails/pull/1965
* Use swc + pnpm for website - @leaanthony in https://github.com/wailsapp/wails/pull/1966
* Sort structs in models.ts - @leaanthony in https://github.com/wailsapp/wails/pull/1961
* Update Sponsor Image - @github-actions in https://github.com/wailsapp/wails/pull/1973
* docs: sync documents - @misitebao in https://github.com/wailsapp/wails/pull/1968
* Update events.mdx - @cuigege in https://github.com/wailsapp/wails/pull/1979
## New Contributors
* @arifali123 made their first contribution in https://github.com/wailsapp/wails/pull/1895
* @almas1992 made their first contribution in https://github.com/wailsapp/wails/pull/1894
* @JulioDRF made their first contribution in https://github.com/wailsapp/wails/pull/1902
* @hotafrika made their first contribution in https://github.com/wailsapp/wails/pull/1930
* @scottopell made their first contribution in https://github.com/wailsapp/wails/pull/1946
* @o8x made their first contribution in https://github.com/wailsapp/wails/pull/1949
* @rnice01 made their first contribution in https://github.com/wailsapp/wails/pull/1939
* @cuigege made their first contribution in https://github.com/wailsapp/wails/pull/1979
* @lyon-lee-dev made their first contribution in https://github.com/wailsapp/wails/pull/1976
- Add PR checks - @leaanthony in https://github.com/wailsapp/wails/pull/1879
- Auto label project cards - @leaanthony in https://github.com/wailsapp/wails/pull/1881
- Add issue translator - @leaanthony in https://github.com/wailsapp/wails/pull/1891
- Update label names in the issue template - @misitebao in https://github.com/wailsapp/wails/pull/1893
- obfuscated instead of obfuscate in the docs - @arifali123 in https://github.com/wailsapp/wails/pull/1895
- [assetHandler] Remove redundant log prefix - @stffabi in https://github.com/wailsapp/wails/pull/1896
- [dev] Do not generate bindings in the dev app itself - @stffabi in https://github.com/wailsapp/wails/pull/1899
- Update Chinese translation - @almas1992 in https://github.com/wailsapp/wails/pull/1894
- Refactor app - @leaanthony in https://github.com/wailsapp/wails/pull/1909
- Update documents - @misitebao in https://github.com/wailsapp/wails/pull/1907 https://github.com/wailsapp/wails/pull/1936
- Adding Tutorial link - @raguay in https://github.com/wailsapp/wails/pull/1903
- Add react-ts-vite-tailwind template - @hotafrika in https://github.com/wailsapp/wails/pull/1930
- Update README.zh-Hans.md - @o8x in https://github.com/wailsapp/wails/pull/1949
- Add Elm Tailwind CSS community template - @rnice01 in https://github.com/wailsapp/wails/pull/1939
- Chore/generate sponsors - @leaanthony in https://github.com/wailsapp/wails/pull/1965
- Use swc + pnpm for website - @leaanthony in https://github.com/wailsapp/wails/pull/1966
- Sort structs in models.ts - @leaanthony in https://github.com/wailsapp/wails/pull/1961
- Update Sponsor Image - @github-actions in https://github.com/wailsapp/wails/pull/1973
- docs: sync documents - @misitebao in https://github.com/wailsapp/wails/pull/1968
- Update events.mdx - @cuigege in https://github.com/wailsapp/wails/pull/1979
### New Contributors
- @arifali123 made their first contribution in https://github.com/wailsapp/wails/pull/1895
- @almas1992 made their first contribution in https://github.com/wailsapp/wails/pull/1894
- @JulioDRF made their first contribution in https://github.com/wailsapp/wails/pull/1902
- @hotafrika made their first contribution in https://github.com/wailsapp/wails/pull/1930
- @scottopell made their first contribution in https://github.com/wailsapp/wails/pull/1946
- @o8x made their first contribution in https://github.com/wailsapp/wails/pull/1949
- @rnice01 made their first contribution in https://github.com/wailsapp/wails/pull/1939
- @cuigege made their first contribution in https://github.com/wailsapp/wails/pull/1979
- @lyon-lee-dev made their first contribution in https://github.com/wailsapp/wails/pull/1976
## v2.0.0 - 2022-09-22
## Fixed
* Fix buildtags parsing if only one tag is specified by @stffabi in https://github.com/wailsapp/wails/pull/1858
* Use embed all to include all files in templates by @stffabi in https://github.com/wailsapp/wails/pull/1862
### Fixed
## Changed
* Bump minimum required Go version to 1.18 by @stffabi in https://github.com/wailsapp/wails/pull/1854
* Add check for minimum required Go version by @stffabi in https://github.com/wailsapp/wails/pull/1853
* chore: update README and workflows by @misitebao in https://github.com/wailsapp/wails/pull/1848
* Update introduction.mdx by @ParvinEyvazov in https://github.com/wailsapp/wails/pull/1863
* Releasetest/release workflow by @leaanthony in https://github.com/wailsapp/wails/pull/1869
* Optimize documentation website by @misitebao in https://github.com/wailsapp/wails/pull/1849
- Fix buildtags parsing if only one tag is specified by @stffabi in https://github.com/wailsapp/wails/pull/1858
- Use embed all to include all files in templates by @stffabi in https://github.com/wailsapp/wails/pull/1862
## New Contributors
* @ParvinEyvazov made their first contribution in https://github.com/wailsapp/wails/pull/1863
### Changed
- Bump minimum required Go version to 1.18 by @stffabi in https://github.com/wailsapp/wails/pull/1854
- Add check for minimum required Go version by @stffabi in https://github.com/wailsapp/wails/pull/1853
- chore: update README and workflows by @misitebao in https://github.com/wailsapp/wails/pull/1848
- Update introduction.mdx by @ParvinEyvazov in https://github.com/wailsapp/wails/pull/1863
- Releasetest/release workflow by @leaanthony in https://github.com/wailsapp/wails/pull/1869
- Optimize documentation website by @misitebao in https://github.com/wailsapp/wails/pull/1849
### New Contributors
- @ParvinEyvazov made their first contribution in https://github.com/wailsapp/wails/pull/1863
## v2.0.0-rc.1 - 2022-09-13
@@ -11,6 +11,8 @@ sidebar_position: 5
"name": "[The project name]",
"assetdir": "[Relative path to the directory containing the compiled assets, this is normally inferred and could be left empty]",
"reloaddirs": "[Additional directories to trigger reloads (comma separated), this is only used for some advanced asset configurations]",
"build:dir": "[The directory where the build files reside. Defaults to 'build']",
"frontend:dir": "[Relative path to the frontend directory. Defaults to 'frontend']",
"frontend:install": "[The command to install node dependencies, run in the frontend directory - often `npm install`]",
"frontend:build": "[The command to build the assets, run in the frontend directory - often `npm run build`]",
"frontend:dev": "[This command has been replaced by frontend:dev:build. If frontend:dev:build is not specified will falls back to this command. \nIf this command is also not specified will falls back to frontend:build]",
@@ -0,0 +1,38 @@
{
"version.label": {
"message": "v2.2.0",
"description": "The label for version v2.2.0"
},
"sidebar.docs.category.Getting Started": {
"message": "快速入门",
"description": "The label for category Getting Started in sidebar docs"
},
"sidebar.docs.category.Reference": {
"message": "参考",
"description": "The label for category Reference in sidebar docs"
},
"sidebar.docs.category.Runtime": {
"message": "运行时",
"description": "The label for category Runtime in sidebar docs"
},
"sidebar.docs.category.Community": {
"message": "社区",
"description": "The label for category Community in sidebar docs"
},
"sidebar.docs.category.Showcase": {
"message": "案例展示",
"description": "The label for category Showcase in sidebar docs"
},
"sidebar.docs.category.Guides": {
"message": "指南",
"description": "The label for category Guides in sidebar docs"
},
"sidebar.docs.category.Tutorials": {
"message": "教程",
"description": "The label for category Tutorials in sidebar docs"
},
"sidebar.docs.link.Contributing": {
"message": "参与贡献",
"description": "The label for link Contributing in sidebar docs, linking to /community-guide#ways-of-contributing"
}
}
@@ -4,81 +4,135 @@
格式基于 [维护更新日志](https://keepachangelog.com/en/1.0.0/),并且该项目遵循 [语义化版本](https://semver.org/spec/v2.0.0.html)。
- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.
## [Unreleased]
## v2.2.0 - 2022-11-09
### 新增
- Wails now uses a purpose built, native Go implementation of Microsoft's webview2loader dll. This means there is no need to embed the `Webview2Loader.dll` file in your binaries, meaning filesizes will be ~130k smaller! Thanks to @stffabi for this [awesome contribution](https://github.com/wailsapp/wails/pull/1974)!
- This release provides much more control over custom asset handling via the new [AssetServer](https://wails.io/docs/reference/options#assetserver) options. This allows you to provide your own custom asset handler and hook into the request chain through middleware. Thanks to @stffabi for this [awesome contribution](https://github.com/wailsapp/wails/pull/2016) and @mholt for the [initial idea](https://github.com/wailsapp/wails/issues/2007) and extensive testing.
- It is now possible to customise the layout of your Wails projects using 2 new options in `wails.json`:
- `build:dir` can be used to specify where the build files reside
- `frontend:dir` can be used to specify where the frontend files reside
- If `go.mod` is not found in the same directory as `wails.json`, the cli will look up the parent directories to find it. Fixed by @leaanthony in this [PR](https://github.com/wailsapp/wails/pull/2009)
- Colour output in the CLI can now be turned off by using the `--nocolor` flag. This is useful for CI/CD pipelines. Thanks to @scottopell for the [PR](https://github.com/wailsapp/wails/pull/1947)
- A JSON schema definition for the `wails.json` file has been added. IDEs should now provide code complete when editing `wails.json`. Thanks to @binyamin for the [PR](https://github.com/wailsapp/wails/pull/1864)
- The `EventsOn*` methods now return a function that can be called to deregister the listener. Thanks to @joshbuddy for the [PR](https://github.com/wailsapp/wails/pull/1969)
### 修复
- Webview2 on Windows returns a potential whitespace when defining the style like this style="--wails-draggable: drag". Fixed by @stffabi in https://github.com/wailsapp/wails/pull/1989
- Bound structs that had `struct{}` field types would cause the Typescript generation to fail. Thanks to @ParkourLiu for the [PR](https://github.com/wailsapp/wails/pull/1999)
- When maximising a frameless window on Windows with multiple monitors, the window could sometimes become blank. Thanks to @stffabi for the [fix](https://github.com/wailsapp/wails/pull/2043)
### 变更
- The troubleshooting guide was updated to provide guidance when [Vite fails to start](https://wails.io/docs/guides/troubleshooting#cannot-start-service-host-version-xxx-does-not-match-binary-version-xxx). Thanks to @willdot for the [PR](https://github.com/wailsapp/wails/pull/2000).
- English, Chinese and Japanese documentation updates. Thanks to @misitebao.
### 废弃
- The [AssetsHandler](https://wails.io/docs/reference/options#assetshandler) option has been deprecated. Please use the [AssetServer](https://wails.io/docs/reference/options#assetserver) option instead.
### 新贡献者
- @willdot made their first contribution in https://github.com/wailsapp/wails/pull/2000
- @ParkourLiu made their first contribution in https://github.com/wailsapp/wails/pull/1999
- @binyamin made their first contribution in https://github.com/wailsapp/wails/pull/1864
- @joshbuddy made their first contribution in https://github.com/wailsapp/wails/pull/1969
- @sgosiaco made their first contribution in https://github.com/wailsapp/wails/pull/2062
## v2.1.0 - 2022-10-18
### 移除
* `options.App<code> 中的 <code>RGBA` 选项现已被删除。 使用 `BackgroundColour` 代替。
- `options.App<code> 中的 <code>RGBA` 选项现已被删除。 使用 `BackgroundColour` 代替。
### 新增
* [Support for defaulting to No button in Windows dialogs](https://wails.io/docs/reference/runtime/dialog/#windows) - @leaanthony in https://github.com/wailsapp/wails/pull/1875
* Add missing resize for frameless window on Linux - @Lyimmi in https://github.com/wailsapp/wails/pull/1918
* [Add window transparency for linux](https://wails.io/docs/reference/options#windowistranslucent-2) - @Lyimmi in https://github.com/wailsapp/wails/pull/1926
* [Add WindowExecJS method](https://wails.io/docs/reference/runtime/window#windowexecjs) - @leaanthony in https://github.com/wailsapp/wails/pull/1927
* [Add support for `Info.dev.plist` on macOS](https://wails.io/docs//reference/cli#dev) - @leaanthony in https://github.com/wailsapp/wails/pull/1960
* [Add ZoomFactor get/set and add the respective windows only options](https://wails.io/docs/reference/options#zoomfactor) - @pierrejoye in https://github.com/wailsapp/wails/pull/1463
- [Support for defaulting to No button in Windows dialogs](https://wails.io/docs/reference/runtime/dialog/#windows) - @leaanthony in https://github.com/wailsapp/wails/pull/1875
- Add missing resize for frameless window on Linux - @Lyimmi in https://github.com/wailsapp/wails/pull/1918
- [Add window transparency for linux](https://wails.io/docs/reference/options#windowistranslucent-2) - @Lyimmi in https://github.com/wailsapp/wails/pull/1926
- [Add WindowExecJS method](https://wails.io/docs/reference/runtime/window#windowexecjs) - @leaanthony in https://github.com/wailsapp/wails/pull/1927
- [Add support for `Info.dev.plist` on macOS](https://wails.io/docs//reference/cli#dev) - @leaanthony in https://github.com/wailsapp/wails/pull/1960
- [Add ZoomFactor get/set and add the respective windows only options](https://wails.io/docs/reference/options#zoomfactor) - @pierrejoye in https://github.com/wailsapp/wails/pull/1463
### 修复
* Embed directories auto-created if they don't exist - @leaanthony in https://github.com/wailsapp/wails/pull/1983
* Quote command arguments if they have a space - @leaanthony in https://github.com/wailsapp/wails/pull/1892
* Fixed Linux frameless window drag - @Lyimmi in https://github.com/wailsapp/wails/pull/1916
* Fix gtk_window_begin_resize_drag's mouse button - @Lyimmi in https://github.com/wailsapp/wails/pull/1920
* Fix binding generation special cases - @JulioDRF in https://github.com/wailsapp/wails/pull/1902
* Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929
* Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931
* Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946
* Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942
* [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972
* Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976
- Embed directories auto-created if they don't exist - @leaanthony in https://github.com/wailsapp/wails/pull/1983
- Quote command arguments if they have a space - @leaanthony in https://github.com/wailsapp/wails/pull/1892
- Fixed Linux frameless window drag - @Lyimmi in https://github.com/wailsapp/wails/pull/1916
- Fix gtk_window_begin_resize_drag's mouse button - @Lyimmi in https://github.com/wailsapp/wails/pull/1920
- Fix binding generation special cases - @JulioDRF in https://github.com/wailsapp/wails/pull/1902
- Remove the `.git` directory in the template - @misitebao in https://github.com/wailsapp/wails/pull/1929
- Fix wails dev - @JulioDRF in https://github.com/wailsapp/wails/pull/1931
- Fix for considering new `go` files in dev filesystem watcher - @scottopell in https://github.com/wailsapp/wails/pull/1946
- Prevent type parsing to interfere with Typescript package name - @ValentinTrinque in https://github.com/wailsapp/wails/pull/1942
- [dev] Do not try to infer assetdir from fs.FS when a frontend dev server is in use - @stffabi in https://github.com/wailsapp/wails/pull/1972
- Fix init command not listed in wails help message - @lyon-lee-dev in https://github.com/wailsapp/wails/pull/1976
### 变更
* Add PR checks - @leaanthony in https://github.com/wailsapp/wails/pull/1879
* Auto label project cards - @leaanthony in https://github.com/wailsapp/wails/pull/1881
* Add issue translator - @leaanthony in https://github.com/wailsapp/wails/pull/1891
* Update label names in the issue template - @misitebao in https://github.com/wailsapp/wails/pull/1893
* obfuscated instead of obfuscate in the docs - @arifali123 in https://github.com/wailsapp/wails/pull/1895
* [assetHandler] Remove redundant log prefix - @stffabi in https://github.com/wailsapp/wails/pull/1896
* [dev] Do not generate bindings in the dev app itself - @stffabi in https://github.com/wailsapp/wails/pull/1899
* Update Chinese translation - @almas1992 in https://github.com/wailsapp/wails/pull/1894
* Refactor app - @leaanthony in https://github.com/wailsapp/wails/pull/1909
* Update documents - @misitebao in https://github.com/wailsapp/wails/pull/1907 https://github.com/wailsapp/wails/pull/1936
* Adding Tutorial link - @raguay in https://github.com/wailsapp/wails/pull/1903
* Add react-ts-vite-tailwind template - @hotafrika in https://github.com/wailsapp/wails/pull/1930
* Update README.zh-Hans.md - @o8x in https://github.com/wailsapp/wails/pull/1949
* Add Elm Tailwind CSS community template - @rnice01 in https://github.com/wailsapp/wails/pull/1939
* Chore/generate sponsors - @leaanthony in https://github.com/wailsapp/wails/pull/1965
* Use swc + pnpm for website - @leaanthony in https://github.com/wailsapp/wails/pull/1966
* Sort structs in models.ts - @leaanthony in https://github.com/wailsapp/wails/pull/1961
* Update Sponsor Image - @github-actions in https://github.com/wailsapp/wails/pull/1973
* docs: sync documents - @misitebao in https://github.com/wailsapp/wails/pull/1968
* Update events.mdx - @cuigege in https://github.com/wailsapp/wails/pull/1979
## 新贡献者
* @arifali123 made their first contribution in https://github.com/wailsapp/wails/pull/1895
* @almas1992 made their first contribution in https://github.com/wailsapp/wails/pull/1894
* @JulioDRF made their first contribution in https://github.com/wailsapp/wails/pull/1902
* @hotafrika made their first contribution in https://github.com/wailsapp/wails/pull/1930
* @scottopell made their first contribution in https://github.com/wailsapp/wails/pull/1946
* @o8x made their first contribution in https://github.com/wailsapp/wails/pull/1949
* @rnice01 made their first contribution in https://github.com/wailsapp/wails/pull/1939
* @cuigege made their first contribution in https://github.com/wailsapp/wails/pull/1979
* @lyon-lee-dev made their first contribution in https://github.com/wailsapp/wails/pull/1976
- Add PR checks - @leaanthony in https://github.com/wailsapp/wails/pull/1879
- Auto label project cards - @leaanthony in https://github.com/wailsapp/wails/pull/1881
- Add issue translator - @leaanthony in https://github.com/wailsapp/wails/pull/1891
- Update label names in the issue template - @misitebao in https://github.com/wailsapp/wails/pull/1893
- obfuscated instead of obfuscate in the docs - @arifali123 in https://github.com/wailsapp/wails/pull/1895
- [assetHandler] Remove redundant log prefix - @stffabi in https://github.com/wailsapp/wails/pull/1896
- [dev] Do not generate bindings in the dev app itself - @stffabi in https://github.com/wailsapp/wails/pull/1899
- Update Chinese translation - @almas1992 in https://github.com/wailsapp/wails/pull/1894
- Refactor app - @leaanthony in https://github.com/wailsapp/wails/pull/1909
- Update documents - @misitebao in https://github.com/wailsapp/wails/pull/1907 https://github.com/wailsapp/wails/pull/1936
- Adding Tutorial link - @raguay in https://github.com/wailsapp/wails/pull/1903
- Add react-ts-vite-tailwind template - @hotafrika in https://github.com/wailsapp/wails/pull/1930
- Update README.zh-Hans.md - @o8x in https://github.com/wailsapp/wails/pull/1949
- Add Elm Tailwind CSS community template - @rnice01 in https://github.com/wailsapp/wails/pull/1939
- Chore/generate sponsors - @leaanthony in https://github.com/wailsapp/wails/pull/1965
- Use swc + pnpm for website - @leaanthony in https://github.com/wailsapp/wails/pull/1966
- Sort structs in models.ts - @leaanthony in https://github.com/wailsapp/wails/pull/1961
- Update Sponsor Image - @github-actions in https://github.com/wailsapp/wails/pull/1973
- docs: sync documents - @misitebao in https://github.com/wailsapp/wails/pull/1968
- Update events.mdx - @cuigege in https://github.com/wailsapp/wails/pull/1979
### 新贡献者
- @arifali123 made their first contribution in https://github.com/wailsapp/wails/pull/1895
- @almas1992 made their first contribution in https://github.com/wailsapp/wails/pull/1894
- @JulioDRF made their first contribution in https://github.com/wailsapp/wails/pull/1902
- @hotafrika made their first contribution in https://github.com/wailsapp/wails/pull/1930
- @scottopell made their first contribution in https://github.com/wailsapp/wails/pull/1946
- @o8x made their first contribution in https://github.com/wailsapp/wails/pull/1949
- @rnice01 made their first contribution in https://github.com/wailsapp/wails/pull/1939
- @cuigege made their first contribution in https://github.com/wailsapp/wails/pull/1979
- @lyon-lee-dev made their first contribution in https://github.com/wailsapp/wails/pull/1976
## v2.0.0 - 2022-09-22
## 修复
* Fix buildtags parsing if only one tag is specified by @stffabi in https://github.com/wailsapp/wails/pull/1858
* Use embed all to include all files in templates by @stffabi in https://github.com/wailsapp/wails/pull/1862
### 修复
## 变更
* Bump minimum required Go version to 1.18 by @stffabi in https://github.com/wailsapp/wails/pull/1854
* Add check for minimum required Go version by @stffabi in https://github.com/wailsapp/wails/pull/1853
* chore: update README and workflows by @misitebao in https://github.com/wailsapp/wails/pull/1848
* Add nixpkgs support to doctor command. by @ianmjones in https://github.com/wailsapp/wails/pull/1551 by @ianmjones in https://github.com/wailsapp/wails/pull/1551 by @ianmjones in https://github.com/wailsapp/wails/pull/1551
* Releasetest/release workflow by @leaanthony in https://github.com/wailsapp/wails/pull/1869
* Optimize documentation website by @misitebao in https://github.com/wailsapp/wails/pull/1849
- Fix buildtags parsing if only one tag is specified by @stffabi in https://github.com/wailsapp/wails/pull/1858
- Use embed all to include all files in templates by @stffabi in https://github.com/wailsapp/wails/pull/1862
## 新贡献者
* @ParvinEyvazov made their first contribution in https://github.com/wailsapp/wails/pull/1863
### 变更
- Bump minimum required Go version to 1.18 by @stffabi in https://github.com/wailsapp/wails/pull/1854
- Add check for minimum required Go version by @stffabi in https://github.com/wailsapp/wails/pull/1853
- chore: update README and workflows by @misitebao in https://github.com/wailsapp/wails/pull/1848
- Add nixpkgs support to doctor command. by @ianmjones in https://github.com/wailsapp/wails/pull/1551 by @ianmjones in https://github.com/wailsapp/wails/pull/1551 by @ianmjones in https://github.com/wailsapp/wails/pull/1551
- Releasetest/release workflow by @leaanthony in https://github.com/wailsapp/wails/pull/1869
- Optimize documentation website by @misitebao in https://github.com/wailsapp/wails/pull/1849
### 新贡献者
- @ParvinEyvazov made their first contribution in https://github.com/wailsapp/wails/pull/1863
## v2.0.0-rc.1 - 2022-09-13

Some files were not shown because too many files have changed in this diff Show More