Compare commits

..

45 Commits

Author SHA1 Message Date
Atterpac 9c4b412aea fix react template css (#3477)
changelog
2024-05-14 06:39:20 +10:00
Atterpac 71b2edc0fe [V3-Linux] Upgrade to Webkitgtk4.1 (#3461)
* webkitgtk4.0->webkitgtk4.1

changelog

* Update mkdocs-website/docs/en/changelog.md

* Update deps in pipeline

* Update deps in pipeline

* Install 4.1 only when v3

* Install 4.1 only when v3

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-05-08 18:08:14 +10:00
Lea Anthony 7661cd189f Fix Go version 2024-05-08 08:27:38 +10:00
Mike D Pilsbury 0833a6d6d3 [v3] Correct detection of npm with acceptable version (#3458)
* Correct detection of npm with acceptable version

* Update changelog
2024-05-06 08:29:28 +10:00
Lea Anthony 7d851d8434 Fix disable min/max buttons on windows 2024-05-06 08:26:41 +10:00
Atterpac 2c29e1ca76 update devmode to use types and yaml (#3454)
go mod update
2024-05-05 17:27:53 +10:00
Travis McLane 5a57ee99ac example: environment - change css
text was colored white and therefore invisible.
2024-05-03 12:52:15 -05:00
Travis McLane 735b6b6c87 noop: remove Println for events.Linux.ApplicationStartup 2024-05-02 15:31:49 -05:00
Travis McLane 7ea0601fc6 remove Println
unknown key codes shouldn't print out to stdout
2024-05-02 11:02:21 -05:00
Travis McLane 99537f2816 remove Register/UnregisterWindow functionality
- this is no longer needed
2024-05-02 09:37:23 -05:00
Harry Fox b384bb885b add missing map init from application.init() (#3426)
* add missing map init from `application.init()`

* add changelog entry for #3426

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-05-02 21:57:51 +10:00
abichinger 2255af1c45 [v3] Add port flag to dev command (#3429)
* Add `port` flag to dev command, ...

Add support for environment variable WAILS_VITE_PORT

* Check if port is already in use

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-05-02 21:48:50 +10:00
Fabio Massaioli f55b781d86 [v3] Binding runtime fixes (#3431)
* Unmarshal arguments to appropriate type in binding calls

* Marshal multiple return values to arrays in binding calls

* Improve logging of remote method calls

* Add tests for `BoundMethod.Call`

* Fix return value if error is nil

* Update changelog

---------

Co-authored-by: Andreas Bichinger <andreas.bichinger@gmail.com>
2024-05-02 21:46:07 +10:00
Lea Anthony 38d9a9551f Add -trimpath for production build in project taskfile 2024-04-29 17:58:48 +10:00
Lea Anthony c38cee0a4a More optimised production build in project taskfile 2024-04-29 17:40:46 +10:00
Lea Anthony 0f9c7b1bbf Fix nanoid dep for npm package 2024-04-28 19:43:37 +10:00
Lea Anthony 32ddbd8e05 set target branch to v3-alpha 2024-04-28 17:13:59 +10:00
Lea Anthony 67c493f1a8 Fix example building 2024-04-27 17:43:58 +10:00
Lea Anthony 69c513e33d Fix pipeline tests 2024-04-27 17:38:10 +10:00
Lea Anthony 82b910dd6d Fix pipeline tests 2024-04-27 17:16:21 +10:00
Lea Anthony 5d0a58cc6a Update GetRelative/AbsolutePosition to take border size into account 2024-04-25 15:59:33 +10:00
Lea Anthony 368ca13314 Update window interface 2024-04-25 15:26:31 +10:00
Lea Anthony 2cee1edcb5 Add window.GetBorderSizes 2024-04-25 15:22:01 +10:00
Travis McLane 1b288a0a1a removing experimental server plugin 2024-04-23 09:32:21 -05:00
Harry Fox 81aba310d0 update Taskfile.tmpl.yml to include darwin run task (#3417)
* update Taskfile.tmpl.yml to include darwin run task

* add changelog line for #3417
2024-04-23 18:19:25 +10:00
Atterpac b050a07362 dev mode adapt to OS (#3412)
changelog
2024-04-22 12:44:10 +10:00
Travis McLane 021efab84d allow for non-Window WailsEvent listeners (#3406)
* allow for non-Window WailsEvent listeners

- adds a RegisterListener function on the App struct such
  that code can listen for WailsEvent(s) even if it isn't a Window
- rename dispatchEventToWindows -> dispatchEventToListeners
- add all windows and WailsEventListeners to slice before emitting

* Update v3/pkg/application/application.go

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-04-20 09:39:57 +10:00
Atterpac 0a42a050bd fix dev mode windows pipe (#3402) 2024-04-18 23:14:20 +10:00
abichinger 9ca1b30da1 [v3 alpha] Fix drag-n-drop on some linux distros (#3346)
* Fix drag and drop on linux

- Move C code

* Use GTK_DEST_DEFAULT_DROP

* Update changelog

* Move C code back into `linux_cgo.go`
2024-04-15 10:05:23 -05:00
Atterpac 220d5535f7 revert dialog channel close (#3395)
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-04-15 18:03:35 +10:00
Atterpac 0895e6a508 refresh version up (#3391) 2024-04-15 16:57:19 +10:00
Lea Anthony ed5532a535 Update plugin docs 2024-04-14 21:47:37 +10:00
Lea Anthony 6f41dbf954 Merge branch 'refs/heads/v3-alpha-feature/plugin-updates' into v3-alpha 2024-04-14 21:42:16 +10:00
Lea Anthony c7ed7e72d4 Major plugin updates 2024-04-14 21:41:33 +10:00
abichinger a7208f5262 Update changelog (#3389) 2024-04-11 23:50:04 +10:00
Travis McLane 09f6680aa9 restore: run tests only after approval 2024-04-10 09:11:36 -05:00
Travis McLane 9261130fed chore: workflow update to run tests on correct directory 2024-04-09 16:57:04 -05:00
Travis McLane fec22e0052 chore: bump staticanalysis to v2.8.0 2024-04-09 16:37:50 -05:00
abichinger 7c921d6a81 [v3 alpha] implement setIcon on linux (#3354)
* implement `linuxApp.setIcon`

* Move code into `linux_cgo.go`
2024-04-09 11:04:54 -05:00
Travis McLane 16a029754f disable 'server' example
Doesn't compile currently.
Disabling such that the workflow succeeds
2024-04-08 13:29:42 -05:00
Travis McLane 3c9fd67fd0 doctor: correct compilation errors 2024-04-08 13:23:12 -05:00
Travis McLane 724ca386e7 Merge remote-tracking branch 'origin/v3-alpha-linux-dialogs' into v3-alpha 2024-04-08 11:17:56 -05:00
atterpac 6f75b00463 Proper syncing and canceling of dialogs
s

s

s
2024-04-08 11:17:05 -05:00
Travis McLane 105d9f0d3a allow directory selection 2024-04-07 16:42:33 -05:00
atterpac 38f6b1297d Call linux dialog on main thread 2024-04-07 16:42:33 -05:00
177 changed files with 2997 additions and 3596 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ jobs:
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev javascriptcoregtk-4.1-dev build-essential pkg-config
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev javascriptcoregtk-4.1-dev build-essential pkg-config
- name: Setup Go
uses: actions/setup-go@v3
@@ -122,7 +122,7 @@ jobs:
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev javascriptcoregtk-4.1-dev build-essential pkg-config
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev javascriptcoregtk-4.1-dev build-essential pkg-config
- name: Build Wails3 CLI
run: |
+25 -7
View File
@@ -62,8 +62,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Install linux dependencies
if: matrix.os == 'ubuntu-latest'
- name: Install linux dependencies (v3)
if: ${{ matrix.os == 'ubuntu-latest' && github.event.pull_request.base.ref == 'v3-alpha' }}
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config
- name: Install linux dependencies (v2)
if: ${{ matrix.os == 'ubuntu-latest' && github.event.pull_request.base.ref == 'master' }}
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- name: Setup Go
@@ -71,14 +75,28 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- name: Run tests (mac)
if: matrix.os == 'macos-latest'
- name: Run tests (mac) | v2
if: ${{ matrix.os == 'macos-latest' && github.event.pull_request.base.ref == 'master' }}
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
CGO_CFLAGS: -mmacosx-version-min=10.13
working-directory: ./v2
run: go test -v ./...
- name: Run tests (!mac)
if: matrix.os != 'macos-latest'
working-directory: ./v2
- name: Run tests (!mac) | v2
if: ${{ matrix.os != 'macos-latest' && github.event.pull_request.base.ref == 'master' }}
working-directory: ./v2
run: go test -v ./...
- name: Run tests (mac) | v3
if: ${{ matrix.os == 'macos-latest' && github.event.pull_request.base.ref == 'v3-alpha' }}
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
CGO_CFLAGS: -mmacosx-version-min=10.13
working-directory: ./v3
run: go test -v ./...
- name: Run tests (!mac) | v3
if: ${{ matrix.os != 'macos-latest' && github.event.pull_request.base.ref == 'v3-alpha' }}
working-directory: ./v3
run: go test -v ./...
+20
View File
@@ -0,0 +1,20 @@
on:
push:
branches: ['v3-alpha']
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
- run: npm ci
working-directory: v3/internal/runtime/desktop/@wailsio/runtime
- uses: JS-DevTools/npm-publish@v3
with:
package: v3/internal/runtime/desktop/@wailsio/runtime
access: public
token: ${{ secrets.NPM_TOKEN }}
+11
View File
@@ -31,9 +31,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support multiple space-separated trigger events in the WML system by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
- Add ESM exports from the bundled JS runtime script by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
- Add binding generator flag for using the bundled JS runtime script instead of the npm package by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334)
- Implement `setIcon` on linux by [@abichinger](https://github.com/abichinger) in [#3354](https://github.com/wailsapp/wails/pull/3354)
- Add flag `-port` to dev command and support environment variable `WAILS_VITE_PORT` by [@abichinger](https://github.com/abichinger) in [#3429](https://github.com/wailsapp/wails/pull/3429)
- Add tests for bound method calls by [@abichinger](https://github.com/abichinger) in [#3431](https://github.com/wailsapp/wails/pull/3431)
### Fixed
- Fixed react template css to show footer by [atterpac](https://github.com/atterpac) in [#3477](https://github.com/wailsapp/wails/pull/3477)
- Fixed zombie processes when working in devmode by updating to latest refresh by [Atterpac](https://github.com/atterpac) in [#3320](https://github.com/wailsapp/wails/pull/3320).
- Fixed appimage webkit file sourcing by [Atterpac](https://github.com/atterpac) in [#3306](https://github.com/wailsapp/wails/pull/3306).
- Fixed Doctor apt package verify by [Atterpac](https://github.com/Atterpac) in [#2972](https://github.com/wailsapp/wails/pull/2972).
@@ -56,9 +60,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix custom context menu closing immediately on linux by [@abichinger](https://github.com/abichinger) in [#3330](https://github.com/wailsapp/wails/pull/3330)
- Fix the output path and extension of model files produced by the binding generator by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334)
- Fix the import paths of model files in JS code produced by the binding generator by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334)
- Fix drag-n-drop on some linux distros by [@abichinger](https://github.com/abichinger) in [#3346](https://github.com/wailsapp/wails/pull/3346)
- Fix missing task for macOS when using `wails3 task dev` by [@hfoxy](https://github.com/hfoxy) in [#3417](https://github.com/wailsapp/wails/pull/3417)
- Fix registering events causing a nil map assignment by [@hfoxy](https://github.com/hfoxy) in [#3426](https://github.com/wailsapp/wails/pull/3426)
- Fix unmarshaling of bound method parameters by [@fbbdev](https://github.com/fbbdev) in [#3431](https://github.com/wailsapp/wails/pull/3431)
- Fix handling of multiple return values from bound methods by [@fbbdev](https://github.com/fbbdev) in [#3431](https://github.com/wailsapp/wails/pull/3431)
- Fix doctor detection of npm that is not installed with system package manager by [@pekim](https://github.com/pekim) in [#3458](https://github.com/wailsapp/wails/pull/3458)
### Changed
- Update linux webkit dependency to webkit2gtk-4.1 over webkitgtk2-4.0 to support Ubuntu 24.04 LTS by [atterpac](https://github.com/atterpac) in [#3461](https://github.com/wailsapp/wails/pull/3461)
- The bundled JS runtime script is now an ESM module: script tags importing it must have the `type="module"` attribute. By [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
- The `@wailsio/runtime` package does not publish its API on the `window.wails` object, and does not start the WML system. This has been done to improve encapsulation. The WML system can be started manually if desired by calling the new `WML.Enable` method. The bundled JS runtime script still performs both operations automatically. By [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295)
- The Window API module `@wailsio/runtime/src/window` now exposes the containing window object as a default export. It is not possible anymore to import individual methods through ESM named or namespace import syntax.
+112 -1
View File
@@ -44,7 +44,118 @@ The `README.md` file provides documentation for the plugin. This should include
## Example
Here's an example of how to use a plugin in your Wails application:
Here's the Log plugin implementation:
```go
package log
import (
"embed"
_ "embed"
"github.com/wailsapp/wails/v3/pkg/application"
"io/fs"
"log/slog"
)
//go:embed assets/*
var assets embed.FS
// ---------------- Plugin Setup ----------------
// This is the main plugin struct. It can be named anything you like.
// It must implement the application.Plugin interface.
// Both the Init() and Shutdown() methods are called synchronously when the app starts and stops.
type Config struct {
// Logger is the logger to use. If not set, a default logger will be used.
Logger *slog.Logger
// LogLevel defines the log level of the logger.
LogLevel slog.Level
// Handles errors that occur when writing to the log
ErrorHandler func(err error)
}
type Plugin struct {
config *Config
app *application.App
level slog.LevelVar
}
func NewPluginWithConfig(config *Config) *Plugin {
if config.Logger == nil {
config.Logger = application.DefaultLogger(config.LogLevel)
}
result := &Plugin{
config: config,
}
result.level.Set(config.LogLevel)
return result
}
func NewPlugin() *Plugin {
return NewPluginWithConfig(&Config{})
}
// Shutdown is called when the app is shutting down
// You can use this to clean up any resources you have allocated
func (p *Plugin) Shutdown() error { return nil }
// Name returns the name of the plugin.
// You should use the go module format e.g. github.com/myuser/myplugin
func (p *Plugin) Name() string {
return "github.com/wailsapp/wails/v3/plugins/log"
}
func (p *Plugin) Init(api application.PluginAPI) error {
return nil
}
// CallableByJS returns a list of methods that can be called from the frontend
func (p *Plugin) CallableByJS() []string {
return []string{
"Debug",
"Info",
"Warning",
"Error",
"SetLogLevel",
}
}
func (p *Plugin) Assets() fs.FS {
return assets
}
// ---------------- Plugin Methods ----------------
// Plugin methods are just normal Go methods. You can add as many as you like.
// The only requirement is that they are exported (start with a capital letter).
// You can also return any type that is JSON serializable.
// See https://golang.org/pkg/encoding/json/#Marshal for more information.
func (p *Plugin) Debug(message string, args ...any) {
p.config.Logger.Debug(message, args...)
}
func (p *Plugin) Info(message string, args ...any) {
p.config.Logger.Info(message, args...)
}
func (p *Plugin) Warning(message string, args ...any) {
p.config.Logger.Warn(message, args...)
}
func (p *Plugin) Error(message string, args ...any) {
p.config.Logger.Error(message, args...)
}
func (p *Plugin) SetLogLevel(level slog.Level) {
p.level.Set(level)
}
```
This plugin can be added to the application like this:
```go
Plugins: map[string]application.Plugin{
@@ -1,8 +1,8 @@
module changeme
go 1.18
go 1.22
require github.com/wailsapp/wails/v2 v2.3.1
require github.com/wailsapp/wails/v2 v2.8.0
require (
github.com/bep/debounce v1.2.1 // indirect
+22 -4
View File
@@ -132,12 +132,28 @@ tasks:
- task: format
# - task: docs:update:api
test:example:
test:example:darwin:
dir: 'examples/{{.DIR}}'
platforms:
- darwin
cmds:
- echo "Building example {{.DIR}}"
- go mod tidy
- go build -o "testbuild-{{.DIR}}{{exeExt}}"
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
CGO_CFLAGS: -mmacosx-version-min=10.13
test:example:notdarwin:
dir: 'examples/{{.DIR}}'
platforms:
- linux
- windows
cmds:
- echo "Building example {{.DIR}}"
- go mod tidy
- go build -o "testbuild-{{.DIR}}{{exeExt}}"
test:examples:
summary: Builds the examples
@@ -155,10 +171,8 @@ tasks:
hide-window
keybindings
menu
oauth
plain
screen
server
show-macos-toolbar
systray
video
@@ -167,6 +181,10 @@ tasks:
wml
cmds:
- for: { var: EXAMPLEDIRS }
task: test:example
task: test:example:darwin
vars:
DIR: "{{.ITEM}}"
- for: { var: EXAMPLEDIRS }
task: test:example:notdarwin
vars:
DIR: "{{.ITEM}}"
+2 -3
View File
@@ -7,7 +7,8 @@
body {
padding-top: 75px;
margin: 0 auto;
color: white;
background-color: white;
color: black;
text-align: -webkit-center;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif
}
@@ -54,9 +55,7 @@
html += "<tr><td>Debug</td><td>"+ result.Debug +"</td></tr>";
if(result.PlatformInfo) {
for (let key in result.PlatformInfo) {
if (obj.hasOwnProperty(key)) {
html += "<tr><td>"+key+"</td><td>"+ result.PlatformInfo[key] +"</td></tr>";
}
}
}
html += "</table>";
-3
View File
@@ -1,3 +0,0 @@
# OAuth Example
This example is not ready for testing yet.
-41
View File
@@ -1,41 +0,0 @@
<!-- templates/index.html -->
<!doctype html>
<html>
<head>
<title>Google SignIn</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> <!-- load bulma css -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- load fontawesome -->
</head>
<body>
<div id="main" class="container">
<div class="jumbotron text-center text-success" style="padding-top:70px;">
<h1><span class="fa fa-lock"></span> Social Authentication</h1>
<p>Login or Register with:</p>
<a wml-event="github-login" class="btn btn-primary"><span class="fa fa-github" style="color: #FFF"></span> SignIn with Github</a>
</div>
</div>
<div id="details" class="text-center" style="display: none">
<image id="logo" style="width:250px"></image>
<h3 id="name" style="padding-top: 10px"></h3>
<a wml-event="github-logout" class="btn btn-primary"><span class="fa fa-github" style="color: #FFF"></span> Logout </a>
</div>
<script type="module">
import * as wails from "/wails/runtime.js";
wails.Events.On("wails:oauth:success", (event) => {
document.getElementById("main").style.display = "none";
document.getElementById("details").style.display = "block";
document.getElementById("name").innerText = event.data.Name;
document.getElementById("logo").src = event.data.AvatarURL;
document.body.style.backgroundColor = "#000";
document.body.style.color = "#FFF";
});
wails.Events.On("wails:oauth:loggedout", (event) => {
document.getElementById("details").style.display = "none";
document.getElementById("main").style.display = "block";
document.body.style.backgroundColor = "#FFF";
document.body.style.color = "#000";
});
</script>
</body>
</html>
-68
View File
@@ -1,68 +0,0 @@
package main
import (
"embed"
_ "embed"
"log"
"os"
"github.com/markbates/goth"
"github.com/markbates/goth/providers/github"
"github.com/wailsapp/wails/v3/pkg/application"
"github.com/wailsapp/wails/v3/plugins/oauth"
)
//go:embed assets
var assets embed.FS
func main() {
oAuthPlugin := oauth.NewPlugin(oauth.Config{
Providers: []goth.Provider{
github.New(
os.Getenv("clientkey"),
os.Getenv("secret"),
"http://localhost:9876/auth/github/callback",
"email",
"profile"),
},
})
app := application.New(application.Options{
Name: "OAuth Demo",
Description: "A demo of the oauth Plugin",
Mac: application.MacOptions{
ApplicationShouldTerminateAfterLastWindowClosed: true,
},
Assets: application.AssetOptions{
Handler: application.AssetFileServerFS(assets),
},
Plugins: map[string]application.Plugin{
"github.com/wailsapp/wails/v3/plugins/oauth": oAuthPlugin,
},
})
app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
Title: "OAuth Demo",
DevToolsEnabled: true,
OpenInspectorOnStartup: true,
Mac: application.MacWindow{
Backdrop: application.MacBackdropTranslucent,
TitleBar: application.MacTitleBarHiddenInsetUnified,
InvisibleTitleBarHeight: 50,
},
})
app.Events.On("github-login", func(e *application.WailsEvent) {
oAuthPlugin.Github()
})
app.Events.On("github-logout", func(e *application.WailsEvent) {
oAuthPlugin.LogoutGithub()
})
err := app.Run()
if err != nil {
log.Fatal(err.Error())
}
}
-3
View File
@@ -1,3 +0,0 @@
# Server Example
This example is not ready for testing yet.
-41
View File
@@ -1,41 +0,0 @@
version: '3'
tasks:
pre-build:
summary: Pre-build hooks
post-build:
summary: Post-build hooks
build:
summary: Builds the application
cmds:
- task: pre-build
- go build -gcflags=all="-N -l" -o bin/testapp main.go
- task: post-build
env:
GO_CFLAGS: "-mmacosx-version-min=10.13"
GO_LDFLAGS: "-mmacosx-version-min=10.13"
generate-icons:
summary: Generates Windows `.ico` and Mac `.icns` files from an image
cmds:
# Generates both .ico and .icns files
- wails generate icons -input build/appicon.png
build-prod:
summary: Creates a production build of the application
cmds:
- go build -tags production -ldflags="-w -s" -o bin/testapp
package-darwin:
summary: Packages a production build of the application into a `.app` bundle
deps:
- build-prod
- generate-icons
cmds:
- mkdir -p buildtest.app/Contents/{MacOS,Resources}
- cp build/icons.icns buildtest.app/Contents/Resources
- cp bin/testapp buildtest.app/Contents/MacOS
- cp build/Info.plist buildtest.app/Contents
-10
View File
@@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
HELLO!
</body>
</html>
Binary file not shown.
-35
View File
@@ -1,35 +0,0 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleName</key>
<string>My App</string>
<key>CFBundleExecutable</key>
<string>app</string>
<key>CFBundleIdentifier</key>
<string>com.wails.app</string>
<key>CFBundleVersion</key>
<string>v1.0.0</string>
<key>CFBundleGetInfoString</key>
<string>The ultimate thing</string>
<key>CFBundleShortVersionString</key>
<string>v1</string>
<key>CFBundleIconFile</key>
<string>icons</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
<string>(c) Me</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
</dict>
</plist>
</dict>
</plist>
-27
View File
@@ -1,27 +0,0 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleName</key>
<string>My App</string>
<key>CFBundleExecutable</key>
<string>testapp</string>
<key>CFBundleIdentifier</key>
<string>com.wails.app</string>
<key>CFBundleVersion</key>
<string>v1.0.0</string>
<key>CFBundleGetInfoString</key>
<string>The ultimate thing</string>
<key>CFBundleShortVersionString</key>
<string>v1</string>
<key>CFBundleIconFile</key>
<string>icons</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
<string>(c) Me</string>
</dict>
</plist>
View File
View File

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