Giter Site home page Giter Site logo

wailsapp / wails Goto Github PK

View Code? Open in Web Editor NEW
22.2K 137.0 1.1K 112.13 MB

Create beautiful applications using Go

Home Page: https://wails.io

License: MIT License

Go 71.27% JavaScript 6.19% HTML 11.93% Vue 0.41% CSS 1.55% Shell 0.07% TypeScript 0.78% Objective-C 4.44% Svelte 0.63% C 1.42% NSIS 1.30%
go golang vuejs desktop-application macos windows linux angular react svelte

wails's Introduction


Build desktop applications using Go & Web Technologies.

GitHub Go Reference CodeFactor Awesome Discord
Build GitHub tag (latest SemVer pre-release)

Table of Contents

Introduction

The traditional method of providing web interfaces to Go programs is via a built-in web server. Wails offers a different approach: it provides the ability to wrap both Go code and a web frontend into a single binary. Tools are provided to make this easy for you by handling project creation, compilation and bundling. All you have to do is get creative!

Features

  • Use standard Go for the backend
  • Use any frontend technology you are already familiar with to build your UI
  • Quickly create rich frontends for your Go programs using pre-built templates
  • Easily call Go methods from Javascript
  • Auto-generated Typescript definitions for your Go structs and methods
  • Native Dialogs & Menus
  • Native Dark / Light mode support
  • Supports modern translucency and "frosted window" effects
  • Unified eventing system between Go and Javascript
  • Powerful cli tool to quickly generate and build your projects
  • Multiplatform
  • Uses native rendering engines - no embedded browser!

Roadmap

The project roadmap may be found here. Please consult this before open up an enhancement request.

Getting Started

The installation instructions are on the official website.

Sponsors

This project is supported by these kind people / companies:

FAQ

  • Is this an alternative to Electron?

    Depends on your requirements. It's designed to make it easy for Go programmers to make lightweight desktop applications or add a frontend to their existing applications. Wails does offer native elements such as menus and dialogs, so it could be considered a lightweight electron alternative.

  • Who is this project aimed at?

    Go programmers who want to bundle an HTML/JS/CSS frontend with their applications, without resorting to creating a server and opening a browser to view it.

  • What's with the name?

    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 I am from. So it stuck.

Stargazers over time

Star History Chart

Contributors

The contributors list is getting too big for the readme! All the amazing people who have contributed to this project have their own page here.

License

FOSSA Status

Inspiration

This project was mainly coded to the following albums:

wails's People

Contributors

akhudek avatar almas1992 avatar apshenkin avatar atenderholt avatar chronophylos avatar codydbentley avatar dedo1911 avatar dependabot[bot] avatar gelleson avatar github-actions[bot] avatar haukened avatar ianmjones avatar k-muchmore avatar konez2k avatar leaanthony avatar lgiki avatar lyimmi avatar marcus-crane avatar marktohark avatar misitebao avatar mmghv avatar napalu avatar oleggulevskyy avatar pylotlight avatar raguay avatar rh12503 avatar snider avatar stffabi avatar timkippdev avatar tmclane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wails's Issues

It is possible to develop wails on Linux?

Description

I tried to use wails on linux and init command generates files but I cannot figure out how to run it. I only found issue #2, but this does not clarify if I can use this on Linux.

To Reproduce
Steps to reproduce the behaviour:

  1. wails init
  2. wails serve

Expected behaviour
Default generated code should be working.

Command Line

$ wails serve
Wails v0.11.9 - Serving Application

✓ Ensuring Dependencies are up to date...
✓ Packing + Compiling project...
Awesome! Project 'HelloWails' built!
Serving Application: /media/dawid/Workspace/GoLandProjects/go/src/hello-wails/hello-wails
Error: fork/exec /media/dawid/Workspace/GoLandProjects/go/src/hello-wails/hello-wails: exec format error

System Details

Name Value
Wails Version v0.11.9
Go Version go1.10.4
Platform linux
Arch amd64
GO111MODULE (Not Set)

Deprecate backend injection of JS/CSS

In the early days of Wails, injection of css and js from the backend was supported to allow very simple apps. The push is now to move all frontend code to the frontend project so these features should be deprecated. Dynamic injection of JS/CSS can be added to the runtime if there is demand.

Suggestion: `wails init` shouild also default the directory name to match project name

When creating a new project with wails init, I like how you allow the binary to default to the same name as the project. I noticed that the folder demands input. I suggest the same behaviour for that field.

Current Behavior

  wails init
 _       __      _ __    
| |     / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__  )  v0.9.1
|__/|__/\__,_/_/_/____/   https://wails.app
The lightweight framework for web-like apps

Initialising project
--------------------

The name of the project (My Project): wails-test
Project Name: wails-test
The output binary name (wails-test): 
Output binary Name: wails-test
Project directory name: 

Suggested Behavior

  wails init
 _       __      _ __    
| |     / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__  )  v0.9.1
|__/|__/\__,_/_/_/____/   https://wails.app
The lightweight framework for web-like apps

Initialising project
--------------------

