mirror of
https://github.com/taigrr/wails.git
synced 2026-04-04 22:22:41 -07:00
Compare commits
5 Commits
v2.0.0-alp
...
v2.0.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f77729fc0b | ||
|
|
2a8ce96830 | ||
|
|
9be539cfb8 | ||
|
|
e44f2fe06d | ||
|
|
ad65d55abd |
@@ -19,7 +19,6 @@ func fatal(message string) {
|
||||
func main() {
|
||||
|
||||
var err error
|
||||
version := "v2.0.0-alpha"
|
||||
|
||||
app := clir.NewCli("Wails", "Go/HTML Application Framework", version)
|
||||
|
||||
|
||||
3
v2/cmd/wails/version.go
Normal file
3
v2/cmd/wails/version.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package main
|
||||
|
||||
var version = "v2.0.0-alpha.6"
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/wailsapp/wails/v2
|
||||
|
||||
go 1.13
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
|
||||
@@ -8,6 +8,7 @@ package app
|
||||
// will be unknown and the application will not work as expected.
|
||||
|
||||
import (
|
||||
"github.com/wailsapp/wails/v2/internal/logger"
|
||||
"os"
|
||||
|
||||
"github.com/wailsapp/wails/v2/pkg/options"
|
||||
@@ -22,6 +23,8 @@ type App struct {
|
||||
|
||||
// Indicates if the app is running in debug mode
|
||||
debug bool
|
||||
|
||||
logger *logger.Logger
|
||||
}
|
||||
|
||||
// CreateApp returns a null application
|
||||
|
||||
5
v2/internal/ffenestri/runtime_darwin.c
Normal file
5
v2/internal/ffenestri/runtime_darwin.c
Normal file
File diff suppressed because one or more lines are too long
1
v2/internal/runtime/assets/desktop.js
Normal file
1
v2/internal/runtime/assets/desktop.js
Normal file
File diff suppressed because one or more lines are too long
8
v2/internal/runtime/system_default.go
Normal file
8
v2/internal/runtime/system_default.go
Normal file
@@ -0,0 +1,8 @@
|
||||
// +build !desktop,!server
|
||||
|
||||
package runtime
|
||||
|
||||
// AppType returns the application type, EG: desktop
|
||||
func (r *system) AppType() string {
|
||||
return "default"
|
||||
}
|
||||
@@ -148,6 +148,13 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
||||
// Default go build command
|
||||
commands := slicer.String([]string{"build"})
|
||||
|
||||
// TODO: Work out if we can make this more efficient
|
||||
// We need to do a full build as CGO doesn't detect updates
|
||||
// to .h files, and we package assets into .h file. We could
|
||||
// potentially try and see if the assets have changed but will
|
||||
// this take as much time as a `-a` build?
|
||||
commands.Add("-a")
|
||||
|
||||
var tags slicer.StringSlicer
|
||||
tags.Add(options.OutputType)
|
||||
|
||||
|
||||
@@ -47,12 +47,6 @@ func (d *DesktopBuilder) BuildAssets(options *Options) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Build static assets
|
||||
err = d.buildCustomAssets(d.projectData)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ The structure is:
|
||||
|
||||
* dialog - Icons for dialogs
|
||||
* tray - Icons for the system tray
|
||||
* custom - A place for assets you wish to bundle in the application
|
||||
* mac - MacOS specific files
|
||||
* linux - Linux specific files
|
||||
* windows - Windows specific files
|
||||
@@ -48,16 +47,6 @@ Example:
|
||||
|
||||
* `mypic.png` - May be referenced using `runtime.Tray.SetIcon("mypic")`
|
||||
|
||||
## Custom
|
||||
|
||||
Any file in this directory will be embedded into the app using the Wails asset bundler.
|
||||
Assets can be retrieved using the following methods:
|
||||
|
||||
* `wails.Assets().Read(filename string) ([]byte, error)`
|
||||
* `wails.Assets().String(filename string) (string, error)`
|
||||
|
||||
The filename should include the path to the file relative to the `custom` directory.
|
||||
|
||||
## Mac
|
||||
|
||||
The `mac` directory holds files specific to Mac builds, such as `info.plist`. These may be edited and used as part of the build.
|
||||
|
||||
Reference in New Issue
Block a user