mirror of
https://github.com/taigrr/wails.git
synced 2026-04-16 19:55:05 -07:00
Compare commits
17 Commits
feature/1.
...
v1.16.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f34fc9c654 | ||
|
|
cd70dc4f16 | ||
|
|
7036a3183e | ||
|
|
3c6182c622 | ||
|
|
87df51feeb | ||
|
|
163c0d9e67 | ||
|
|
80fc072ad7 | ||
|
|
37de2075ba | ||
|
|
1ed2cbe10b | ||
|
|
0c1dbd75f5 | ||
|
|
d77b5b2d57 | ||
|
|
ab825b3f11 | ||
|
|
ff7b6eacaf | ||
|
|
21ed97f7ad | ||
|
|
5746769e4d | ||
|
|
3f0a7cb43d | ||
|
|
a2f16aba9b |
57
README.md
57
README.md
@@ -32,8 +32,9 @@ The official docs can be found at [https://wails.app](https://wails.app).
|
|||||||
|
|
||||||
## Sponsors
|
## Sponsors
|
||||||
|
|
||||||
This project is supported by these kind people:
|
This project is supported by these kind people / companies:
|
||||||
|
|
||||||
|
<a href="https://www.jetbrains.com?from=Wails" style="width:100px"><img src="jetbrains-grayscale.png" width="100"/></a>
|
||||||
<a href="https://pace.dev" style="width:100px"><img src="pace.jpeg" width="100"/></a>
|
<a href="https://pace.dev" style="width:100px"><img src="pace.jpeg" width="100"/></a>
|
||||||
<a href="https://github.com/tc-hib" style="width:50px;border-radius: 50%">
|
<a href="https://github.com/tc-hib" style="width:50px;border-radius: 50%">
|
||||||
<img src="https://github.com/tc-hib.png?size=50" width="50" style="border-radius: 50%"/>
|
<img src="https://github.com/tc-hib.png?size=50" width="50" style="border-radius: 50%"/>
|
||||||
@@ -128,17 +129,59 @@ It is recommended at this stage to read the comprehensive documentation at [http
|
|||||||
|
|
||||||
When I saw WebView, I thought "What I really want is tooling around building a WebView app, a bit like Rails is to Ruby". So initially it was a play on words (Webview on Rails). It just so happened to also be a homophone of the English name for the [Country](https://en.wikipedia.org/wiki/Wales) I am from. So it stuck.
|
When I saw WebView, I thought "What I really want is tooling around building a WebView app, a bit like Rails is to Ruby". So initially it was a play on words (Webview on Rails). It just so happened to also be a homophone of the English name for the [Country](https://en.wikipedia.org/wiki/Wales) I am from. So it stuck.
|
||||||
|
|
||||||
## Shoulders of Giants
|
## Contributors
|
||||||
|
|
||||||
|
<a href="https://github.com/qaisjp"><img src="https://github.com/qaisjp.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/alee792"><img src="https://github.com/alee792.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/lanzafame"><img src="https://github.com/lanzafame.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/mattn"><img src="https://github.com/mattn.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/0xflotus"><img src="https://github.com/0xflotus.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/mdhender"><img src="https://github.com/mdhender.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/fishfishfish2104"><img src="https://github.com/fishfishfish2104.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/intelwalk"><img src="https://github.com/intelwalk.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/ocelotsloth"><img src="https://github.com/ocelotsloth.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/bh90210"><img src="https://github.com/bh90210.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/iceleo-com"><img src="https://github.com/iceleo-com.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/fallendusk"><img src="https://github.com/fallendusk.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/Chronophylos"><img src="https://github.com/Chronophylos.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/Vaelatern"><img src="https://github.com/Vaelatern.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/mewmew"><img src="https://github.com/mewmew.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/kraney"><img src="https://github.com/kraney.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/JackMordaunt"><img src="https://github.com/JackMordaunt.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/MichaelHipp"><img src="https://github.com/MichaelHipp.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/tmclane"><img src="https://github.com/tmclane.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/Rested"><img src="https://github.com/Rested.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/Jarek-SRT"><img src="https://github.com/Jarek-SRT.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/konez2k"><img src="https://github.com/konez2k.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/sayuthisobri"><img src="https://github.com/sayuthisobri.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/dedo1911"><img src="https://github.com/dedo1911.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/fdidron"><img src="https://github.com/fdidron.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/Splode"><img src="https://github.com/Splode.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/Lyimmi"><img src="https://github.com/Lyimmi.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/Unix4ever"><img src="https://github.com/Unix4ever.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/timkippdev"><img src="https://github.com/timkippdev.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/kyoto44"><img src="https://github.com/kyoto44.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/artooro"><img src="https://github.com/artooro.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/ilgityildirim"><img src="https://github.com/ilgityildirim.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/gelleson"><img src="https://github.com/gelleson.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/kmuchmore"><img src="https://github.com/kmuchmore.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/aayush420"><img src="https://github.com/aayush420.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/Rezrazi"><img src="https://github.com/Rezrazi.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/misitebao"><img src="https://github.com/misitebao.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/DrunkenPoney"><img src="https://github.com/DrunkenPoney.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/SophieAu"><img src="https://github.com/SophieAu.png?size=40" width="40"/></a>
|
||||||
|
<a href="https://github.com/alexmat"><img src="https://github.com/alexmat.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/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
|
||||||
|
|
||||||
Without the following people, this project would never have existed:
|
Without the following people, this project would never have existed:
|
||||||
|
|
||||||
* [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - His support and feedback has been immense. More patience than you can throw a stick at (Not long now Dustin!).
|
* [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - His support and feedback has been immense. More patience than you can throw a stick at (Not long now Dustin!).
|
||||||
* [Serge Zaitsev](https://github.com/zserge) - Creator of [Webview](https://github.com/zserge/webview) which Wails uses for the windowing.
|
* [Serge Zaitsev](https://github.com/zserge) - Creator of [Webview](https://github.com/zserge/webview) which Wails uses for the windowing.
|
||||||
|
|
||||||
And without [these people](CONTRIBUTORS.md), it wouldn't be what it is today. A huge thank you to each and every one of you!
|
|
||||||
|
|
||||||
Special Mentions:
|
|
||||||
|
|
||||||
* [Byron](https://github.com/bh90210) - At times, Byron has single handedly kept this project alive. Without his incredible input, we never would have got to v1.
|
* [Byron](https://github.com/bh90210) - At times, Byron has single handedly kept this project alive. Without his incredible input, we never would have got to v1.
|
||||||
|
|
||||||
This project was mainly coded to the following albums:
|
This project was mainly coded to the following albums:
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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":
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
// Version - Wails version
|
// Version - Wails version
|
||||||
const Version = "v1.16.0"
|
const Version = "v1.16.3"
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,15 +115,15 @@ func (b *Manager) generateTypescriptDefinitions() error {
|
|||||||
|
|
||||||
for structname, methodList := range b.structList {
|
for structname, methodList := range b.structList {
|
||||||
structname = strings.SplitN(structname, ".", 2)[1]
|
structname = strings.SplitN(structname, ".", 2)[1]
|
||||||
output.WriteString(fmt.Sprintf("Interface %s {\n", structname))
|
output.WriteString(fmt.Sprintf("interface %s {\n", structname))
|
||||||
for _, method := range methodList {
|
for _, method := range methodList {
|
||||||
output.WriteString(fmt.Sprintf("\t%s: (...args : any[]) => Promise\n", method))
|
output.WriteString(fmt.Sprintf("\t%s(...args : any[]):Promise<any>\n", method))
|
||||||
}
|
}
|
||||||
output.WriteString("}\n")
|
output.WriteString("}\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
output.WriteString("\n")
|
output.WriteString("\n")
|
||||||
output.WriteString("Interface Backend {\n")
|
output.WriteString("interface Backend {\n")
|
||||||
|
|
||||||
for structname := range b.structList {
|
for structname := range b.structList {
|
||||||
structname = strings.SplitN(structname, ".", 2)[1]
|
structname = strings.SplitN(structname, ".", 2)[1]
|
||||||
@@ -136,7 +136,8 @@ declare global {
|
|||||||
interface Window {
|
interface Window {
|
||||||
backend: Backend;
|
backend: Backend;
|
||||||
}
|
}
|
||||||
}`
|
}
|
||||||
|
export {};`
|
||||||
output.WriteString(globals)
|
output.WriteString(globals)
|
||||||
|
|
||||||
b.log.Info("Written Typescript file: " + typescriptDefinitionFilename)
|
b.log.Info("Written Typescript file: " + typescriptDefinitionFilename)
|
||||||
|
|||||||
@@ -113,11 +113,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")
|
||||||
|
|||||||
@@ -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
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user