Compare commits

..

130 Commits

Author SHA1 Message Date
Lea Anthony c24aef8ea1 Initial commit. Need to fix userid write permission issues 2022-02-22 19:12:13 +11:00
Misitebao 91934d1f8e docs: synchronize and optimize documents (#1167)
* docs: sync chinese documents

* docs: optimize chinese terminology
2022-02-21 20:24:06 +11:00
Lea Anthony 2f7293e25c Add platform flag to docs 2022-02-20 18:52:41 +11:00
Lea Anthony 18c76602b5 Add platform flag to docs 2022-02-20 18:49:12 +11:00
Lea Anthony 93491eb2eb Feature/align api (#1161)
* Fix WindowSetRGBA API

* Change WindowUnFullscreen -> WindowUnfullscreen for consistency
RGBA bugfix
2022-02-19 20:29:55 +11:00
Misitebao 2ded86c369 docs: sync chinese documents (#1160) 2022-02-19 09:40:54 +11:00
Lea Anthony f059c35d9e Feature: WindowToggleMaximise (#1159)
* [windows] Add WindowToggleMaximise

* Add mac support

* Update docs

* [linux] Toggle Maximise
2022-02-18 20:28:16 +11:00
Lea Anthony 6e8d65e3aa [linux] Add stdint.h include 2022-02-17 21:23:24 +11:00
stffabi a750d2d507 [v2, windows] Invert the frameless border flag and rename it (#1157)
This is a breaking change for all users of the flag.
2022-02-16 20:28:46 +11:00
stffabi 331e0268a3 [v2, windows] Do not show caption buttons if frameless and translucent+transparency (#1152) 2022-02-16 18:53:17 +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 00db626942 State no support for anonymous structs in binding. Fixes #1142 2022-02-12 20:59:57 +11:00
Lea Anthony eb0f22b4ee Fix appicon bug on Mac. Fixes #1143 2022-02-12 20:48:43 +11:00
Lea Anthony e068e0f2f5 Better platform support 2022-02-10 21:43:04 +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 cb574148eb Better output for build 2022-02-10 21:24:27 +11:00
Lea Anthony 771efa527f Don't clean directory on subsequent builds 2022-02-10 21:14:02 +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 99ca6d5e77 [Linux] Restore min/max after fullscreen 2022-02-10 19:55:04 +11:00
Lea Anthony 876b845762 [Windows] Restore min/max after fullscreen 2022-02-10 19:55:04 +11:00
stffabi e4122ce4d2 [v2, windows] Bump winc (#1134)
Fix detection if GetDpiForWindow is available
2022-02-08 19:01:38 +11:00
stffabi 7bc51725c0 [v2, windows] Apply suggested window size during DPI changed event (#1131)
* [v2, windows] Apply suggested window size during DPI changed event

This adjusts the window size if the window is moved from one
monitor to another with a different DPI scaling

* [v2, windows] Do not block processing of messages during frameless drag/resize

* [v2, windows] Bump winc

Improves the HiDPI handling by using newer APIs if available

* [v2, windows] Constrain frameless maximize to MaxWidth/MaxHeight
2022-02-08 07:56:01 +11:00
Lea Anthony 3d02a314b9 [linux] Fix min/max size after fullscreen 2022-02-08 07:04:45 +11:00
Lea Anthony 30a4f47cba [linux] Fix min/max size 2022-02-08 06:51:52 +11:00
Lea Anthony 668da3a827 [linux] Fix disabling context menu 2022-02-08 06:20:41 +11:00
Lea Anthony 322aad166b [linux] Fix fullscreen 2022-02-08 05:29:26 +11:00
Lea Anthony 3decd70319 Move more runtime methods to main thread 2022-02-07 20:17:25 +11:00
Lea Anthony 24857ec04b Only attach logger in debug mode. Fixes #1128 2022-02-07 20:00:26 +11:00
Lea Anthony a016f39e97 [linux] Move SetPosition, Center, Fullscreen and UnFullscreen to main thread 2022-02-07 08:48:21 +11:00
Lea Anthony 8699bf7521 [linux] Move SetTitle and startDrag to main thread 2022-02-07 08:47:11 +11:00
Lea Anthony 34b303a86f v2.0.0-beta.30 2022-02-05 10:06:22 +11:00
Travis McLane e39f3eba44 use path to first index.html file for 'index' (#1127) 2022-02-05 07:19:02 +11:00
Lea Anthony de7f08357c Fix runtime docs 2022-02-04 23:31:15 +11:00
Lea Anthony 9856d2979f Add GetEnvironment() - Fixes #1126 2022-02-04 23:30:21 +11:00
Lea Anthony 082af614ff Add GetEnvironment() - Fixes #1126 2022-02-04 07:52:45 +11:00
Lea Anthony 0c6864c7ed [windows] Fix pos/getpos calls 2022-02-04 07:45:44 +11:00
Lea Anthony dd20985952 Fix position runtime (#1125)
* [linux] Move SetTitle and startDrag to main thread

* [linux] Move SetPosition, Center, Fullscreen and UnFullscreen to main thread

* Fix runtime Window Get/Set Position signatures

* Fix vanilla template keyboard handling

* [windows] Fix pos/getpos calls
2022-02-04 07:26:54 +11:00
Lea Anthony 0971857e7e Fix position runtime (#1123)
* [linux] Move SetTitle and startDrag to main thread

* [linux] Move SetPosition, Center, Fullscreen and UnFullscreen to main thread

* Fix runtime Window Get/Set Position signatures

* Fix vanilla template keyboard handling
2022-02-03 21:42:14 +11:00
stffabi 6700a4e3bd [v2, windows] Bump winc (#1122)
Contains fixes for #1094 and resize constraining
2022-02-03 17:05:24 +11:00
Lea Anthony 6a5937bd90 [windows] Do not allow maximise via runtime if disableResize is true 2022-02-03 07:31:05 +11:00
Lea Anthony aa8a8f80f0 Fix logging bug in runtime 2022-02-02 20:42:30 +11:00
Lea Anthony e17f556c25 [windows] Update frameless border size to 6px 2022-02-01 20:18:57 +11:00
dependabot[bot] c190aaeddc Bump shelljs from 0.8.4 to 0.8.5 in /website (#1076)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-01 20:02:29 +11:00
Lea Anthony 4d0b0947d2 Fixes #1070 2022-02-01 19:47:46 +11:00
Lea Anthony 4afbf00e45 Update docusaurus version 2022-02-01 19:43:29 +11:00
Misitebao cd13a05270 feat(website): optimize and sync websites and documents (#1110)
* feat(website): update dependencies and optimize some terms

* docs: optimize english documents

* docs: sync documents

* chore(website): the website project adds the recommended configuration of the vscode plugin

* ensure data doesn't get garbage collected too soon (#1113)

* ensure data doesn't get garbage collected too soon

* Update v2/internal/frontend/desktop/linux/frontend.go

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

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: stffabi <stffabi@users.noreply.github.com>

* revert: undo lock-file changes

* Feature/v2 linux menus (#1114)

* Render menubar + text menu items

* Support disabled menuitems + callbacks

* Support checkboxes

* Support reusing checkboxes

* Support submenus

* Support Radio menuitems

* Support Menu Accelerators

* Support MenuUpdateApplicationMenu

* Fixes #1108 (#1115)

* chore(action): add auto sync script (#1109)

* Support RGBA, fix compilation error

* Fix fullscreen drag

* Ignore setenv error

* ensure data doesn't get garbage collected too soon (#1113)

* ensure data doesn't get garbage collected too soon

* Update v2/internal/frontend/desktop/linux/frontend.go

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

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: stffabi <stffabi@users.noreply.github.com>

* Feature/v2 linux menus (#1114)

* Render menubar + text menu items

* Support disabled menuitems + callbacks

* Support checkboxes

* Support reusing checkboxes

* Support submenus

* Support Radio menuitems

* Support Menu Accelerators

* Support MenuUpdateApplicationMenu

* Fixes #1108 (#1115)

* chore(action): add auto sync script (#1109)

* Support RGBA, fix compilation error

* Fix fullscreen drag

* Ignore setenv error

* feat(website): update dependencies and optimize some terms

* docs: optimize english documents

* docs: sync documents

* chore(website): the website project adds the recommended configuration of the vscode plugin

* revert: undo lock-file changes

* [linux] better error handling

* [linux] Better Go 1.16 support

* [linux] Remove Go based dispatcher

* feat(website): update dependencies and optimize some terms

Co-authored-by: Travis McLane <tmclane@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: stffabi <stffabi@users.noreply.github.com>
2022-02-01 19:43:03 +11:00
Lea Anthony db9e0fd0d3 [linux] Remove Go based dispatcher 2022-01-31 21:22:17 +11:00
Lea Anthony 6a10bf4d98 [linux] Better Go 1.16 support 2022-01-31 21:21:48 +11:00
Lea Anthony a624ee5e35 [linux] better error handling 2022-01-30 21:03:39 +11:00
Lea Anthony be15644b96 Ignore setenv error 2022-01-29 11:42:17 +11:00
Lea Anthony f3783c9800 Fix fullscreen drag 2022-01-29 11:41:50 +11:00
Lea Anthony ac3808f9c3 Support RGBA, fix compilation error 2022-01-29 11:38:25 +11:00
Misitebao c5fb2b6143 chore(action): add auto sync script (#1109) 2022-01-29 10:40:08 +11:00
Lea Anthony 4a89508b50 Fixes #1108 (#1115) 2022-01-29 10:21:07 +11:00
Lea Anthony 30deec4224 Support MenuUpdateApplicationMenu 2022-01-29 10:13:29 +11:00
Lea Anthony 642fa42f25 Feature/v2 linux menus (#1114)
* Render menubar + text menu items

* Support disabled menuitems + callbacks

* Support checkboxes

* Support reusing checkboxes

* Support submenus

* Support Radio menuitems

* Support Menu Accelerators
2022-01-29 07:19:14 +11:00
Travis McLane e713c439f0 ensure data doesn't get garbage collected too soon (#1113)
* ensure data doesn't get garbage collected too soon

* Update v2/internal/frontend/desktop/linux/frontend.go

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

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: stffabi <stffabi@users.noreply.github.com>
2022-01-28 07:37:17 +11:00
Travis McLane ac69577182 remove unused import (#1107) 2022-01-27 07:01:29 +11:00
dependabot[bot] 46389d04f0 Bump path-parse from 1.0.6 to 1.0.7 in /v2/internal/runtime/js/runtime (#1099)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 20:09:27 +11:00
dependabot[bot] 3300a08c87 Bump y18n from 3.2.1 to 3.2.2 in /v2/internal/runtime/js/runtime (#1101)
Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

---
updated-dependencies:
- dependency-name: y18n
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 20:09:11 +11:00
dependabot[bot] 1db0ad6298 Bump hosted-git-info in /v2/internal/runtime/js/runtime (#1100)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 20:08:56 +11:00
dependabot[bot] 728739ed4c Bump path-parse in /v2/internal/runtime/js/runtime/src (#1102)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 20:08:37 +11:00
MikeSchaap 965187a8bb Updated windows window/frontend to fix issue with html select positioning (#1082)
* Updated windows window/frontend to fix issue with html select positioning

* Moved notifyParentWindowPositionChanged to the Window struct and moved RegMsgHandler to Run

* Update v2/internal/frontend/desktop/windows/window.go

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

* Moved winc.RegMsgHandler back to old location

* fixed error with merge

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-01-26 18:48:39 +11:00
Lea Anthony aa88174c28 Add linux dialog screenshot 2022-01-26 18:36:33 +11:00
Lea Anthony 160b650833 Merge pull request #1089 from wailsapp/feature/fix-linux-dialogs
[linux] Fix dialogs
2022-01-26 18:27:20 +11:00
Lea Anthony c5036187c2 Merge branch 'master' into feature/fix-linux-dialogs 2022-01-26 14:18:12 +11:00
Lea Anthony 736d8b6b04 Update docs 2022-01-26 14:16:36 +11:00
Lea Anthony 7ede3ed08a [linux] 404 handling 2022-01-26 14:01:31 +11:00
Lea Anthony bb867832e1 Disable 404 handling for now 2022-01-26 09:55:12 +11:00
Lea Anthony f3cc4b5ebd Support message dialog 2022-01-25 16:27:39 -06:00
Lea Anthony c58252386f Support default directory, Fixed label, removed TreatPackagesAsDirectories 2022-01-25 16:27:39 -06:00
Travis McLane a7e516a43d [linux] implement SaveFileDialog 2022-01-25 16:27:39 -06:00
Travis McLane d0feeb938c implement SaveFileDialog 2022-01-25 16:27:39 -06:00
Travis McLane 2c2e053bd1 [linux] implement OpenDirectoryDialog 2022-01-25 16:27:39 -06:00
Travis McLane b7647b3992 allow action to be overridden by caller 2022-01-25 16:27:39 -06:00
Lea Anthony 1e5f8e03cb Tidy Up 2022-01-25 16:27:39 -06:00
Lea Anthony 4f3c14f25b Fix context issue 2022-01-25 16:27:39 -06:00
Lea Anthony 6c68e59113 Support OpenFile /
OpenMultipleFiles
2022-01-25 16:27:39 -06:00
Lea Anthony 6e30c6770b Tidy up and slight refactor 2022-01-25 16:27:39 -06:00
Travis McLane a2d447aecf implement opendialog as callback function 2022-01-25 16:27:39 -06:00
Travis McLane 3bcddd5b4c add function argument to ExecuteOnMainThread 2022-01-25 16:27:39 -06:00
Travis McLane b11964f0eb remove xlib thread initialization 2022-01-25 16:27:39 -06:00
Lea Anthony 1920a545f4 [linux] Dialogs WIP 2022-01-25 16:27:39 -06:00
Lea Anthony 5c24f8bf83 Merge pull request #1105 from stffabi/feature/webview2-datapath
[v2, windows] Add WebviewUserDataPath to windows options
2022-01-26 08:18:04 +11:00
stffabi b1c2065dfb [v2, windows] Add WebviewUserDataPath to windows options 2022-01-25 21:42:01 +01:00
stffabi ad28527a76 [v2] Bump go-webview2
Contains fixes for #1081, #1103, #1104
2022-01-25 20:24:26 +01:00
Lea Anthony 9d519a3a3f Merge pull request #1098 from stffabi/feature/fix-dpi-scaling
[v2, windows] Fix dpi scaling for factors other than 100%, 200%,...
2022-01-25 19:58:18 +11:00
stffabi fa6686361c [v2, windows] Fix dpi scaling for factors other than 100%, 200%,... 2022-01-25 08:48:53 +01:00
Lea Anthony cab268212c Merge pull request #1092 from albert-sun/1091-export-bindings
Added TypeScript interface export for the window.go object
2022-01-23 08:57:05 +11:00
Albert Sun f5c3907fac added interface{} test case and fixed 2022-01-22 10:23:02 -05:00
Albert Sun 4118f348f5 fixed generate test 2022-01-22 00:59:26 -05:00
Albert Sun 1e4af8991b added export 2022-01-22 00:40:55 -05:00
Lea Anthony 02ea108bea Merge pull request #1085 from stffabi/feature/improve-frameless
[v2] windows: Improve frameless window handling
2022-01-20 05:40:19 +11:00
stffabi 46d3288a50 [v2] windows: Improve frameless window handling
The following features are now supported for framless windows
- Allow aero snap
- Minimize and maximize animations
- Allow minimizing/restoring by clicking onto the taskbar icon
- If EnableFramelessBorder is used, the default application border with glass effect is used

Change: If a menu is used, it won't be displayed anymore if the window is frameless.
2022-01-19 14:54:29 +01:00
Lea Anthony 6aef92950a Merge pull request #1086 from wailsapp/feature/linux-callback
[linux] execute JS on main thread
2022-01-19 19:22:41 +11:00
Travis McLane cfcc6cfa1c [linux] execute JS on main thread 2022-01-18 21:31:08 -06:00
Lea Anthony e96410e714 Support -debug for wails build 2022-01-17 21:14:07 +11:00
Lea Anthony e08cdc22d1 v2.0.0-beta.29 2022-01-17 20:51:58 +11:00
Lea Anthony 15091310a6 Merge pull request #1074 from stffabi/feature/frameless-resizing
[v2] Only call EnableSizable for normal windows
2022-01-17 20:34:36 +11:00
stffabi dd4b0e189c [v2] Bump winc
Contains fixes for #1049, #1063 and #1083
2022-01-17 10:23:49 +01:00
stffabi c4b14740d5 [v2] Only call EnableSizable for normal windows
Frameless windows are always not resizable per default and
the resizing for those will be initiated by the frontend see
processMessage.

If EnableSizable is enabled for frameless windows, a small white
titlebar will be shown.

Fix #1049
2022-01-17 10:23:20 +01:00
Lea Anthony 140c78ecd1 Update sponsors 2022-01-16 14:48:17 +11:00
Lea Anthony 72a0936f49 v2.0.0-beta.28 2022-01-12 20:38:17 +11:00
Lea Anthony 8b7d4393dc Revert "WIP"
This reverts commit b07fd608b3.
2022-01-12 20:34:37 +11:00
Lea Anthony 1724912cd8 Update to latest winc. Fixes resize issue 2022-01-12 20:33:58 +11:00
Lea Anthony b07fd608b3 WIP 2022-01-12 20:29:20 +11:00
Lea Anthony 6eba8ec76f Merge pull request #1069 from redraskal/fix/v2-win-window-maximize
[v2] Fix: win window maximise/minimise
2022-01-12 19:30:43 +11:00
redraskal b32c5b7ba2 fix: [v2] win runtime.WindowMinimise() 2022-01-10 23:00:31 -06:00
redraskal 0593c29784 fix: [v2] win runtime.WindowMaximise() 2022-01-10 22:59:40 -06:00
Lea Anthony 0d402492db Merge pull request #1068 from BillBuilt/patch-1
Add templates for using Svelte with Vite
2022-01-11 07:08:04 +11:00
BillBuilt bcf7c4e035 Add templates for using Svelte with Vite
Add templates for using Svelte with Vite and optionally TailwindCSS v3
2022-01-10 13:10:43 -05:00
Lea\Anthony d9bacfc396 Update Sponsors 2022-01-10 20:49:28 +11:00
Lea Anthony f6d7ec3d50 Merge pull request #1059 from GargantuaX/master
update zh-hans docs
2022-01-06 06:28:35 +11:00
GargantuaX d2a116fe55 update zh-hans docs 2022-01-05 16:01:48 +08:00
Lea Anthony eb3cf9d130 Merge pull request #1058 from yesgs/master
add uos linux distro
2022-01-05 17:13:48 +11:00
king 7e2258be7d add uos linux distro 2022-01-05 11:13:34 +08:00
Lea Anthony bb5d446001 Merge pull request #1053 from pierrejoye/master
Allow window resizing regardless of frameless or other options (#1049)
2021-12-31 06:58:05 +11:00
Pierre Joye e9aba4795f Allow window resizing regardless of frameless or other options
Fix bug on Windows where the disableResize option depends on the frameless option.
2021-12-30 16:55:47 +07:00
Lea\Anthony c16bb9715f Fix for bad default directories in dialog options. Fixes #1052 2021-12-30 17:34:06 +11:00
Lea\Anthony 0f09e8d433 Fix signatures 2021-12-30 11:17:29 +11:00
Lea\Anthony f338dff171 Fix EventsOff in JS runtime 2021-12-29 09:11:12 +11:00
Lea\Anthony 3c6ed12637 New build flag: -debug 2021-12-29 06:54:52 +11:00
Lea Anthony e2f3a11a33 [mac] Fix for cancelling Dialogs. Fixes #1047 2021-12-28 20:04:30 +11:00
Lea Anthony 0571deb290 Merge pull request #1046 from buddyabaddon/master
Make linuxdb.yaml an embedded resource
2021-12-28 17:27:59 +11:00
Matt McKenzie 451b357e40 Make linuxdb.yaml an embedded resource 2021-12-27 18:22:03 -08:00
Lea\Anthony 84b67a8f53 Add -u flag to sync project go.mod with CLI version 2021-12-28 06:40:44 +11:00
Lea Anthony 448cf731bb [mac] Fix for Save Dialog 2021-12-27 20:09:03 +11:00
119 changed files with 9017 additions and 4697 deletions
@@ -1,10 +1,9 @@
name: Deploy mirror | 部署镜像
name: Sync upstream branch and deploy mirror | 同步上游分支并部署镜像
on:
push:
branches: [master]
# pull_request:
# branches: [ main ]
schedule:
- cron: "0 8,20 * * *"
workflow_dispatch:
jobs:
build-and-deploy:
@@ -20,6 +19,22 @@ jobs:
submodules: true
fetch-depth: 0
- name: Setup Git | 设置Git
run: |
git config --local user.email "i@misitebao.com"
git config --local user.name "misitebao"
- name: Add remote upstream repository and sync | 添加远程上游仓库并同步
run: |
git remote add upstream https://github.com/wailsapp/wails
git pull -v --progress --no-rebase "upstream" master
- name: Push | 推送
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Build Site | 构建网站
run: |
cd website &&
+7 -11
View File
@@ -106,15 +106,8 @@ Click [here](https://wails.io) if you are interested in trying out v2 Beta for W
This project is supported by these kind people / companies:
<p align="center">
<a href="https://www.easywebadv.it/" style="width:150px;">
<img src="website/static/img/easyweb.png" width="150"/>
</a>
</p>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="sponsors/silver%20sponsor.png" width="100"/>
<img src="/img/silver%20sponsor.png" width="100"/>
</a>
<a href="https://github.com/letheanVPN" style="width:100px;">
<img src="https://github.com/letheanVPN.png?size=100" width="100"/>
@@ -122,7 +115,7 @@ This project is supported by these kind people / companies:
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="sponsors/bronze%20sponsor.png" width="100"/>
<img src="img/bronze%20sponsor.png" width="100"/>
</a>
<a href="https://github.com/snider" style="width:100px;">
<img src="https://github.com/snider.png?size=100" width="100"/>
@@ -133,6 +126,9 @@ This project is supported by these kind people / companies:
<a href="https://github.com/CrackDavid" style="width:100px">
<img src="https://github.com/CrackDavid.png?size=100" width="100"/>
</a>
<a href="https://www.easywebadv.it/" style="width:100px">
<img src="website/static/img/easyweb.png" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/matryer" style="width:100px">
@@ -189,8 +185,8 @@ This project is supported by these kind people / companies:
<a href="https://github.com/DonTomato" style="width:45px">
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
</a>
<a href="https://github.com/taigrr" style="width:45px">
<img src="https://github.com/taigrr.png?size=45" width="45"/>
<a href="https://github.com/taigrr" style="width:55px">
<img src="https://github.com/taigrr.png?size=55" width="55"/>
</a>
<a href="https://github.com/charlie-dee" style="width:55px">
<img src="https://github.com/charlie-dee.png?size=55" width="55"/>
+7 -11
View File
@@ -109,15 +109,8 @@
这个项目由以下这些人或者公司支持:
<p align="center">
<a href="https://www.easywebadv.it/" style="width:100px;">
<img src="website/static/img/easyweb.png" width="120"/>
</a>
</p>
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="sponsors/silver%20sponsor.png" width="100"/>
<img src="/img/silver%20sponsor.png" width="100"/>
</a>
<a href="https://github.com/letheanVPN" style="width:100px;">
<img src="https://github.com/letheanVPN.png?size=100" width="100"/>
@@ -125,7 +118,7 @@
<br/>
<br/>
<a href="https://github.com/sponsors/leaanthony" style="width:100px;">
<img src="sponsors/bronze%20sponsor.png" width="100"/>
<img src="img/bronze%20sponsor.png" width="100"/>
</a>
<a href="https://github.com/snider" style="width:100px;">
<img src="https://github.com/snider.png?size=100" width="100"/>
@@ -136,6 +129,9 @@
<a href="https://github.com/CrackDavid" style="width:100px">
<img src="https://github.com/CrackDavid.png?size=100" width="100"/>
</a>
<a href="https://www.easywebadv.it/" style="width:100px">
<img src="website/static/img/easyweb.png" width="100"/>
</a>
<br/>
<br/>
<a href="https://github.com/matryer" style="width:100px">
@@ -192,8 +188,8 @@
<a href="https://github.com/DonTomato" style="width:45px">
<img src="https://github.com/DonTomato.png?size=45" width="45"/>
</a>
<a href="https://github.com/taigrr" style="width:45px">
<img src="https://github.com/taigrr.png?size=45" width="45"/>
<a href="https://github.com/taigrr" style="width:55px">
<img src="https://github.com/taigrr.png?size=55" width="55"/>
</a>
<a href="https://github.com/charlie-dee" style="width:55px">
<img src="https://github.com/charlie-dee.png?size=55" width="55"/>
-10
View File
@@ -148,16 +148,6 @@ func (fs *FSHelper) LocalDir(dir string) (*Dir, error) {
}, err
}
// LoadRelativeFile loads the given file relative to the caller's directory
func (fs *FSHelper) LoadRelativeFile(relativePath string) ([]byte, error) {
_, filename, _, _ := runtime.Caller(0)
fullPath, err := filepath.Abs(filepath.Join(path.Dir(filename), relativePath))
if err != nil {
return nil, err
}
return os.ReadFile(fullPath)
}
// GetSubdirs will return a list of FQPs to subdirectories in the given directory
func (d *Dir) GetSubdirs() (map[string]string, error) {
+4
View File
@@ -74,6 +74,8 @@ const (
NixOS
// Artix linux distribution
ArtixLinux
//Uos distribution
Uos
)
// DistroInfo contains all the information relating to a linux distribution
@@ -190,6 +192,8 @@ func parseOsRelease(osRelease string) *DistroInfo {
result.Distribution = NixOS
case "artix":
result.Distribution = ArtixLinux
case "uos":
result.Distribution = Uos
default:
result.Distribution = Unknown
}
+5 -5
View File
@@ -1,11 +1,15 @@
package cmd
import (
_ "embed"
"log"
"gopkg.in/yaml.v3"
)
//go:embed linuxdb.yaml
var LinuxDBYaml []byte
// LinuxDB is the database for linux distribution data.
type LinuxDB struct {
Distributions map[string]*Distribution `yaml:"distributions"`
@@ -78,14 +82,10 @@ func (l *LinuxDB) GetDistro(distro string) *Distribution {
// NewLinuxDB creates a new LinuxDB instance from the bundled
// linuxdb.yaml file.
func NewLinuxDB() *LinuxDB {
data, err := fs.LoadRelativeFile("./linuxdb.yaml")
if err != nil {
log.Fatal("Could not load linuxdb.yaml")
}
result := LinuxDB{
Distributions: make(map[string]*Distribution),
}
err = result.ImportData(data)
err := result.ImportData(LinuxDBYaml)
if err != nil {
log.Fatal(err)
}
+9
View File
@@ -100,6 +100,15 @@ distributions:
gccversioncommand: *gccdumpfullversion
programs: *debiandefaultprograms
libraries: *debiandefaultlibraries
uos:
id: uos
releases:
default:
version: default
name: Uos
gccversioncommand: *gccdumpfullversion
programs: *debiandefaultprograms
libraries: *debiandefaultlibraries
void:
id: void
releases:
+1 -1
View File
@@ -278,7 +278,7 @@ func CheckDependencies(logger *Logger) (bool, error) {
distroInfo := GetLinuxDistroInfo()
switch distroInfo.Distribution {
case Ubuntu, Debian, Zorin, Parrot, Linuxmint, Elementary, Kali, Neon, Deepin, Raspbian, PopOS:
case Ubuntu, Debian, Zorin, Parrot, Linuxmint, Elementary, Kali, Neon, Deepin, Raspbian, PopOS, Uos:
libraryChecker = DpkgInstalled
case Arch, ArcoLinux, ArchLabs, Ctlos, Manjaro, ManjaroARM, EndeavourOS, ArtixLinux:
libraryChecker = PacmanInstalled

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

+166 -67
View File
@@ -11,11 +11,13 @@ import (
"text/tabwriter"
"time"
"github.com/wailsapp/wails/v2/internal/colour"
"github.com/wailsapp/wails/v2/internal/project"
"github.com/wailsapp/wails/v2/internal/system"
"github.com/wailsapp/wails/v2/cmd/wails/internal"
"github.com/wailsapp/wails/v2/internal/gomod"
"github.com/wailsapp/wails/v2/internal/system"
"github.com/leaanthony/clir"
"github.com/leaanthony/slicer"
"github.com/wailsapp/wails/v2/pkg/clilogger"
@@ -48,8 +50,14 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
command.StringFlag("upxflags", "Flags to pass to upx", &compressFlags)
// Setup Platform flag
platform := runtime.GOOS
command.StringFlag("platform", "Platform to target", &platform)
platform := runtime.GOOS + "/"
if system.IsAppleSilicon {
platform += "arm64"
} else {
platform += runtime.GOARCH
}
command.StringFlag("platform", "Platform to target. Comma separate multiple platforms", &platform)
// Verbosity
verbosity := 1
@@ -79,6 +87,12 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
forceBuild := false
command.BoolFlag("f", "Force build application", &forceBuild)
updateGoMod := false
command.BoolFlag("u", "Updates go.mod to use the same Wails version as the CLI", &updateGoMod)
debug := false
command.BoolFlag("debug", "Retains debug data in the compiled application", &debug)
command.Action(func() error {
quiet := verbosity == 0
@@ -96,28 +110,6 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
app.PrintBanner()
}
// Check platform
validPlatformArch := slicer.String([]string{
"darwin",
"darwin/amd64",
"darwin/arm64",
"darwin/universal",
"linux",
//"linux/amd64",
//"linux/arm-7",
"windows",
"windows/amd64",
"windows/arm64",
})
if !validPlatformArch.Contains(platform) {
return fmt.Errorf("platform %s is not supported. Platforms supported: %s", platform, validPlatformArch.Join(","))
}
if compress && platform == "darwin/universal" {
logger.Println("Warning: compress flag unsupported for universal binaries. Ignoring.")
compress = false
}
// Lookup compiler path
compilerPath, err := exec.LookPath(compilerCommand)
if err != nil {
@@ -160,13 +152,24 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
}
}
mode := build.Production
modeString := "Production"
if debug {
mode = build.Debug
modeString = "Debug"
}
var targets slicer.StringSlicer
targets.AddSlice(strings.Split(platform, ","))
targets.Deduplicate()
// Create BuildOptions
buildOptions := &build.Options{
Logger: logger,
OutputType: outputType,
OutputFile: outputFilename,
CleanBuildDirectory: cleanBuildDirectory,
Mode: build.Production,
Mode: mode,
Pack: !noPackage,
LDFlags: ldflags,
Compiler: compilerCommand,
@@ -180,70 +183,136 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
WebView2Strategy: wv2rtstrategy,
}
// Calculate platform and arch
platformSplit := strings.Split(platform, "/")
buildOptions.Platform = platformSplit[0]
if system.IsAppleSilicon {
buildOptions.Arch = "arm64"
} else {
buildOptions.Arch = runtime.GOARCH
}
if len(platformSplit) == 2 {
buildOptions.Arch = platformSplit[1]
}
// Start a new tabwriter
w := new(tabwriter.Writer)
w.Init(os.Stdout, 8, 8, 0, '\t', 0)
// Write out the system information
fmt.Fprintf(w, "\n")
fmt.Fprintf(w, "App Type: \t%s\n", buildOptions.OutputType)
fmt.Fprintf(w, "Platform: \t%s\n", buildOptions.Platform)
fmt.Fprintf(w, "Arch: \t%s\n", buildOptions.Arch)
fmt.Fprintf(w, "Platforms: \t%s\n", platform)
fmt.Fprintf(w, "Compiler: \t%s\n", compilerPath)
fmt.Fprintf(w, "Build Mode: \t%s\n", modeString)
fmt.Fprintf(w, "Skip Frontend: \t%t\n", skipFrontend)
fmt.Fprintf(w, "Compress: \t%t\n", buildOptions.Compress)
fmt.Fprintf(w, "Package: \t%t\n", buildOptions.Pack)
fmt.Fprintf(w, "Clean Build Dir: \t%t\n", buildOptions.CleanBuildDirectory)
fmt.Fprintf(w, "LDFlags: \t\"%s\"\n", buildOptions.LDFlags)
fmt.Fprintf(w, "Tags: \t[%s]\n", strings.Join(buildOptions.UserTags, ","))
if len(buildOptions.OutputFile) > 0 {
if len(buildOptions.OutputFile) > 0 && targets.Length() == 1 {
fmt.Fprintf(w, "Output File: \t%s\n", buildOptions.OutputFile)
}
fmt.Fprintf(w, "\n")
w.Flush()
err = checkGoModVersion(logger)
err = checkGoModVersion(logger, updateGoMod)
if err != nil {
return err
}
return doBuild(buildOptions)
cwd, err := os.Getwd()
if err != nil {
return err
}
projectOptions, err := project.Load(cwd)
// Check platform
validPlatformArch := slicer.String([]string{
"darwin",
"darwin/amd64",
"darwin/arm64",
"darwin/universal",
"linux",
"linux/amd64",
"linux/arm64",
"windows",
"windows/amd64",
"windows/arm64",
})
targets.Each(func(platform string) {
if !validPlatformArch.Contains(platform) {
buildOptions.Logger.Println("platform '%s' is not supported - skipping. Supported platforms: %s", platform, validPlatformArch.Join(","))
return
}
desiredFilename := projectOptions.OutputFilename
if desiredFilename == "" {
desiredFilename = projectOptions.Name
}
desiredFilename = strings.TrimSuffix(desiredFilename, ".exe")
// Calculate platform and arch
platformSplit := strings.Split(platform, "/")
buildOptions.Platform = platformSplit[0]
if system.IsAppleSilicon {
buildOptions.Arch = "arm64"
} else {
buildOptions.Arch = runtime.GOARCH
}
if len(platformSplit) == 2 {
buildOptions.Arch = platformSplit[1]
}
banner := "Building target: " + platform
logger.Println(banner)
logger.Println(strings.Repeat("-", len(banner)))
if compress && platform == "darwin/universal" {
logger.Println("Warning: compress flag unsupported for universal binaries. Ignoring.")
compress = false
}
switch buildOptions.Platform {
case "darwin":
if runtime.GOOS != "darwin" {
logger.Println("Crosscompiling to Mac not currently supported.\n")
return
}
macTargets := targets.Filter(func(platform string) bool {
return strings.HasPrefix(platform, "darwin")
})
if macTargets.Length() == 2 {
buildOptions.BundleName = fmt.Sprintf("%s-%s.app", desiredFilename, buildOptions.Arch)
}
}
if targets.Length() > 1 {
// target filename
switch buildOptions.Platform {
case "windows":
desiredFilename = fmt.Sprintf("%s-%s", desiredFilename, buildOptions.Arch)
case "linux", "darwin":
desiredFilename = fmt.Sprintf("%s-%s-%s", desiredFilename, buildOptions.Platform, buildOptions.Arch)
}
}
if buildOptions.Platform == "windows" {
desiredFilename += ".exe"
}
buildOptions.OutputFile = desiredFilename
// Start Time
start := time.Now()
outputFilename, err := build.Build(buildOptions)
if err != nil {
logger.Println("Error: ", err.Error())
return
}
// Subsequent iterations
buildOptions.IgnoreFrontend = true
buildOptions.CleanBuildDirectory = false
// Output stats
buildOptions.Logger.Println(fmt.Sprintf("Built '%s' in %s.\n", outputFilename, time.Since(start).Round(time.Millisecond).String()))
})
return nil
})
}
// doBuild is our main build command
func doBuild(buildOptions *build.Options) error {
// Start Time
start := time.Now()
outputFilename, err := build.Build(buildOptions)
if err != nil {
return err
}
// Output stats
elapsed := time.Since(start)
buildOptions.Logger.Println("")
buildOptions.Logger.Println(fmt.Sprintf("Built '%s' in %s.", outputFilename, elapsed.Round(time.Millisecond).String()))
buildOptions.Logger.Println("")
return nil
}
func checkGoModVersion(logger *clilogger.CLILogger) error {
func checkGoModVersion(logger *clilogger.CLILogger, updateGoMod bool) error {
cwd, err := os.Getwd()
if err != nil {
return err
@@ -265,6 +334,36 @@ func checkGoModVersion(logger *clilogger.CLILogger) error {
return err
}
logger.Println("Warning: go.mod is using Wails '%s' but the CLI is '%s'. Consider updating it.\n", gomodversion.String(), internal.Version)
if updateGoMod {
return syncGoModVersion(cwd)
}
logger.Println("Warning: go.mod is using Wails '%s' but the CLI is '%s'. Consider updating your project's `go.mod` file.\n", gomodversion.String(), internal.Version)
return nil
}
func LogGreen(message string, args ...interface{}) {
text := fmt.Sprintf(message, args...)
println(colour.Green(text))
}
func syncGoModVersion(cwd string) error {
gomodFilename := filepath.Join(cwd, "go.mod")
gomodData, err := os.ReadFile(gomodFilename)
if err != nil {
return err
}
outOfSync, err := gomod.GoModOutOfSync(gomodData, internal.Version)
if err != nil {
return err
}
if !outOfSync {
return nil
}
LogGreen("Updating go.mod to use Wails '%s'", internal.Version)
newGoData, err := gomod.UpdateGoModVersion(gomodData, internal.Version)
if err != nil {
return err
}
return os.WriteFile(gomodFilename, newGoData, 0755)
}
@@ -16,8 +16,7 @@ window.greet = function () {
};
nameElement.onkeydown = function (e) {
console.log(e)
if (e.keyCode == 13) {
window.greet()
if (e.code === "Enter") {
window.greet();
}
}
};
+1 -1
View File
@@ -1,3 +1,3 @@
package internal
var Version = "v2.0.0-beta.27"
var Version = "v2.0.0-beta.30"
+30 -12
View File
@@ -7,27 +7,27 @@ require (
github.com/fatih/structtag v1.2.0
github.com/flytam/filenamify v1.0.0
github.com/fsnotify/fsnotify v1.4.9
github.com/fsouza/go-dockerclient v1.7.8
github.com/gabriel-vasile/mimetype v1.3.1
github.com/go-git/go-billy/v5 v5.2.0 // indirect
github.com/go-git/go-git/v5 v5.3.0
github.com/gofiber/fiber/v2 v2.17.0
github.com/gofiber/websocket/v2 v2.0.8
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/google/uuid v1.1.2 // indirect
github.com/gorilla/websocket v1.4.1
github.com/google/uuid v1.2.0 // indirect
github.com/gorilla/websocket v1.4.2
github.com/imdario/mergo v0.3.12
github.com/jackmordaunt/icns v1.0.0
github.com/leaanthony/clir v1.0.4
github.com/leaanthony/debme v1.2.1
github.com/leaanthony/go-ansi-parser v1.0.1
github.com/leaanthony/go-common-file-dialog v1.0.3
github.com/leaanthony/go-webview2 v1.0.2
github.com/leaanthony/go-webview2 v1.0.3-0.20220125181555-00f20a61c17d
github.com/leaanthony/gosod v1.0.3
github.com/leaanthony/idgen v1.0.0
github.com/leaanthony/slicer v1.5.0
github.com/leaanthony/typescriptify-golang-structs v0.1.7
github.com/leaanthony/winc v0.0.0-20211202091710-9931d43181ff
github.com/leaanthony/winc v0.0.0-20220208061147-37b059b9dc3b
github.com/leaanthony/winicon v1.0.0
github.com/matryer/is v1.4.0
github.com/olekukonko/tablewriter v0.0.4
@@ -40,21 +40,29 @@ require (
github.com/tidwall/sjson v1.1.7
github.com/wzshiming/ctc v1.2.3
github.com/ztrue/tracerr v0.3.0
golang.org/x/mod v0.4.1
golang.org/x/net v0.0.0-20210510120150-4163338589ed
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
golang.org/x/tools v0.1.0
golang.org/x/mod v0.4.2
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9
golang.org/x/tools v0.1.5
nhooyr.io/websocket v1.8.6
)
require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Microsoft/hcsshim v0.9.2 // indirect
github.com/andybalholm/brotli v1.0.2 // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/containerd/containerd v1.6.0 // indirect
github.com/docker/docker v20.10.12+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/fasthttp/websocket v0.0.0-20200320073529-1554a54587ab // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
@@ -63,9 +71,17 @@ require (
github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e // indirect
github.com/mattn/go-runewidth v0.0.7 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/sys/mount v0.2.0 // indirect
github.com/moby/sys/mountinfo v0.5.0 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.0 // indirect
github.com/savsgio/gotils v0.0.0-20200117113501-90175b0fbe3f // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/tidwall/gjson v1.8.0 // indirect
github.com/tidwall/match v1.0.3 // indirect
github.com/tidwall/pretty v1.1.0 // indirect
@@ -75,8 +91,10 @@ require (
github.com/valyala/tcplisten v1.0.0 // indirect
github.com/wzshiming/winseq v0.0.0-20200112104235-db357dc107ae // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/image v0.0.0-20201208152932-35266b937fa6 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gotest.tools/v3 v3.1.0 // indirect
)
+1332 -21
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -1,4 +1,5 @@
//go:build darwin && !bindings
// +build darwin,!bindings
package appng
+8
View File
@@ -0,0 +1,8 @@
//go:build debug
// +build debug
package appng
func IsDebug() bool {
return true
}
+2 -12
View File
@@ -1,4 +1,5 @@
//go:build !dev && !production && !bindings && darwin
// +build !dev,!production,!bindings,darwin
package appng
@@ -17,16 +18,5 @@ func (a *App) Run() error {
// CreateApp creates the app!
func CreateApp(_ *options.App) (*App, error) {
// result := w32.MessageBox(0,
// `Wails applications will not build without the correct build tags.
//Please use "wails build" or press "OK" to open the documentation on how to use "go build"`,
// "Error",
// w32.MB_ICONERROR|w32.MB_OKCANCEL)
// if result == 1 {
// exec.Command("rundll32", "url.dll,FileProtocolHandler", "https://wails.io").Start()
// }
err := fmt.Errorf(`Wails applications will not build without the correct build tags.`)
return nil, err
return nil, fmt.Errorf(`Wails applications will not build without the correct build tags.`)
}
+2 -12
View File
@@ -1,4 +1,5 @@
//go:build !dev && !production && !bindings && linux
// +build !dev,!production,!bindings,linux
package appng
@@ -17,16 +18,5 @@ func (a *App) Run() error {
// CreateApp creates the app!
func CreateApp(_ *options.App) (*App, error) {
// result := w32.MessageBox(0,
// `Wails applications will not build without the correct build tags.
//Please use "wails build" or press "OK" to open the documentation on how to use "go build"`,
// "Error",
// w32.MB_ICONERROR|w32.MB_OKCANCEL)
// if result == 1 {
// exec.Command("rundll32", "url.dll,FileProtocolHandler", "https://wails.io").Start()
// }
err := fmt.Errorf(`Wails applications will not build without the correct build tags.`)
return nil, err
return nil, fmt.Errorf(`Wails applications will not build without the correct build tags.`)
}
+1
View File
@@ -1,4 +1,5 @@
//go:build !dev && !production && !bindings && windows
// +build !dev,!production,!bindings,windows
package appng

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