mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Merge branch 'master' into feature/allow-disable-panic-recovery
This commit is contained in:
commit
797016d736
7 changed files with 35 additions and 14 deletions
|
|
@ -128,6 +128,7 @@ func (d *Dev) GenerateBuildOptions() *build.Options {
|
|||
ForceBuild: d.ForceBuild,
|
||||
IgnoreFrontend: d.SkipFrontend,
|
||||
SkipBindings: d.SkipBindings,
|
||||
SkipModTidy: d.SkipModTidy,
|
||||
Verbosity: d.Verbosity,
|
||||
WailsJSDir: d.WailsJSDir,
|
||||
RaceDetector: d.RaceDetector,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,12 @@ func CreateApp(appoptions *options.App) (*App, error) {
|
|||
ctx = context.WithValue(ctx, "debug", true)
|
||||
ctx = context.WithValue(ctx, "devtoolsEnabled", true)
|
||||
|
||||
// Set up logger
|
||||
// Set up logger if the appoptions.LogLevel is an invalid value, set it to the default log level
|
||||
appoptions.LogLevel, err = pkglogger.StringToLogLevel(appoptions.LogLevel.String())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
myLogger := logger.New(appoptions.Logger)
|
||||
myLogger.SetLogLevel(appoptions.LogLevel)
|
||||
|
||||
|
|
@ -91,15 +96,8 @@ func CreateApp(appoptions *options.App) (*App, error) {
|
|||
if frontendDevServerURLFlag != nil {
|
||||
frontendDevServerURL = *frontendDevServerURLFlag
|
||||
}
|
||||
// Only override LogLevel if the flag was explicitly set
|
||||
if loglevelFlag != nil && devFlags.Lookup("loglevel").Value.String() != appoptions.LogLevel.String() {
|
||||
loggerLevel, err := pkglogger.StringToLogLevel(*loglevelFlag)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if loggerLevel != appoptions.LogLevel {
|
||||
myLogger.SetLogLevel(loggerLevel)
|
||||
}
|
||||
if loglevelFlag != nil {
|
||||
loglevel = *loglevelFlag
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,6 +174,17 @@ func CreateApp(appoptions *options.App) (*App, error) {
|
|||
ctx = context.WithValue(ctx, "devserver", devServer)
|
||||
}
|
||||
|
||||
if loglevel != "" {
|
||||
level, err := pkglogger.StringToLogLevel(loglevel)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Only set the log level if it's different from the appoptions.LogLevel
|
||||
if level != appoptions.LogLevel {
|
||||
myLogger.SetLogLevel(level)
|
||||
}
|
||||
}
|
||||
|
||||
// Attach logger to context
|
||||
ctx = context.WithValue(ctx, "logger", myLogger)
|
||||
ctx = context.WithValue(ctx, "buildtype", "dev")
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ func (fm *Form) Restore() {
|
|||
SC_RESTORE,
|
||||
0,
|
||||
)
|
||||
w32.ShowWindow(fm.hwnd, w32.SW_RESTORE)
|
||||
w32.ShowWindow(fm.hwnd, w32.SW_SHOW)
|
||||
}
|
||||
|
||||
// Public methods
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
|
|||
|
||||
${If} ${REQUEST_EXECUTION_LEVEL} == "user"
|
||||
# If the installer is run in user level, check the user specific key exists and is not empty then webview2 is already installed
|
||||
ReadRegStr $0 HKCU "Software\Microsoft\EdgeUpdate\Clients{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
|
||||
ReadRegStr $0 HKCU "Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
|
||||
${If} $0 != ""
|
||||
Goto ok
|
||||
${EndIf}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
|
|||
- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - A template using Next.js and TypeScript
|
||||
- [wails-template-nextjs-app-router](https://github.com/thisisvk-in/wails-template-nextjs-app-router) - A template using Next.js and TypeScript with App router
|
||||
- [wails-vite-react-ts-tailwind-template](https://github.com/hotafrika/wails-vite-react-ts-tailwind-template) - A template for React + TypeScript + Vite + TailwindCSS
|
||||
- [Wails-vite-ts-tailwindcss-shadcn-template-2025](https://github.com/darkb0ts/Wails-vite-ts-tailwindcss-shadcn-template-2025) - A template for React + TypeScript + Vite
|
||||
- [wails-vite-react-ts-tailwind-shadcnui-template](https://github.com/Mahcks/wails-vite-react-tailwind-shadcnui-ts) - A template with Vite, React, TypeScript, TailwindCSS, and shadcn/ui
|
||||
- [wails-nextjs-tailwind-template](https://github.com/kairo913/wails-nextjs-tailwind-template) - A template using Next.js and Typescript with TailwindCSS
|
||||
|
||||
|
|
|
|||
|
|
@ -16,12 +16,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Changed
|
||||
- Updated recommendation for Svelte router in [#4085](https://github.com/wailsapp/wails/pull/4085) by [@benmccann](https://github.com/benmccann)
|
||||
- Updated documentation to clarify `WebviewGpuPolicy` default behavior on Linux in [#4162](https://github.com/wailsapp/wails/pull/4162) by [@brianetaveras](https://github.com/brianetaveras)
|
||||
|
||||
### Added
|
||||
- Added "Branding" section to `wails doctor` to correctly identify Windows 11 [#3891](https://github.com/wailsapp/wails/pull/3891) by [@ronen25](https://github.com/ronen25)
|
||||
- Added `-skipembedcreate` flag to build and dev command to improve compile and recompile speed [#4143](https://github.com/wailsapp/wails/pull/4143) by @josStorer
|
||||
- Added `DisablePanicRecovery` option to allow handle panics manually [#4136](https://github.com/wailsapp/wails/pull/4136) by [@APshenkin](https://github.com/APshenkin)
|
||||
|
||||
### Fixed
|
||||
- Fixed -m build flag for dev command not working when recompiling in [#4141](https://github.com/wailsapp/wails/pull/4141) by @josStorer
|
||||
- Fixed window restoration behavior after minimization by @superDingda in [#4109](https://github.com/wailsapp/wails/issues/4109)
|
||||
- Fixed excessive console logging after updating to v2.10.1 by @superDingda in [#4111](https://github.com/wailsapp/wails/issues/4111)
|
||||
- Fixed incorrect Webview2 reg key in HKCU path by @leaanthony.
|
||||
|
||||
## v2.10.1 - 2025-02-24
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ func main() {
|
|||
Linux: &linux.Options{
|
||||
Icon: icon,
|
||||
WindowIsTranslucent: false,
|
||||
WebviewGpuPolicy: linux.WebviewGpuPolicyAlways,
|
||||
WebviewGpuPolicy: linux.WebviewGpuPolicyNever,
|
||||
ProgramName: "wails"
|
||||
},
|
||||
Debug: options.Debug{
|
||||
|
|
@ -1066,7 +1066,10 @@ This option is used for determining the webview's hardware acceleration policy.
|
|||
|
||||
Name: WebviewGpuPolicy<br/>
|
||||
Type: [`options.WebviewGpuPolicy`](#webviewgpupolicy-type)<br/>
|
||||
Default: `WebviewGpuPolicyAlways`
|
||||
Default (Windows, macOS): `WebviewGpuPolicyAlways`<br/>
|
||||
Default (Linux): Due to [#2977](https://github.com/wailsapp/wails/issues/2977,), if `options.Linux` is nil
|
||||
in the call to `wails.Run()`, `WebviewGpuPolicy` is set by default to `WebviewGpuPolicyNever`. You can override this behavior by passing a non-nil `Options` and set `WebviewGpuPolicy` as needed.
|
||||
|
||||
|
||||
##### WebviewGpuPolicy type
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue