5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 11:29:10 +08:00
Commit Graph

157 Commits

Author SHA1 Message Date
Nobleman
4ad4d7c7e3
postbuild hook fix (#2839)
postbuildhook should only run if application was built
2023-08-29 18:47:14 +10:00
Nobleman
93a616ceef
[bugfix] build hook command parsing (#2836)
* fix build hook command parsing

use `shlex`, rather than `strings` package, to split build command

* fix compiler error
2023-08-28 08:50:13 +10:00
Mohamed Gharib
fa851f29c5
[v2] Add -devtools production build flag (#2725)
* [v2] Add devtools production build flag

* Update changelog

* Fix changelog spacing

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2023-06-19 06:45:01 +10:00
Misite Bao
eddc949295
fix: fix console printing (#2483) 2023-04-01 18:22:27 +11:00
Zámbó, Levente
add10df5ff
fix missing bin dir on build hook (#2273)
* fix missing bin dir on build hook

* add fix to changelog
2023-01-07 06:51:01 +11:00
stffabi
006b0c65b4
[webview2loader] Add missing windows build constraint (#2201) 2022-12-13 13:51:01 +01:00
stffabi
4aab1e6b93
[webview2loader] Promote go loader from experimental to stable (#2199)
Default webview2loader is now the go loader
2022-12-13 23:27:50 +11:00
stffabi
eb2d929824
[bindings] Pass ts_generation flags as env variable (#2194)
Otherwise this will clash if an app also uses flags internally
2022-12-11 07:38:06 +11:00
Misite Bao
f70d9de366
fix: fix go test errors (#2169)
* fix: fix go test errors

* Add flags to mac test

* Run on all branches

* Update PR workflow

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-12-06 06:45:06 +11:00
stffabi
5cc012d763
[darwin] Inspector tools should also be included into a debug build (#2162) 2022-12-01 09:20:18 +01:00
Lea Anthony
ea6aee91f1
Refactored build command (#2123)
* Refactored build command

* Update v2/cmd/wails/build.go

Co-authored-by: stffabi <stffabi@users.noreply.github.com>

* WIP

* Refactor `wails doctor`

* Refactor `wails dev`

* Refactor `wails dev`

* Fix merge conflict

* Fix test

* Update build_and_test.yml

Co-authored-by: stffabi <stffabi@users.noreply.github.com>
2022-12-01 18:18:02 +11:00
Oleg Gulevskyy
ca8a1fab36
Ability to define prefix / suffix for TS module (#2101)
* add tspostfix and tsprefix flags + organise under struct

* postifx -> suffix

* tsPrefix options on bindings struct

* pass prefix and suffix to the executable

* add support for CLI flags for generating module

* method to set TSpref/suff to bindings

* use passed ts prefix for typescriptify

* add brief Readme udpate to include new flags

* create reusable common flags

* use common flags instead of hardcoded text

* support tsprefix & suffix for dev

* add tsPrefix & tsSuffix for build cmd

* take pref & suff in account when gen d.ts

* export colorsful log functions into utils for reuse

* detect and warn the user about usage of reserved keyword

* fmt

* add TrimSpace on fn input

* refactor utils -> logutils

* add bindings -> ts_generation options to wailsjson parse

* use wailsjson for ts generation

* update warning message + extract to func

* remove suff/pref info from readme

* update json schema

* add tests for prefix and suffix case

* rename suffix method

* Update v2/internal/typescriptify/typescriptify.go

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>

* Update website/static/schemas/config.v2.json

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>

* Update website/static/schemas/config.v2.json

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>

* update changelog

* Minor tweaks

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-11-24 21:33:58 +11:00
Oleg Gulevskyy
b3d7682efc
Fix multiple nested build/bin folders in dev mode (#2103)
* stop circular assigning to OutputFilename

* update changelog

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-11-19 10:04:46 +11:00
Lea Anthony
18b2d315dd
Modularize wails (#2009)
Co-authored-by: stffabi <stffabi@users.noreply.github.com>
2022-11-03 21:21:40 +11:00
stffabi
0a20c8db96
[webview2loader] Add full featured go implementation (#1974)
* [webview2loader] Add full featured go implementation

The new go loader can be activated with the exp_gowebview2loader build tag.

* [build] Add information for using the new webvie2loader
2022-10-22 00:29:16 +11:00
Lea Anthony
96fa18846c
Feature/static analysis (#1983)
* Support parsing embed directives from package

* Validate `embed` directives on build

* `.gitkeep` -> `gitkeep`

* Make step silent. Fix for `wails dev`
2022-10-16 23:08:34 +11:00
Lea Anthony
7effede62b
Add support for Info.dev.plist (#1960) 2022-10-14 07:58:43 +11:00
Lea Anthony
1571b10b84
Quote command arguments if they have a space (#1892) 2022-09-25 22:20:01 +10:00
Lea Anthony
b93cdcd942
Releasetest/release workflow (#1869)
* Test release workflow

* Update release.yml

* Update release.yml

* add linux deps

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Fix: Misc tests

* Fix: Misc tests + linux build tags

* Fix: Bindings tests + move templates to pkg. Add json schema for templates

* Fix: template tests

* Add tests to release workflow. Test for go 1.18 + go 1.19
Fix: ignore .m files for non darwin builds. Fix watcher test. Fix warning in clilogger.

* Fix release pipeline

* Matrix for tests

* Rename templates to make tests work

* Update template test

* Debug template test

* Debug template test

* Debug template test

* Fix gitignore

* Update release.yml
2022-09-18 08:55:21 +10:00
stffabi
f97f5bb602
[build] Fix buildtags parsing if only one tag is specified (#1858)
* [build] Fix buildtags parsing if only one tag is specified
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-09-15 17:04:00 +10:00
Lea Anthony
052b9222c1
Add garble support (#1793)
Co-authored-by: AlbinoDrought <sean@albinodrought.com>
Co-authored-by: stffabi <stffabi@users.noreply.github.com>
2022-09-13 10:05:37 +10:00
imgbot[bot]
eef99ee577
[ImgBot] Optimize images (#1812)
*Total -- 5,696.04kb -> 5,003.34kb (12.16%)

/v2/pkg/commands/build/internal/packager/icon32.png -- 7.95kb -> 2.95kb (62.83%)
/v2/internal/frontend/desktop/windows/winc/dock_topbottom.png -- 4.27kb -> 1.82kb (57.31%)
/assets/images/jetbrains-grayscale.png -- 102.85kb -> 52.29kb (49.16%)
/v2/internal/frontend/desktop/windows/winc/dock_topleft.png -- 3.47kb -> 1.88kb (45.81%)
/cmd/templates/svelte/frontend/public/favicon.png -- 3.05kb -> 1.91kb (37.45%)
/website/static/img/icon-windows-dark.svg -- 0.63kb -> 0.45kb (28.35%)
/v2/pkg/buildassets/build/appicon.png -- 174.74kb -> 129.52kb (25.88%)
/website/static/img/favicon.svg -- 0.99kb -> 0.76kb (23.37%)
/website/static/img/go_js.svg -- 4.49kb -> 3.45kb (23.14%)
/website/static/img/go_js_dark.svg -- 4.54kb -> 3.50kb (22.97%)
/cmd/templates/vuetify2-basic/frontend/src/assets/images/logo.png -- 300.95kb -> 234.35kb (22.13%)
/cmd/templates/vuetify-basic/frontend/src/assets/images/logo.png -- 300.95kb -> 234.35kb (22.13%)
/cmd/templates/create-react-app/frontend/src/logo.png -- 300.95kb -> 234.35kb (22.13%)
/cmd/templates/vuebasic/frontend/src/assets/images/logo.png -- 300.95kb -> 234.35kb (22.13%)
/cmd/templates/svelte/frontend/src/logo.png -- 300.95kb -> 234.35kb (22.13%)
/website/static/img/architecture.svg -- 3.83kb -> 3.04kb (20.6%)
/website/static/img/Terminal-icon-dark.svg -- 0.99kb -> 0.79kb (20.37%)
/website/static/img/Terminal-icon.svg -- 0.99kb -> 0.79kb (19.84%)
/website/static/img/wails-logo-textless.svg -- 4.11kb -> 3.40kb (17.31%)
/assets/images/pace.jpeg -- 3.06kb -> 2.55kb (16.57%)
/website/static/img/icon-apple-dark.svg -- 1.10kb -> 0.92kb (16.33%)
/website/static/img/Go_Logo_Blue.svg -- 2.20kb -> 1.86kb (15.21%)
/website/static/img/logo-dark.svg -- 7.19kb -> 6.18kb (14.12%)
/website/static/img/wails-logo-horizontal-dark.svg -- 6.29kb -> 5.41kb (14.02%)
/website/static/img/logo-light.svg -- 7.12kb -> 6.13kb (14%)
/website/static/img/wails-logo-horizontal.svg -- 6.22kb -> 5.36kb (13.87%)
/website/static/img/icon-windows.svg -- 0.42kb -> 0.39kb (8.14%)
/v2/cmd/wails/internal/commands/generate/template/base/frontend/dist/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/vue-ts/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/plain/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/generate/assets/lit/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/react-ts/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/generate/assets/common/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/lit-ts/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte-ts/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/lit/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/generate/assets/preact/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/generate/plain/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/react/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/vue/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/generate/assets/react/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/vanilla-ts/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/preact-ts/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/v2/cmd/wails/internal/commands/initialise/templates/generate/assets/vue/frontend/src/assets/images/logo-universal.png -- 146.83kb -> 136.42kb (7.09%)
/cmd/templates/vue3-js/frontend/src/assets/logo.png -- 6.69kb -> 6.33kb (5.4%)
/v2/cmd/wails/internal/commands/initialise/templates/templates/preact/frontend/src/assets/preact.svg -- 1.57kb -> 1.49kb (4.99%)
/website/static/img/icon-apple.svg -- 0.76kb -> 0.72kb (4.52%)
/website/static/img/desktop-application-app-dark.svg -- 4.56kb -> 4.37kb (4.34%)
/website/static/img/desktop-application-app.svg -- 4.54kb -> 4.35kb (4.34%)
/website/static/img/logo.svg -- 6.55kb -> 6.29kb (4.05%)
/website/static/img/vitejs.svg -- 3.76kb -> 3.62kb (3.79%)
/cmd/templates/create-react-app/frontend/public/logo512.png -- 175.92kb -> 169.55kb (3.62%)
/v2/pkg/commands/build/internal/packager/icon128.png -- 16.10kb -> 15.52kb (3.58%)
/cmd/templates/vue3-full/frontend/src/assets/appicon.png -- 105.56kb -> 101.81kb (3.56%)
/cmd/packages/darwin/icon.png -- 105.56kb -> 101.81kb (3.56%)
/cmd/templates/vue3-js/frontend/src/assets/appicon.png -- 105.56kb -> 101.81kb (3.56%)
/cmd/packages/windows/icon.png -- 105.56kb -> 101.81kb (3.56%)
/cmd/templates/create-react-app/frontend/public/logo192.png -- 37.41kb -> 36.24kb (3.14%)
/cmd/templates/vuebasic/frontend/src/assets/fonts/roboto/roboto-v18-latin-regular.svg -- 47.83kb -> 46.81kb (2.13%)
/v2/pkg/commands/build/internal/packager/icon256.png -- 26.46kb -> 25.99kb (1.79%)
/website/static/img/icon-linux.svg -- 2.94kb -> 2.92kb (0.4%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-09-12 21:57:07 +10:00
stffabi
501f7a129e
[v2, dev] Build frontend only before starting the dev watcher command (#1694)
* [v2, dev] Improve logging of dev watcher command during stop

* [v2, dev] Build frontend only before starting the dev watcher command

Breaking Change: Ignore flags take precedence over Force flag.
2022-08-05 20:01:47 +10:00
LGiki
b33211495e
Change frontend:dev to frontend:dev:build (#1691) 2022-08-03 21:19:06 +10:00
stffabi
42ef125fb4
[v2, build] gcflags don't need to be quoted (#1689)
This seemed to work for Go < 1.19 but since 1.19 this gives
an error.
2022-08-03 17:15:56 +10:00
LGiki
568015972a
Add frontend:dev:install configuration (#1666)
* Add frontend:dev:install configuration

* When building the frontend in dev mode, use `frontend:dev:install` (if it has been defined) to install the dependencies

* Simplified logic for determining installation command

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-08-03 17:15:22 +10:00
Lea Anthony
5a3d45b535
Override platform with GOOS and GOARCH (#1618)
* Override platform with GOOS and GOARCH

* Update v2/cmd/wails/internal/commands/build/build.go

Co-authored-by: stffabi <stffabi@users.noreply.github.com>

* Only use GOOS and GOARCH env vars for default target

* Update docs. Add dryrun flag for testing

* Update v2/cmd/wails/internal/commands/build/build.go

Co-authored-by: stffabi <stffabi@users.noreply.github.com>

* Fix scenario where no arch specified

* Fixed banner

Co-authored-by: stffabi <stffabi@users.noreply.github.com>
2022-07-21 21:25:57 +10:00
Lea Anthony
f46e825d24
Add pre-build hooks. Print command output when verbosity flag set. (#1578)
* Add pre-build hooks. Print command output when verbosity flag set.

* Refactor build hooks
2022-07-17 22:08:55 +10:00
Lea Anthony
4726b72708
feature: Add -windowsconsole flag 2022-07-04 22:52:50 +10:00
Zámbó, Levente
f6425a64a6
feature - add race detector to build & dev (#1426) 2022-05-27 19:07:39 -10:00
Lea Anthony
41f9c07c88 Fixes #1343 2022-04-27 21:29:54 +10:00
Lea Anthony
e7aa74905a
Initial commit (#1352) 2022-04-27 19:10:20 +10:00
Lea Anthony
4e03c84fbb
Feature/default templates (#1334) 2022-04-15 20:30:10 +10:00
Lea Anthony
3fbe4f71c4 Ensure there's a default wailsJS dir 2022-04-12 20:13:05 +10:00
Lea Anthony
2376062008 Update NSIS guide. Backport docs to .34. Fix references. Fix titles. 2022-03-31 12:23:28 +11:00
Lea Anthony
1da68cfc7c Remove unused directories + tidy up 2022-03-29 21:47:26 +11:00
Lea Anthony
a5bf76b30f Fix up dev. Pull in go-webview and winc 2022-03-29 21:45:16 +11:00
Lea Anthony
9c5600d8f3 Ensure default icon is generated regardless of icon.ico availability 2022-03-14 22:35:21 +11:00
fengweiqiang
f4d1d02ded
Build added win32 compatibility (#1238) 2022-03-12 17:29:25 +11:00
stffabi
b02dbfaddf
[v2] NSIS installer support for Windows (#1184)
* [v2] Add support for post build hooks

Currently only supports build-level hooks

* [v2] Improve build assets handling and use single source for manifest generation

The manifest asset files are now a go template and data will be
resolved before they are included into the build output.

Breaking Change: Windows manifest file must be named
“wails.exe.manifest” and doesn’t depend on the project name
anymore.

* [v2, windows] NSIS installer generation
2022-03-02 19:44:31 +11:00
Valentin Trinqué
e6424dc8ab
Update icon.ico file mode (#1154)
* Add os.O_WRONLY to icon.ico to avoid bad file descriptor error

* Wrap errors coming from winres.LoadICO()

If the file exists but is empty, a blunt "Unexpected EOF" is returned, and propagated as is.

This is not super helpful when trying to pin point what's going on.

Wrapping the error helps to locate the problem.
2022-02-16 06:02:45 +11:00
Lea Anthony
f923a431f7 Try to provide help when old xcode tools installed. #1142 2022-02-12 21:12:17 +11:00
Lea Anthony
eb0f22b4ee
Fix appicon bug on Mac. Fixes #1143 2022-02-12 20:48:43 +11:00
Lea Anthony
771594519f
[mac] Better support for multi-builds 2022-02-10 21:41:40 +11:00
Lea Anthony
ec44ca58f1 Better output for build 2022-02-10 21:25:43 +11:00
Lea Anthony
28e31c46c6 Fix output filename for windows builds 2022-02-10 21:11:32 +11:00
Lea Anthony
c2fa4b6103 Support multiple targets for windows 2022-02-10 19:55:04 +11:00
Lea Anthony
4d0b0947d2 Fixes #1070 2022-02-01 19:47:46 +11:00
Lea Anthony
e96410e714 Support -debug for wails build 2022-01-17 21:14:07 +11:00
Lea\Anthony
3c6ed12637 New build flag: -debug 2021-12-29 06:54:52 +11:00