The name of the project (My Project): wails-test
Project Name: wails-test
The output binary name (wails-test): 
Output binary Name: wails-test
Project directory name (wails-test): 

Note the added (wails-test) in the line Project directory name (wails-test):

If there is a technical reason to not do this, feel free to close it off.

wails init unable to check libraries on distribution 'ManjaroLinux'

Description

'wails init' exists with error "Error: unable to check libraries on distribution 'ManjaroLinux'. Please ensure that the 'libgtk-3-dev' equivalent is installed" and does not allow me to continue.

To Reproduce
Steps to reproduce the behaviour:

  1. Install Manjaro Linux
  2. Run in terminal: "sudo pacman -S go webkit2gtk gtk3"
  3. Run in terminal: "export PATH=$PATH:/home/user/go/bin"
  4. Run in terminal: "go get github.com/wailsapp/wails/cmd/wails"
  5. Run in terminal: "wails install"
  6. Run in terminal: "wails init"

Expected behaviour
Wails should create a new project

System Details

Name Value
Wails Version v0.13.3
Go Version go1.12.4
Platform linux
Arch amd64
GO111MODULE (Not Set)

Beta Testing

Hi all!
During the Beta phase it may be necessary to test branch releases and I haven't figured a good way of doing that via go get so the steps to do this manually are:

  1. git clone [email protected]:wailsapp/wails.git
  2. git checkout <branch>
  3. cd cmd/wails
  4. go install

If there's demand, I can build in a wails betatest <branch> command to auto do this but that will take away time from bug fixes and features. Let me know your thoughts!

Build require go 1.12 despite docs said 1.11 should work

Description
Docs say "Go 1.12 or above, however Go 1.11 should work." but maybe it's not the case anymore.

To Reproduce
Steps to reproduce the behaviour:

git clone [email protected]:wailsapp/wails.git
cd wails
export GO111MODULE=on
go get github.com/wailsapp/wails/cmd/wails
...
...
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/leaanthony/mewn v0.10.4
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: downloading github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
go: downloading github.com/pkg/errors v0.8.1
go: downloading github.com/mattn/go-isatty v0.0.6
go: downloading github.com/leaanthony/synx v0.1.0
go: downloading github.com/mattn/go-colorable v0.1.1
go build github.com/leaanthony/mewn/lib: module requires Go 1.12

Expected behaviour
Build finished without error.

System Details

go version
go version go1.11.1 darwin/amd64
sw_vers
ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G22010

Wails symlink not working on Linux

Description
When attempting to run wails setup or wails init no sym links were created

To Reproduce
Steps to reproduce the behavior:

  1. Follow installation instructions for ubuntu 18.04
  2. Type wails setup and receive the following error:
    dw@walkarcpop:~$ wails setup

Command 'wails' not found, did you mean:

command 'rails' from deb ruby-railties (2:5.2.2+dfsg-6ubuntu1)

Try: sudo apt install

  1. I can run go run go/src/github.com/wailsapp/wails/cmd/wails/main.go and recieve the following prompt but I am unable to initiate setup or init. I have tried adding flags to the end of the command but does not affect behavior

