5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 23:51:44 +08:00

Merge branch 'develop'

This commit is contained in:
Lea Anthony 2021-04-17 08:28:59 +10:00
commit cecbb38c64
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
12 changed files with 59 additions and 20 deletions

View File

@ -174,7 +174,7 @@ It is recommended at this stage to read the comprehensive documentation at [http
<a href="https://github.com/RH12503"><img src="https://github.com/RH12503.png?size=40" width="40"/></a> <a href="https://github.com/RH12503"><img src="https://github.com/RH12503.png?size=40" width="40"/></a>
<a href="https://github.com/hi019"><img src="https://github.com/hi019.png?size=40" width="40"/></a></a> <a href="https://github.com/hi019"><img src="https://github.com/hi019.png?size=40" width="40"/></a></a>
<a href="https://github.com/Igogrek"><img src="https://github.com/Igogrek.png?size=40" width="40"/></a></a> <a href="https://github.com/Igogrek"><img src="https://github.com/Igogrek.png?size=40" width="40"/></a></a>
<a href="https://github.com/aschey"><img src="https://github.com/aschey.png?size=40" width="40"/></a></a>
## Special Mentions ## Special Mentions

View File

@ -16,7 +16,7 @@ import (
wailsruntime "github.com/wailsapp/wails/runtime" wailsruntime "github.com/wailsapp/wails/runtime"
) )
const xgoVersion = "1.0.1" const xgoVersion = "1.16.2"
var fs = NewFSHelper() var fs = NewFSHelper()

View File