| | / /___ () /____
| | /| / / __ `/ / / /
| |/ |/ / /
/ / / (
) v0.12.3
|/|/_,///____/ https://wails.app
The lightweight framework for web-like apps

Flags:

-help
Get help on the 'wails' command.

Expected behaviour
wails setup and wails init behaving like the windows one does after following the instructions

System Details
OS: Ubuntu 18.04(also tested popos 18.04 and 19.04)
go version go1.11.5 linux/amd64

Add flag to disable elastic scroll on Mac?

Versions prior to the beta release has scrolling disabled by default to prevent elastic scroll but it was a fairly heavy-handed approach to stop it as it disabled all scrolling. Would anyone be interested in this as a config option or should this be dealt with in css only?

black screen on custom template build

Description
Following the developers document I created a custom template for React.
I managed to serve both back- and front-end. I also can build the app.
But when I run the binary instead of react's default screen (the one I am seeing when serve-ing, see screenshot) I get a black window.

To Reproduce
Steps to reproduce the behaviour:

  1. download the template https://github.com/bh90210/wails-create-react-app
  2. place it in wails templates directory
  3. initialise a new app wails init
  4. build it wails build

Expected behaviour
Render the frontend

Screenshots
test2

System Details

Name Value
Wails Version v0.15.0
Go Version go1.12.3
Platform linux
Arch amd64
GO111MODULE (Not Set)

Support Beta Stream Releases

Currently wails update pulls the latest release regardless of what it is. We need a way to be more flexible with this, supporting the following modes:

  • Update to latest stable
  • Update to latest preview
  • Update to specific version

Add Arduino compatibility

Wails seems to be the best solution available for makers to add specific functionality and a user interface to their creation.

Arduino compatibility concretely means adding a mechanism to interact with serial ports directly from the frontend, probably enabled through a project configuration option.

A standard in this area means makers probably only need to program the frontend, just as they do now with native dialogs.

In the same vain the ability to use files in the executable folder, directly from the frontend, would be desirable.

With these features most projects, as they are simple, could be done without any Go programming. But when more is needed the capability to do so is there.

Massively Simplify Framework

A lot of effort has been spent adding a "basic" mode to Wails, which has had a number of side effects:

  • Multiple ways of doing roughly the same thing, leading to increased cognitive load
  • Multiple edge cases leading to slower development
  • Basic tutorials are out of context: They would never be used that way in a full app

To get v1 out the door, we need to simplify it and concentrate on practical, real world scenarios. To begin with, this means stripping it back to just a vue project, with the intention of adding support for other ui frameworks in the future.

Side effects:

  • Removal for support for "basic components"
  • Removal of JQuery as a dependency
  • Removal of Basic & Custom templates
  • Removal of Headless mode - support only Bridge mode
  • Creation of a more basic vue template
  • Update tutorials, docs and examples

`wails build` Stuck at "Ensuring Dependencies are up to date..."

Description

Like the title says. wails build stuck at that stage. And this is for the freshly initialized wails, generated from wails init.

To Reproduce
Steps to reproduce the behaviour:

  1. wails init
  2. cd myprojectname
  3. wails build
  4. See error

Expected behaviour
Build success.

System Details

Name Value
Wails Version v0.13.3
Go Version go1.12.5
Platform darwin
Arch amd64
GO111MODULE (Not Set)

Local package.json exists, but node_modules missing

Description
I am following the guide found here from Wails' documentation. After running wails init -without first running wails build since it is not noted as mandatory- I cd in frontend directory and try npm run serve. I get thrown a warning Local package.json exists, but node_modules missing, did you mean to install? (see below). Running npm install "fixes" the problem.

To Reproduce
Steps to reproduce the behaviour:

  1. wails init
  2. cd projectname
  3. cd frontend
  4. npm run serve
  5. error thrown
sh: 1: vue-cli-service: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! testwails@ serve: `vue-cli-service serve`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the testwails@ serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

Expected behaviour
Serve the frontend

Screenshots
error

System Details
Wails v0.14.4-pre
Ubuntu 18.04
go1.12.3
npm 6.9.0

KDE (Plasma) installation?

Hello, I'm using Kubuntu 19.04, which comes with KDE Plasma 5, and was wondering how Wails can be installed there. I absolutely refuse to install GTK libraries! 😄 So, is there an installation path I can explore or should I just give up?

Support for other frontend frameworks

Hi!

I'd like to discuss the possibility of Wails also working with other frameworks:

  • React
  • Svelte

I am currently integrating with Svelte and making sure everything works; I wonder if this would actually be useful for everyone else.

Angular support

is there any underway support for Angular?

If there is no one working on it, I can do it. I am still hot from React, I believe this implementation will be much faster.

Allow people to submit unsupported platform requests

Currently, when wails doesn't know the distribution, it throws an error. What would be better would be to find the distribution ID using the lsb/os-release code and ask the user if they'd like to submit a support request. This would save us a lot of time finding out what the distribution ID was.

It will work in the same way wails issue does.

Support Distribution 'Debian'

Description
Distribution 'Debian' is curently unsupported.

Further Information

Name Value
Wails Version v0.16.1-pre
Go Version go1.12.6
Platform linux
Arch amd64
GO111MODULE on
Distribution ID Debian
Distribution Version 9.9
Discovered by lsb

Hi,

I'm here. I'm not sure this is your expected or not.
And I also got a warning, if you have time to look at it
Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank"

Thank you for your work.

Road to V1

The road to v1 requires:

  • Windows testing (not necessarily to fix at this point - support may have to be delayed)
    • Remove console window for binaries
    • Potentially add icon to binary
  • Tutorial covering the main concepts
    • IPC
    • Events
    • Dialogs

Development tooling - cannot find package "gopkg.in/AlecAivazis/survey.v1"

Description
I am following the development document's tooling section.
When running go install --tags=dev I'm getting this error

10.1_dev_newtemplate.go:10:2: cannot find package "gopkg.in/AlecAivazis/survey.v1" in any of:
	/usr/local/go/src/gopkg.in/AlecAivazis/survey.v1 (from $GOROOT)
	/home/byron/go/src/gopkg.in/AlecAivazis/survey.v1 (from $GOPATH)

To Reproduce
Steps to reproduce the behaviour:

  1. rm $GOPATH/bin/wails && rm -R $GOPATH/src/github.com/wailsapp
  2. go get github.com/wailsapp/wails/cmd/wails
  3. cd $GOPATH/src/github.com/wailsapp/cmd/wails
  4. go install --tags=dev
  5. See error

Expected behaviour
Generate new project template

System Details
Ubuntu 18.04, go1.12.3

Additional context
runing go get gopkg.in/AlecAivazis/survey.v1 solved the issue and I was able to generate a new template.

Default Prompts not populating

Description

Currently when running either wails setup or wails init, the default values will not be accepted until you type them in.

To Reproduce
Steps to reproduce the behaviour:

  1. Open a terminal
  2. run wails init or wails setup
  3. Attempt to accept the default value that is shown in the brackets.
  4. It will repeat the terminal prompt until either you exit or type in the desired value.

Expected behaviour
When I press enter, the value displayed in the brackets in the prompt should be used.

Screenshots

wails-setup-issue

System Details

Name Value
Wails Version v0.9.7
Go Version go1.12
Platform linux
Arch amd64
GO111MODULE (Not Set)

Poll: Examples

Hi all! I'm thinking of setting up a seperate repo for examples (as it would be quite big). Do you think this would be useful? If so, do you think it should be a 'Kitchen Sink' example with everything, or a list of individual examples aka 'recipes'?

👍= Kitchen Sink!
🚀= Recipes!

wails documentation proposals

A I am going through https://wails.app/reference/guide.html
and I find myself constantly scrolling up and down to understand where I am at.

It would be really helpful if the template changed a bit to introduce a right sidebar showing you where you at. This screen taken from android documentation as an example:
android_doc_example
wails_doc_example

B Installation instructions (and maybe helloWorld?) should be part of the quickstart to follow the convention of most quickstart pages?
for example https://grpc.io/docs/quickstart/go/

C at the moment the guide explains wails around a vue project. maybe somehow generalise? (or include the rest of the default supported frontend frameworks? although this sounds like overkill it only needs to be done once and for people coming from vue, react etc will actually be really helpful, for the rest I am not so sure, so generalisation I believe is more apt.)

D maybe https://wails.app/reference/guide.html would be better if it brakes down to two different parts

  1. the guide as as is to explain template's anatomy and basic concepts and
  2. from https://wails.app/reference/guide.html#binding onwards maybe should be under its own sub (ie. API)?

E (bug) there is a navigation issue. from the https://wails.app/reference/ page when I click https://wails.app/reference/#guide instead of going to the guide as I would expect I am still on the same page at #guide tag. Then I have to click again to reach the actually guide, but also the left side menu collapses once I reach the page.

Wails Linux setup missing NPM

Description
If you do not have npm installed, wails init displays the apt command to install. While this behavior is perfectly acceptable, I would add the requirement into the Linux setup instructions.

To Reproduce
Steps to reproduce the behaviour:

  1. Install wails as per docs.
  2. Do not have npm installed.
  3. run wails init (or another wails command that uses npm under the hood).
  4. See error

Expected behaviour
Would add to the setup instructions, and never see the install request via apt. The other reason is that the default apt might be an older version of npm.

I usually go to the snap store to install a contained version of node.
You can view and see which versions are available for installation there.
I usually install the latest with something like sudo snap install node --channel=12/stable --classic

System Details

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=19.04
DISTRIB_CODENAME=disco
DISTRIB_DESCRIPTION="Ubuntu 19.04"

Please paste the output of wails report here.

The wails report command did not exist on my system after a fresh install. Likely another bug, or issue with my specific machine.

$wails report                                             ✔  406  17:11:54
 _       __      _ __
| |     / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__  )  v0.13.3
|__/|__/\__,_/_/_/____/   https://wails.app
The lightweight framework for web-like apps

Available commands:

   setup    Setup the Wails environment [default]
   init     Initialises a new Wails project
   build    Builds your Wails project
   serve    Run your Wails project in bridge mode
   update   Update to newer [pre]releases or specific versions
   issue    Generates an issue in Github

Flags:

  -help
        Get help on the 'wails' command.

Lag with Vuetify Template

Hi,
i've just create project with vuetify templates.
after build it's become lag (ie. when open Modal or Navigation Drawer).
it's normal or not?
if not, how to make that animate be smoothly??

Init fails on Arch linux

Description

When I run 'wails init' on Arch linux the command fails with the error "Error: unable to check libraries on distribution ''. Please ensure that the 'libgtk-3-dev' equivalent is installed"

To Reproduce
Steps to reproduce the behaviour:

  1. Run 'wails init' on Arch linux. I ran the command in an empty directory for the project
  2. See error

Expected behaviour
Expected the project to be initialized

Screenshots
Sent by slack

System Details

Name Value
Wails Version v0.15.0
Go Version go1.12.5
Platform linux
Arch amd64
GO111MODULE (Not Set)

Additional context
Add any other context about the problem here.

Windows 32 wails build

Trying to build wails 0.13.3 for 32 bit Windows build

  1. set GOARCH = 386
  2. wails build

I get the error:

| Ensuring Dependencies are up to date ... build quotes.exe: cannot load github.com/wailsapp/webview: no Go source files

! Ensuring Dependencies are up to date ...
Error: exit status 1

github.com/wailsapp/webview installed

When adding github.com/wailsapp/webview to mod.go error

Ensuring Dependencies are up to date...go build github.com/wailsapp/webview: build constraints exclude all Go files in C:\User
s\IVC-TVeliev\go\pkg\mod\github.com\wailsapp\[email protected]

! Ensuring Dependencies are up to date...
Error: exit status 1

can not install wails

~ go get -u -v github.com/wailsapp/wails/cmd/wails
github.com/wailsapp/wails (download)
github.com/leaanthony/spinner (download)
github.com/fatih/color (download)
github.com/leaanthony/synx (download)
github.com/mattn/go-isatty (download)
github.com/mitchellh/go-homedir (download)
github.com/pkg/browser (download)
github.com/jackmordaunt/icns (download)
github.com/nfnt/resize (download)
github.com/pkg/errors (download)
github.com/leaanthony/mewn (download)
github.com/leaanthony/slicer (download)
github.com/masterminds/semver (download)
github.com/wailsapp/wails/cmd

github.com/wailsapp/wails/cmd

go-work/src/github.com/wailsapp/wails/cmd/templates.go:50:18: too many arguments in call to entries.AddSlice
have ([]string, error)
want ([]string)
go-work/src/github.com/wailsapp/wails/cmd/templates.go:105:28: too many arguments in call to templateFilenames.AddSlice
have ([]string, error)
want ([]string)

Add browser methods to runtime

It would be great if we could open arbitrary URLs in a browser from a Wails application. This should be part of the runtime.

`wails build` fails when using dep

Description

I am looking at whether to use this project or not and ran across this issue while trying to setup a new project with dep dependency tracking.

I'll likely be spending a bit of time looking for why this is happening but just in case the solution is easily identifiable to you I figured opening an issue was a good step to take.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a new wails project with wails init
  2. Initialize dep for dependency vendoring with dep init
  3. Attempt to rebuild the wails application with wails build
  4. See error

Expected behaviour
I would expect for the build behavior to remain unchanged when using Godep.

Screenshots

Click on the below frame for an Asciinema recorded demonstration of my issue.

asciicast

System Details

Name Value
Wails Version v0.15.0
Go Version go1.12.5
Platform linux
Arch amd64
GO111MODULE (Not Set)

Problem installing wails on Windows

Description
Error initial compiling

To Reproduce
Steps to reproduce the behaviour:

  1. Go to 'CMD window'

  2. Click on 'go get github.com/wailsapp/wails/cmd/wails'

  3. See error:

# github.com/wailsapp/wails/cmd
C:\Users\u\go\src\github.com\wailsapp\wails\cmd\templates.go:50:18: too many arguments in call to entries.AddSlice
        have ([]string, error)
        want ([]string)
C:\Users\u\go\src\github.com\wailsapp\wails\cmd\templates.go:105:28: too many arguments in call to templateFilenames.AddSlice
        have ([]string, error)
        want ([]string)

Expected behaviour
Successful compiling
download

System Details
Windows 10 64 bit

`wails build` is failed on Ubuntu 19.04

Description
wails build is failed on Ubuntu 19.04.

To Reproduce
Steps to reproduce the behaviour:

  1. sudo apt install pkg-config build-essential libgtk-3-dev libwebkit2gtk-4.0-dev
  2. go get -u github.com/wailsapp/wails/cmd/wails
  3. cd $GOPATH/src
  4. wails init (project name is wails-test)
  5. cd wails-test && wails build

Expected behaviour
successfully build.

System Details

  • Ubuntu 19.04
  • go1.12.4

Additional context


luis@ubuntu ~/go/src/wails-test $ wails build                                                                                                                                                                                                                             [ruby-2.6.3p62]
Wails v0.12.3 - Building Application

✓ Skipped frontend dependencies (-f to force rebuild)
✓ Building frontend...
⣽ Ensuring Dependencies are up to date...go: finding github.com/leaanthony/mewn v0.10.5
go: finding github.com/wailsapp/wails v0.12.3
go: downloading github.com/leaanthony/mewn v0.10.5
go: extracting github.com/leaanthony/mewn v0.10.5
go: downloading github.com/wailsapp/wails v0.12.3
go: extracting github.com/wailsapp/wails v0.12.3
go: finding github.com/wailsapp/webview v0.2.7
go: finding github.com/go-playground/colors v1.2.0
go: finding github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: finding github.com/jackmordaunt/icns v1.0.0
go: finding github.com/dchest/jsmin v0.0.0-20160823214000-faeced883947
go: finding github.com/dchest/htmlmin v0.0.0-20150526090704-e254725e81ac
go: finding github.com/mattn/go-isatty v0.0.6
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.2
go: finding github.com/mattn/go-colorable v0.1.1
go: finding golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa
go: finding github.com/leaanthony/slicer v1.3.1
go: finding github.com/dchest/cssmin v0.0.0-20151210170030-fb8d9b44afdc
go: finding github.com/fatih/color v1.7.0
go: finding github.com/sirupsen/logrus v1.3.0
go: finding github.com/leaanthony/spinner v0.5.0
go: finding github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
go: finding github.com/mattn/go-isatty v0.0.5
go: finding golang.org/x/net v0.0.0-20190310014029-b774fd8d5c0f
go: finding github.com/zserge/webview v0.0.0-20190123072648-16c93bcaeaeb
go: finding github.com/olekukonko/tablewriter v0.0.1
go: finding github.com/google/go-querystring v1.0.0
go: finding github.com/leaanthony/synx v0.1.0
go: finding github.com/ribice/glice v0.0.0-20181011133736-685f13fa9b12
go: finding github.com/google/go-github v17.0.0+incompatible
go: finding github.com/leaanthony/wincursor v0.1.0
go: finding golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890
go: downloading github.com/go-playground/colors v1.2.0
go: downloading github.com/wailsapp/webview v0.2.7
go: downloading github.com/sirupsen/logrus v1.3.0
go: downloading github.com/dchest/htmlmin v0.0.0-20150526090704-e254725e81ac
go: downloading github.com/leaanthony/spinner v0.5.0
go: downloading github.com/leaanthony/slicer v1.3.1
go: downloading github.com/jackmordaunt/icns v1.0.0
go: downloading github.com/fatih/color v1.7.0
go: extracting github.com/dchest/htmlmin v0.0.0-20150526090704-e254725e81ac
go: extracting github.com/go-playground/colors v1.2.0
go: downloading github.com/dchest/jsmin v0.0.0-20160823214000-faeced883947
go: downloading github.com/dchest/cssmin v0.0.0-20151210170030-fb8d9b44afdc
go: extracting github.com/wailsapp/webview v0.2.7
go: downloading golang.org/x/net v0.0.0-20190310014029-b774fd8d5c0f
go: extracting github.com/jackmordaunt/icns v1.0.0
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: extracting github.com/leaanthony/spinner v0.5.0
go: extracting github.com/leaanthony/slicer v1.3.1
go: downloading github.com/leaanthony/synx v0.1.0
go: downloading github.com/mattn/go-isatty v0.0.6
go: extracting github.com/dchest/jsmin v0.0.0-20160823214000-faeced883947
go: extracting github.com/dchest/cssmin v0.0.0-20151210170030-fb8d9b44afdc
go: extracting github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: extracting github.com/leaanthony/synx v0.1.0
go: extracting github.com/mattn/go-isatty v0.0.6
go: extracting github.com/sirupsen/logrus v1.3.0
go: downloading golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting github.com/fatih/color v1.7.0
go: downloading github.com/mattn/go-colorable v0.1.1
go: extracting github.com/mattn/go-colorable v0.1.1
go: extracting golang.org/x/net v0.0.0-20190310014029-b774fd8d5c0f
go: extracting golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa
# github.com/wailsapp/webview
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so: undefined reference to `__divmodti4@GCC_7.0.0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so: undefined reference to `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22'
collect2: error: ld returned 1 exit status
# github.com/wailsapp/webview
In file included from webview.go:27:0,
                 from _cgo_export.c:4:
../../pkg/mod/github.com/wailsapp/[email protected]/webview.h: In function 'external_message_received_cb':
../../pkg/mod/github.com/wailsapp/[email protected]/webview.h:278:5: warning: 'webkit_javascript_result_get_global_context' is deprecated [-Wdeprecated-declarations]
     JSGlobalContextRef context = webkit_javascript_result_get_global_context(r);
     ^
In file included from /usr/include/webkitgtk-4.0/webkit2/webkit2.h:55:0,
                 from ../../pkg/mod/github.com/wailsapp/[email protected]/webview.h:45,
                 from webview.go:27,
                 from _cgo_export.c:4:
/usr/include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.h:49:1: note: declared here
 webkit_javascript_result_get_global_context (WebKitJavascriptResult *js_result);
 ^
In file included from webview.go:27:0,
                 from _cgo_export.c:4:
../../pkg/mod/github.com/wailsapp/[email protected]/webview.h:279:5: warning: 'webkit_javascript_result_get_value' is deprecated: Use 'webkit_javascript_result_get_js_value' instead [-Wdeprecated-declarations]
     JSValueRef value = webkit_javascript_result_get_value(r);
     ^
In file included from /usr/include/webkitgtk-4.0/webkit2/webkit2.h:55:0,
                 from ../../pkg/mod/github.com/wailsapp/[email protected]/webview.h:45,
                 from webview.go:27,
                 from _cgo_export.c:4:
/usr/include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.h:52:1: note: declared here
 webkit_javascript_result_get_value          (WebKitJavascriptResult *js_result);
 ^
# github.com/wailsapp/webview
In file included from ../../pkg/mod/github.com/wailsapp/[email protected]/webview.go:27:0:
../../pkg/mod/github.com/wailsapp/[email protected]/webview.h: In function 'external_message_received_cb':
../../pkg/mod/github.com/wailsapp/[email protected]/webview.h:278:5: warning: 'webkit_javascript_result_get_global_context' is deprecated [-Wdeprecated-declarations]
     JSGlobalContextRef context = webkit_javascript_result_get_global_context(r);
     ^
In file included from /usr/include/webkitgtk-4.0/webkit2/webkit2.h:55:0,
                 from ../../pkg/mod/github.com/wailsapp/[email protected]/webview.h:45,
                 from ../../pkg/mod/github.com/wailsapp/[email protected]/webview.go:27:
/usr/include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.h:49:1: note: declared here
 webkit_javascript_result_get_global_context (WebKitJavascriptResult *js_result);
 ^
In file included from ../../pkg/mod/github.com/wailsapp/[email protected]/webview.go:27:0:
../../pkg/mod/github.com/wailsapp/[email protected]/webview.h:279:5: warning: 'webkit_javascript_result_get_value' is deprecated: Use 'webkit_javascript_result_get_js_value' instead [-Wdeprecated-declarations]
     JSValueRef value = webkit_javascript_result_get_value(r);
     ^
In file included from /usr/include/webkitgtk-4.0/webkit2/webkit2.h:55:0,
                 from ../../pkg/mod/github.com/wailsapp/[email protected]/webview.h:45,
                 from ../../pkg/mod/github.com/wailsapp/[email protected]/webview.go:27:
/usr/include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.h:52:1: note: declared here
 webkit_javascript_result_get_value          (WebKitJavascriptResult *js_result);
 ^

✗ Ensuring Dependencies are up to date...
Error: exit status 2

`wails build` fails for the default generated project/code

Description
Do a clean go get -u github.com/wailsapp/wails/cmd/wails following with wails setup and wails init. The default project, when wails build executed fails with;

$ wails build -f
Wails v0.12.3 - Building Application (force rebuild)

✓ Ensuring frontend dependencies are up to date (This may take a while)
✓ Building frontend...
⣯ Ensuring Dependencies are up to date...go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
	ignoring go.mod;
	see 'go help modules'
# github.com/wailsapp/webview
In file included from _cgo_export.c:4:
In file included from webview.go:27:
../../wailsapp/webview/webview.h:88:3: warning: 'WebView' is deprecated: first deprecated in macOS 10.14 - No longer supported; please adopt WKWebView. [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebView.h:119:12: note: 'WebView' has been explicitly marked deprecated here
In file included from _cgo_export.c:4:
In file included from webview.go:27:
../../wailsapp/webview/webview.h:1982:19: warning: 'WebView' is deprecated: first deprecated in macOS 10.14 - No longer supported; please adopt WKWebView. [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebView.h:119:12: note: 'WebView' has been explicitly marked deprecated here
# github.com/wailsapp/webview
In file included from ../../wailsapp/webview/webview.go:27:
../../wailsapp/webview/webview.h:88:3: warning: 'WebView' is deprecated: first deprecated in macOS 10.14 - No longer supported; please adopt WKWebView. [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebView.h:119:12: note: 'WebView' has been explicitly marked deprecated here
In file included from ../../wailsapp/webview/webview.go:27:
../../wailsapp/webview/webview.h:1982:19: warning: 'WebView' is deprecated: first deprecated in macOS 10.14 - No longer supported; please adopt WKWebView. [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/WebKit.framework/Headers/WebView.h:119:12: note: 'WebView' has been explicitly marked deprecated here
# github.com/wailsapp/wails
../../wailsapp/wails/log.go:19:8: logger.SetOutput undefined (type *logrus.Logger has no field or method SetOutput)

✗ Ensuring Dependencies are up to date...
Error: exit status 2

Move headless capability into own library

The current headless mode injects everything via a basic page served up from the headless server. What is needed is a 'client' library that can be imported into any project and it handles the communication with the backend.

Target: vue serve to talk to backend.

wails report command does not exist after fresh install

Description
The wails report command did not exist on my system after a fresh install.

To Reproduce
Steps to reproduce the behaviour:

  1. Install as per wails docs
  2. run wails report
  3. See the following output.
wails report
 _       __      _ __
| |     / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__  )  v0.13.3
|__/|__/\__,_/_/_/____/   https://wails.app
The lightweight framework for web-like apps

Available commands:

   setup    Setup the Wails environment [default]
   init     Initialises a new Wails project
   build    Builds your Wails project
   serve    Run your Wails project in bridge mode
   update   Update to newer [pre]releases or specific versions
   issue    Generates an issue in Github

Flags:

  -help
        Get help on the 'wails' command.

Expected behaviour
Not entirely sure as I came accross the command opening another bug.

Screenshots
https://asciinema.org/a/hjobwds57XEKDGEnwHp2rBJO6

System Details
Please paste the output of wails report here.

No, go, my friend!

Unify Runtime APIs

The runtime APIs have grown organically and have slightly different naming conventions. We will unify these APIs. The existing methods will continue to work but we will output a deprecation warning.

APIs to cover:

  • Events
  • Logging
  • Browser

Unable To Init Project

Description

When running wails Init I get a slice out of bounds error

To Reproduce
Steps to reproduce the behaviour:

  1. run wails init from command line
  2. Input project name
  3. It then produces the error below

Expected behaviour
Project Generation Successful

Screenshots
C:\Users\dwalker>wails init
�[33mWails�[0m �[31mv0.12.3�[0m - Initialising project

The name of the project (My Project): mp1
Project Name: mp1
The output binary name (mp1):
Output binary Name: mp1.exe
Project directory name (mp1):
Project Directory: mp1
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/wailsapp/wails/cmd.(*TemplateHelper).InstallTemplate.func2(0x7c253d, 0x16)
C:/Users/dwalker/go/src/github.com/wailsapp/wails/cmd/templates.go:117 +0x5d5
github.com/leaanthony/slicer.(*StringSlicer).Each(0xc000300200, 0xc000069cb0)
C:/Users/dwalker/go/src/github.com/leaanthony/slicer/string.go:51 +0x74
github.com/wailsapp/wails/cmd.(*TemplateHelper).InstallTemplate(0xc0000330e0, 0xc0002da4a0, 0x14, 0xc000078420, 0x0, 0x0)
C:/Users/dwalker/go/src/github.com/wailsapp/wails/cmd/templates.go:114 +0x29c
github.com/wailsapp/wails/cmd.(*ProjectHelper).GenerateProject(0xc0000051c0, 0xc000078420, 0x0, 0x0)
C:/Users/dwalker/go/src/github.com/wailsapp/wails/cmd/project.go:83 +0x126
main.init.1.func1(0x412379, 0x411b43)
C:/Users/dwalker/go/src/github.com/wailsapp/wails/cmd/wails/2_init.go:54 +0x11f
github.com/wailsapp/wails/cmd.(*Command).Run(0xc0000784d0, 0xc000004450, 0x0, 0x0, 0xc0000491a0, 0xc000078790)
C:/Users/dwalker/go/src/github.com/wailsapp/wails/cmd/cli.go:168 +0xd7
github.com/wailsapp/wails/cmd.(*Command).Run(0xc0000782c0, 0xc000004450, 0x1, 0x1, 0xc000069f88, 0x4054b7)
C:/Users/dwalker/go/src/github.com/wailsapp/wails/cmd/cli.go:148 +0x2da
github.com/wailsapp/wails/cmd.(*Cli).Run(0xc000004920, 0x0, 0x0, 0x0, 0x2b, 0xc000040058)
C:/Users/dwalker/go/src/github.com/wailsapp/wails/cmd/cli.go:47 +0x95
main.main()
C:/Users/dwalker/go/src/github.com/wailsapp/wails/cmd/wails/main.go:15 +0x45

System Details

OS - Windows 10

Name Value
Wails Version v0.12.3
Go Version go1.11.1
Platform windows
Arch amd64
GO111MODULE (Not Set)

`wails init` skips over email address on Linux

Issue

When running wails init, I entered my name, pressed enter and it skipped right to the project input (and over the email).

image

Reproduced it twice (deleted my ~/.wails folder)

Other Symptoms

When looking at the resulting ~/.wails/wails.json, the content was:

{"email":"rysak","name":"Dustin"}

I have currently edited this file manually to keep testing.

{"email":"[email protected]","name":"Dustin Krysak"}

Is this the correct info otherwise?

System Specs

WAILS

wails version
 _       __      _ __    
| |     / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__  )  v0.9.1
|__/|__/\__,_/_/_/____/   https://wails.app
The lightweight framework for web-like apps

GO

go version
go version go1.11.5 linux/amd64

UBUNTU

cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.10
DISTRIB_CODENAME=cosmic
DISTRIB_DESCRIPTION="Ubuntu 18.10"

NPM

npm version
{ npm: '6.7.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '34.0',
  http_parser: '2.8.0',
  icu: '63.1',
  llhttp: '1.1.1',
  modules: '67',
  napi: '4',
  nghttp2: '1.34.0',
  node: '11.10.0',
  openssl: '1.1.1a',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.26.0',
  v8: '7.0.276.38-node.17',
  zlib: '1.2.11' }

asciicast

react template build error

Description

can not build react template

To Reproduce
download wails 0.16.0:

  1. wails init
  2. select React Js
  3. try building the generated hello world cd projectName && wails build
  4. see error

Expected behaviour
Build hello world

Screenshots
wails_error
wails_npm_log

System Details

Name Value
Wails Version v0.16.0
Go Version go1.12.5
Platform linux
Arch amd64
GO111MODULE (Not Set)

Additional context
The fix seems to be removing everything inside production array. Since the "browser" is webview is alright.

https://github.com/wailsapp/wails/blob/master/cmd/templates/create-react-app/frontend/package.json.template

"browserslist": {
    "production": [
],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }

Create Developer Tooling

It would be good to create tooling to support people wishing to contribute to Wails. Initially this would be a Project Template generator.

wails init won't work

#####################################################
If you have a technical issue, please do not open a bug this way!
Please use the wails issue command!
#####################################################

Description
When I run "wails init" command, It always returns to me an error:
Error: unable to check libraries on distribution 'Debian'. Please ensure that the 'libgtk-3-dev' equivalent is installed

but I already install "libgtk-3-dev" package on my PC. Please check the screenshot below for more details.
Thanks

Expected behaviour
That I can initialize my first Wails app on my Debian

Screenshots
Please check this screenshot https://i.imgur.com/ZPtpkVn.png

System Details
OS: Debian 9 - Gnome
Go: Version go1.12.6 linux/amd64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.