@ -69,6 +69,8 @@ const (
EndeavourOS EndeavourOS
// Crux linux distribution // Crux linux distribution
Crux Crux
// RHEL distribution
RHEL
) )
// DistroInfo contains all the information relating to a linux distribution // DistroInfo contains all the information relating to a linux distribution
@ -131,6 +133,8 @@ func parseOsRelease(osRelease string) *DistroInfo {
result.Distribution = Fedora result.Distribution = Fedora
case "centos": case "centos":
result.Distribution = CentOS result.Distribution = CentOS
case "rhel":
result.Distribution = RHEL
case "arch": case "arch":
result.Distribution = Arch result.Distribution = Arch
case "archlabs": case "archlabs":

View File

@ -138,6 +138,25 @@ distributions:
help: Please install with `sudo yum install gtk3-devel` and try again help: Please install with `sudo yum install gtk3-devel` and try again
- name: webkitgtk3-devel - name: webkitgtk3-devel
help: Please install with `sudo yum install webkitgtk3-devel` and try again help: Please install with `sudo yum install webkitgtk3-devel` and try again
rhel:
id: rhel
releases:
default:
version: default
name: Red Hat Enterprise Linux
gccversioncommand: *gccdumpversion
programs:
- name: gcc
help: Please install with `sudo yum install gcc-c++ make` and try again
- name: pkg-config
help: Please install with `sudo yum install pkgconf-pkg-config` and try again
- name: npm
help: Please install with `sudo yum install epel-release && sudo yum install nodejs` and try again
libraries:
- name: gtk3-devel
help: Please install with `sudo yum install gtk3-devel` and try again
- name: webkitgtk3-devel
help: Please install with `sudo yum install webkitgtk3-devel` and try again
fedora: fedora:
id: fedora id: fedora
releases: releases:

View File

@ -354,7 +354,7 @@ func (b *PackageHelper) PackageWindows(po *ProjectOptions, cleanUp bool) error {
"docker", "run", "--rm", "docker", "run", "--rm",
"-v", outputDir + ":/build", "-v", outputDir + ":/build",
"--entrypoint", "/bin/sh", "--entrypoint", "/bin/sh",
"wailsapp/xgo:latest", "wailsapp/xgo:1.16.2",
"-c", "/usr/bin/x86_64-w64-mingw32-windres -o /build/" + basename + "-res.syso /build/" + basename + ".rc", "-c", "/usr/bin/x86_64-w64-mingw32-windres -o /build/" + basename + "-res.syso /build/" + basename + ".rc",
} }
if err := NewProgramHelper().RunCommandArray(args); err != nil { if err := NewProgramHelper().RunCommandArray(args); err != nil {

View File

@ -283,7 +283,7 @@ func CheckDependencies(logger *Logger) (bool, error) {
libraryChecker = DpkgInstalled libraryChecker = DpkgInstalled
case Arch, ArcoLinux, ArchLabs, Ctlos, Manjaro, ManjaroARM, EndeavourOS: case Arch, ArcoLinux, ArchLabs, Ctlos, Manjaro, ManjaroARM, EndeavourOS:
libraryChecker = PacmanInstalled libraryChecker = PacmanInstalled
case CentOS, Fedora, Tumbleweed, Leap: case CentOS, Fedora, Tumbleweed, Leap, RHEL:
libraryChecker = RpmInstalled libraryChecker = RpmInstalled
case Gentoo: case Gentoo:
libraryChecker = EqueryInstalled libraryChecker = EqueryInstalled

View File

@ -1,4 +1,4 @@
package cmd package cmd
// Version - Wails version // Version - Wails version
const Version = "v1.16.0" const Version = "v1.16.3"

View File

@ -181,7 +181,7 @@ func newConfig(userConfig *AppConfig) (*AppConfig, error) {
MaxWidth: -1, MaxWidth: -1,
MaxHeight: -1, MaxHeight: -1,
Title: "My Wails App", Title: "My Wails App",
Colour: "#FFF", // White by default Colour: "",
HTML: defaultHTML, HTML: defaultHTML,
} }

View File

@ -111,11 +111,14 @@ func (w *WebView) Initialise(config interfaces.AppConfig, ipc interfaces.IPCMana
} }
// SignalManager.OnExit(w.Exit) // SignalManager.OnExit(w.Exit)
// Set colour // Set colour
err := w.SetColour(config.GetColour()) color := config.GetColour()
if err != nil { if color != "" {
return err err := w.SetColour(color)
if err != nil {
return err
}
} }
w.log.Info("Initialised") w.log.Info("Initialised")

View File

@ -2337,11 +2337,10 @@ struct webview_priv
size.width = width; size.width = width;
size.height = height; size.height = height;
[w->priv.window setMaxSize:size]; [w->priv.window setMaxSize:size];
[w->priv.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary|NSWindowCollectionBehaviorFullScreenNone|NSWindowCollectionBehaviorFullScreenDisallowsTiling];
NSButton *button = [w->priv.window standardWindowButton:NSWindowZoomButton]; NSButton *button = [w->priv.window standardWindowButton:NSWindowZoomButton];
[button setEnabled: NO]; [button performSelectorOnMainThread:@selector(setEnabled:) withObject:NO
waitUntilDone:NO];
} }
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen) WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
/* /*
_ __ _ __ _ __ _ __
| | / /___ _(_) /____ | | / /___ _(_) /____
| | /| / / __ `/ / / ___/ | | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__ ) | |/ |/ / /_/ / / (__ )
|__/|__/\__,_/_/_/____/ |__/|__/\__,_/_/_/____/
The lightweight framework for web-like apps The lightweight framework for web-like apps
(c) Lea Anthony 2019-present (c) Lea Anthony 2019-present
*/ */
@ -21,6 +21,20 @@ import * as Store from './store';
window.wails = window.wails || {}; window.wails = window.wails || {};
window.backend = {}; window.backend = {};
// On webkit2gtk >= 2.32, the external object is not passed to the window context.
// However, IE will throw a strict mode error if window.external is assigned to
// so we need to make sure that line of code isn't reached in IE
// Using !window.external transpiles to `window.external = window.external || ...`
// so we have to use an explicit if statement to prevent webpack from optimizing the code.
if (window.external == undefined) {
window.external = {
invoke: function(x) {
window.webkit.messageHandlers.external.postMessage(x);
}
};
}
// Setup internal calls // Setup internal calls
var internal = { var internal = {
NewBinding, NewBinding,
@ -61,7 +75,7 @@ window.onerror = function (msg, url, lineNo, columnNo, error) {
}; };
// Use firebug? // Use firebug?
if( window.usefirebug ) { if( window.usefirebug ) {
InjectFirebug(); InjectFirebug();
} }
@ -71,4 +85,4 @@ Emit('wails:loaded');
// Nothing to init in production // Nothing to init in production
export function Init(callback) { export function Init(callback) {
callback(); callback();
} }