mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 06:01:48 +08:00
Develop (#634)
* v1.10.1 * Fix vue template dependencies versions (fixes #574) (#576) * resolve angular routing broken when app is built * Revert "resolve angular routing broken when app is built" This reverts commite0aab7c27f
. * Update issue templates * v1.8.1 (#546) * resolve angular routing broken when app is built * Updated contributors * handle Set error on Update method * Remove incorrect build flag * v1.8.1-pre1 * added Get method * fixed return * implement gopath handling during cross compilation * update messages to output xgo version TODO: allow image override * use wailsapp/xgo:1.0.1 for cross-compiling * Support platform list in templates * Add warnings for windows builds * add fields Tags to ProjectOptions * add args tags to func BuildNative * add tags to func BuildDocker * delete escape tags * Update Contributors * feat: Vue3, Vue Router, Vuex, and Typescript Template * converted spaces to tabs in vue.config.js * single quotes and tabs Converted vue.config.js to using single quotes Converted example.spec.ts to tabs instead of spaces. * Added semicolons and mocha import * Update contributors * Make vue 3 template linux/mac only * Add tags to build * Add v2 artefacts * Update Vuetify in package.json (#537) * Update contributors * Replaced the old v-content tag with the new v-main (#536) * v1.8.1-pre4 * v1.8.1-pre5 * Update issue templates (#541) * Updated Contributors * Remove zero copy string conversion * v1.8.1-pre6 * Initial support for firebug (#543) * Initial support for firebug * Remove windows message * v1.8.1-pre7 * Update contributors * Allow use of custom HTML * Allow use of custom HTML (#545) * v1.8.1 Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> * v1.10.1 (#572) * fix dependencies versions Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> * v1.11.0-rc1 * v1.11.0-pre1 * Bump ini from 1.3.5 to 1.3.8 in /runtime/js/runtime (#575) * resolve angular routing broken when app is built * Revert "resolve angular routing broken when app is built" This reverts commite0aab7c27f
. * Update issue templates * v1.8.1 (#546) * resolve angular routing broken when app is built * Updated contributors * handle Set error on Update method * Remove incorrect build flag * v1.8.1-pre1 * added Get method * fixed return * implement gopath handling during cross compilation * update messages to output xgo version TODO: allow image override * use wailsapp/xgo:1.0.1 for cross-compiling * Support platform list in templates * Add warnings for windows builds * add fields Tags to ProjectOptions * add args tags to func BuildNative * add tags to func BuildDocker * delete escape tags * Update Contributors * feat: Vue3, Vue Router, Vuex, and Typescript Template * converted spaces to tabs in vue.config.js * single quotes and tabs Converted vue.config.js to using single quotes Converted example.spec.ts to tabs instead of spaces. * Added semicolons and mocha import * Update contributors * Make vue 3 template linux/mac only * Add tags to build * Add v2 artefacts * Update Vuetify in package.json (#537) * Update contributors * Replaced the old v-content tag with the new v-main (#536) * v1.8.1-pre4 * v1.8.1-pre5 * Update issue templates (#541) * Updated Contributors * Remove zero copy string conversion * v1.8.1-pre6 * Initial support for firebug (#543) * Initial support for firebug * Remove windows message * v1.8.1-pre7 * Update contributors * Allow use of custom HTML * Allow use of custom HTML (#545) * v1.8.1 Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> * v1.10.1 (#572) * Bump ini from 1.3.5 to 1.3.8 in /runtime/js/runtime Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ini from 1.3.5 to 1.3.8 in /runtime/js (#573) * resolve angular routing broken when app is built * Revert "resolve angular routing broken when app is built" This reverts commite0aab7c27f
. * Update issue templates * v1.8.1 (#546) * resolve angular routing broken when app is built * Updated contributors * handle Set error on Update method * Remove incorrect build flag * v1.8.1-pre1 * added Get method * fixed return * implement gopath handling during cross compilation * update messages to output xgo version TODO: allow image override * use wailsapp/xgo:1.0.1 for cross-compiling * Support platform list in templates * Add warnings for windows builds * add fields Tags to ProjectOptions * add args tags to func BuildNative * add tags to func BuildDocker * delete escape tags * Update Contributors * feat: Vue3, Vue Router, Vuex, and Typescript Template * converted spaces to tabs in vue.config.js * single quotes and tabs Converted vue.config.js to using single quotes Converted example.spec.ts to tabs instead of spaces. * Added semicolons and mocha import * Update contributors * Make vue 3 template linux/mac only * Add tags to build * Add v2 artefacts * Update Vuetify in package.json (#537) * Update contributors * Replaced the old v-content tag with the new v-main (#536) * v1.8.1-pre4 * v1.8.1-pre5 * Update issue templates (#541) * Updated Contributors * Remove zero copy string conversion * v1.8.1-pre6 * Initial support for firebug (#543) * Initial support for firebug * Remove windows message * v1.8.1-pre7 * Update contributors * Allow use of custom HTML * Allow use of custom HTML (#545) * v1.8.1 Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> * v1.10.1 (#572) * Bump ini from 1.3.5 to 1.3.8 in /runtime/js Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Remove debug info * v1.11.0-pre2 * Limit v1 updates to v1 * v1.11.0-pre3 * Test fix for linux high CPU usage * v1.11.0 * Add Pace to Thanks * Remove spec option in babel config (#593) * v1.12.0-pre1 * Update Contributors * Expose Once and OnMultiple * v1.12.0-pre2 * Fix potential nil conditions in webview * Fix issue with expired listeners * v1.12.0-pre3 * Don't manipulate listeners array when expired * add support for crux linux (#581) * Add support for Crux Linux (http://crux.nu) * Update linuxdb.yaml fix typo * Update linux.go fixed comment typo * Update linuxdb.yaml fixed more typos Co-authored-by: Lea Anthony <lea.anthony@gmail.com> * v1.12.0-pre4 * Update contributors * Put main window into focus after a dialog closes (#609) * v1.11.0 (#582) * v1.10.1 * Fix vue template dependencies versions (fixes #574) (#576) * resolve angular routing broken when app is built * Revert "resolve angular routing broken when app is built" This reverts commite0aab7c27f
. * Update issue templates * v1.8.1 (#546) * resolve angular routing broken when app is built * Updated contributors * handle Set error on Update method * Remove incorrect build flag * v1.8.1-pre1 * added Get method * fixed return * implement gopath handling during cross compilation * update messages to output xgo version TODO: allow image override * use wailsapp/xgo:1.0.1 for cross-compiling * Support platform list in templates * Add warnings for windows builds * add fields Tags to ProjectOptions * add args tags to func BuildNative * add tags to func BuildDocker * delete escape tags * Update Contributors * feat: Vue3, Vue Router, Vuex, and Typescript Template * converted spaces to tabs in vue.config.js * single quotes and tabs Converted vue.config.js to using single quotes Converted example.spec.ts to tabs instead of spaces. * Added semicolons and mocha import * Update contributors * Make vue 3 template linux/mac only * Add tags to build * Add v2 artefacts * Update Vuetify in package.json (#537) * Update contributors * Replaced the old v-content tag with the new v-main (#536) * v1.8.1-pre4 * v1.8.1-pre5 * Update issue templates (#541) * Updated Contributors * Remove zero copy string conversion * v1.8.1-pre6 * Initial support for firebug (#543) * Initial support for firebug * Remove windows message * v1.8.1-pre7 * Update contributors * Allow use of custom HTML * Allow use of custom HTML (#545) * v1.8.1 Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> * v1.10.1 (#572) * fix dependencies versions Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> * v1.11.0-rc1 * v1.11.0-pre1 * Bump ini from 1.3.5 to 1.3.8 in /runtime/js/runtime (#575) * resolve angular routing broken when app is built * Revert "resolve angular routing broken when app is built" This reverts commite0aab7c27f
. * Update issue templates * v1.8.1 (#546) * resolve angular routing broken when app is built * Updated contributors * handle Set error on Update method * Remove incorrect build flag * v1.8.1-pre1 * added Get method * fixed return * implement gopath handling during cross compilation * update messages to output xgo version TODO: allow image override * use wailsapp/xgo:1.0.1 for cross-compiling * Support platform list in templates * Add warnings for windows builds * add fields Tags to ProjectOptions * add args tags to func BuildNative * add tags to func BuildDocker * delete escape tags * Update Contributors * feat: Vue3, Vue Router, Vuex, and Typescript Template * converted spaces to tabs in vue.config.js * single quotes and tabs Converted vue.config.js to using single quotes Converted example.spec.ts to tabs instead of spaces. * Added semicolons and mocha import * Update contributors * Make vue 3 template linux/mac only * Add tags to build * Add v2 artefacts * Update Vuetify in package.json (#537) * Update contributors * Replaced the old v-content tag with the new v-main (#536) * v1.8.1-pre4 * v1.8.1-pre5 * Update issue templates (#541) * Updated Contributors * Remove zero copy string conversion * v1.8.1-pre6 * Initial support for firebug (#543) * Initial support for firebug * Remove windows message * v1.8.1-pre7 * Update contributors * Allow use of custom HTML * Allow use of custom HTML (#545) * v1.8.1 Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> * v1.10.1 (#572) * Bump ini from 1.3.5 to 1.3.8 in /runtime/js/runtime Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ini from 1.3.5 to 1.3.8 in /runtime/js (#573) * resolve angular routing broken when app is built * Revert "resolve angular routing broken when app is built" This reverts commite0aab7c27f
. * Update issue templates * v1.8.1 (#546) * resolve angular routing broken when app is built * Updated contributors * handle Set error on Update method * Remove incorrect build flag * v1.8.1-pre1 * added Get method * fixed return * implement gopath handling during cross compilation * update messages to output xgo version TODO: allow image override * use wailsapp/xgo:1.0.1 for cross-compiling * Support platform list in templates * Add warnings for windows builds * add fields Tags to ProjectOptions * add args tags to func BuildNative * add tags to func BuildDocker * delete escape tags * Update Contributors * feat: Vue3, Vue Router, Vuex, and Typescript Template * converted spaces to tabs in vue.config.js * single quotes and tabs Converted vue.config.js to using single quotes Converted example.spec.ts to tabs instead of spaces. * Added semicolons and mocha import * Update contributors * Make vue 3 template linux/mac only * Add tags to build * Add v2 artefacts * Update Vuetify in package.json (#537) * Update contributors * Replaced the old v-content tag with the new v-main (#536) * v1.8.1-pre4 * v1.8.1-pre5 * Update issue templates (#541) * Updated Contributors * Remove zero copy string conversion * v1.8.1-pre6 * Initial support for firebug (#543) * Initial support for firebug * Remove windows message * v1.8.1-pre7 * Update contributors * Allow use of custom HTML * Allow use of custom HTML (#545) * v1.8.1 Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> * v1.10.1 (#572) * Bump ini from 1.3.5 to 1.3.8 in /runtime/js Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Lea Anthony <lea.anthony@gmail.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Remove debug info * v1.11.0-pre2 * Limit v1 updates to v1 * v1.11.0-pre3 * Test fix for linux high CPU usage * v1.11.0 Co-authored-by: Elie Grenon (DrunkenPoney) <elie.grenon.1@gmail.com> Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add Pace to Thanks * Redo thanks section * Put main window into focus after dialogs close * Update CONTRIBUTORS.md * v1.12.0-pre5 * update scripts/build.sh to run test only on v1 * fix: typo in comment (#627) * feat(cli): use gitconfig name as name prompt default value * Add hi019 to CONTRIBUTORS * v1.12.0-pre6 * v1.12.0 * fix(cli): use npm run serve as serve command in all templates (#635) * Fix typo in webview.h * v1.12.1 Co-authored-by: Elie Grenon (DrunkenPoney) <elie.grenon.1@gmail.com> Co-authored-by: Arthur Wiebe <arthur@artooro.com> Co-authored-by: Ilgıt Yıldırım <ilgit.yildirim@triplebits.com> Co-authored-by: Travis McLane <tmclane@gmail.com> Co-authored-by: Altynbek <go.gelleson@gmail.com> Co-authored-by: Kyle Muchmore <kyle.muchmore@kickview.com> Co-authored-by: Balakrishna Prasad Ganne <balkripra.1996@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sophie Au <SophieAu@users.noreply.github.com> Co-authored-by: Alexander Matviychuk <githubcom@huskmail.com> Co-authored-by: RH12503 <48951973+RH12503@users.noreply.github.com> Co-authored-by: hi019 <65871571+hi019@users.noreply.github.com>
This commit is contained in:
parent
8ddc3e9527
commit
97e6ef7894
@ -40,4 +40,9 @@ Wails is what it is because of the time and effort given by these great people.
|
||||
* [Balakrishna Prasad Ganne](https://github.com/aayush420)
|
||||
* [Charaf Rezrazi](https://github.com/Rezrazi)
|
||||
* [misitebao](https://github.com/misitebao)
|
||||
* [Elie Grenon](https://github.com/DrunkenPoney)
|
||||
* [Elie Grenon](https://github.com/DrunkenPoney)
|
||||
* [SophieAu](https://github.com/SophieAu)
|
||||
* [Alexander Matviychuk](https://github.com/alexmat)
|
||||
* [RH12503](https://github.com/RH12503)
|
||||
* [hi019](https://github.com/hi019)
|
||||
|
@ -595,3 +595,9 @@ func ldFlags(po *ProjectOptions, buildMode string) string {
|
||||
}
|
||||
return ldflags
|
||||
}
|
||||
|
||||
func getGitConfigValue(key string) (string, error) {
|
||||
output, err := exec.Command("git", "config", "--get", "--null", key).Output()
|
||||
// When using --null git appends a null character (\u0000) to the command output
|
||||
return strings.TrimRight(string(output), "\u0000"), err
|
||||
}
|
||||
|
15
cmd/linux.go
15
cmd/linux.go
@ -67,6 +67,8 @@ const (
|
||||
Ctlos
|
||||
// EndeavourOS linux distribution
|
||||
EndeavourOS
|
||||
// Crux linux distribution
|
||||
Crux
|
||||
)
|
||||
|
||||
// DistroInfo contains all the information relating to a linux distribution
|
||||
@ -175,6 +177,8 @@ func parseOsRelease(osRelease string) *DistroInfo {
|
||||
result.Distribution = Solus
|
||||
case "endeavouros":
|
||||
result.Distribution = EndeavourOS
|
||||
case "crux":
|
||||
result.Distribution = Crux
|
||||
default:
|
||||
result.Distribution = Unknown
|
||||
}
|
||||
@ -255,6 +259,17 @@ func RpmInstalled(packageName string) (bool, error) {
|
||||
return exitCode == 0, nil
|
||||
}
|
||||
|
||||
// PrtGetInstalled uses prt-get to see if a package is installed
|
||||
func PrtGetInstalled(packageName string) (bool, error) {
|
||||
program := NewProgramHelper()
|
||||
prtget := program.FindProgram("prt-get")
|
||||
if prtget == nil {
|
||||
return false, fmt.Errorf("cannot check dependencies: prt-get not found")
|
||||
}
|
||||
_, _, exitCode, _ := prtget.Run("isinst", packageName)
|
||||
return exitCode == 0, nil
|
||||
}
|
||||
|
||||
// RequestSupportForDistribution promts the user to submit a request to support their
|
||||
// currently unsupported distribution
|
||||
func RequestSupportForDistribution(distroInfo *DistroInfo) error {
|
||||
|
@ -307,3 +307,22 @@ distributions:
|
||||
gccversioncommand: *gccdumpfullversion
|
||||
programs: *opensusedefaultprograms
|
||||
libraries: *opensusedefaultlibraries
|
||||
crux:
|
||||
id: crux
|
||||
releases:
|
||||
default:
|
||||
version: default
|
||||
name: Crux Linux
|
||||
gccversioncommand: *gccdumpversion
|
||||
programs:
|
||||
- name: gcc
|
||||
help: Please install with `sudo prt-get depinst gcc-c++ make` and try again
|
||||
- name: pkg-config
|
||||
help: Please install with `sudo prt-get depinst pkg-config` and try again
|
||||
- name: npm
|
||||
help: Please install with `sudo prt-get depinst nodejs` and try again
|
||||
libraries:
|
||||
- name: gtk3
|
||||
help: Please install with `sudo prt-get depinst gtk3` and try again
|
||||
- name: webkitgtk
|
||||
help: Please install with `sudo prt-get depinst webkitgtk` and try again
|
||||
|
@ -99,11 +99,16 @@ func (s *SystemHelper) setup() error {
|
||||
|
||||
if config.Name != "" {
|
||||
systemConfig["name"] = PromptRequired("What is your name", config.Name)
|
||||
} else if n, err := getGitConfigValue("user.name"); err == nil && n != "" {
|
||||
systemConfig["name"] = PromptRequired("What is your name", n)
|
||||
} else {
|
||||
systemConfig["name"] = PromptRequired("What is your name")
|
||||
}
|
||||
|
||||
if config.Email != "" {
|
||||
systemConfig["email"] = PromptRequired("What is your email address", config.Email)
|
||||
} else if e, err := getGitConfigValue("user.email"); err == nil && e != "" {
|
||||
systemConfig["email"] = PromptRequired("What is your email address", e)
|
||||
} else {
|
||||
systemConfig["email"] = PromptRequired("What is your email address")
|
||||
}
|
||||
@ -180,7 +185,7 @@ func (s *SystemHelper) Initialise() error {
|
||||
return s.setup()
|
||||
}
|
||||
|
||||
// SystemConfig - Defines system wode configuration data
|
||||
// SystemConfig - Defines system wide configuration data
|
||||
type SystemConfig struct {
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
@ -286,6 +291,8 @@ func CheckDependencies(logger *Logger) (bool, error) {
|
||||
libraryChecker = XbpsInstalled
|
||||
case Solus:
|
||||
libraryChecker = EOpkgInstalled
|
||||
case Crux:
|
||||
libraryChecker = PrtGetInstalled
|
||||
default:
|
||||
return false, RequestSupportForDistribution(distroInfo)
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "npx ng",
|
||||
"start": "npx ng serve --poll=2000 --host=0.0.0.0",
|
||||
"serve": "npx ng serve --poll=2000 --host=0.0.0.0",
|
||||
"build": "npx ng build --single-bundle true --output-hashing none --prod --bundle-styles false",
|
||||
"test": "npx ng test",
|
||||
"lint": "npx ng lint",
|
||||
|
@ -14,7 +14,7 @@
|
||||
"author": "bh90210 <ktc@pm.me>",
|
||||
"created": "2019-06-15 18:23:48.666414555 +0300 EEST m=+223.934866008",
|
||||
"frontenddir": "frontend",
|
||||
"serve": "npx ng serve --poll=2000",
|
||||
"serve": "npm run serve",
|
||||
"bridge": "src",
|
||||
"wailsdir": ""
|
||||
}
|
@ -12,7 +12,7 @@
|
||||
"@wailsapp/runtime": "^1.0.10"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"serve": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
|
@ -8,7 +8,7 @@
|
||||
"author": "bh90210 <ktc@pm.me>",
|
||||
"created": "2019-06-07 18:23:48.666414555 +0300 EEST m=+223.934866008",
|
||||
"frontenddir": "frontend",
|
||||
"serve": "npm run start",
|
||||
"serve": "npm run serve",
|
||||
"bridge": "src",
|
||||
"wailsdir": ""
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"author": "{{.Author.Name}}<{{.Author.Email}}>",
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -c -w",
|
||||
"serve": "rollup -c -w",
|
||||
"start": "sirv public"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -80,7 +80,6 @@ export default {
|
||||
{
|
||||
targets: '> 0.25%, not dead, IE 11',
|
||||
modules: false,
|
||||
spec: true,
|
||||
useBuiltIns: 'usage',
|
||||
forceAllTransforms: true,
|
||||
corejs: 3,
|
||||
|
@ -8,7 +8,7 @@
|
||||
"author": "Tim Kipp <timkipp.22.developer@gmail.com>",
|
||||
"created": "2020-09-06 13:06:10.469848 -0700 PDT m=+213.578828559",
|
||||
"frontenddir": "frontend",
|
||||
"serve": "npm run dev",
|
||||
"serve": "npm run serve",
|
||||
"bridge": "src",
|
||||
"wailsdir": ""
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cmd
|
||||
|
||||
// Version - Wails version
|
||||
const Version = "v1.11.0"
|
||||
const Version = "v1.12.1"
|
||||
|
@ -18,6 +18,7 @@ type Manager struct {
|
||||
log *logger.CustomLogger
|
||||
renderer interfaces.Renderer // Messages will be dispatched to the frontend
|
||||
wg sync.WaitGroup
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
// NewManager creates a new event manager with a 100 event buffer
|
||||
@ -42,12 +43,12 @@ func (e *Manager) PushEvent(eventData *messages.EventData) {
|
||||
// means it does not expire (default).
|
||||
type eventListener struct {
|
||||
callback func(...interface{}) // Function to call with emitted event data
|
||||
counter int // Expire after counter callbacks. 0 = infinite
|
||||
counter uint // Expire after counter callbacks. 0 = infinite
|
||||
expired bool // Indicates if the listener has expired
|
||||
}
|
||||
|
||||
// Creates a new event listener from the given callback function
|
||||
func (e *Manager) addEventListener(eventName string, callback func(...interface{}), counter int) error {
|
||||
func (e *Manager) addEventListener(eventName string, callback func(...interface{}), counter uint) error {
|
||||
|
||||
// Sanity check inputs
|
||||
if callback == nil {
|
||||
@ -75,7 +76,30 @@ func (e *Manager) addEventListener(eventName string, callback func(...interface{
|
||||
// On adds a listener for the given event
|
||||
func (e *Manager) On(eventName string, callback func(...interface{})) {
|
||||
// Add a persistent eventListener (counter = 0)
|
||||
e.addEventListener(eventName, callback, 0)
|
||||
err := e.addEventListener(eventName, callback, 0)
|
||||
if err != nil {
|
||||
e.log.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// Once adds a listener for the given event that will auto remove
|
||||
// after one callback
|
||||
func (e *Manager) Once(eventName string, callback func(...interface{})) {
|
||||
// Add a persistent eventListener (counter = 0)
|
||||
err := e.addEventListener(eventName, callback, 1)
|
||||
if err != nil {
|
||||
e.log.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// OnMultiple adds a listener for the given event that will trigger
|
||||
// at most <counter> times.
|
||||
func (e *Manager) OnMultiple(eventName string, callback func(...interface{}), counter uint) {
|
||||
// Add a persistent eventListener (counter = 0)
|
||||
err := e.addEventListener(eventName, callback, counter)
|
||||
if err != nil {
|
||||
e.log.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// Emit broadcasts the given event to the subscribed listeners
|
||||
@ -108,20 +132,24 @@ func (e *Manager) Start(renderer interfaces.Renderer) {
|
||||
})
|
||||
|
||||
// Notify renderer
|
||||
e.renderer.NotifyEvent(event)
|
||||
err := e.renderer.NotifyEvent(event)
|
||||
if err != nil {
|
||||
e.log.Error(err.Error())
|
||||
}
|
||||
|
||||
// Notify Go listeners
|
||||
var listenersToRemove []*eventListener
|
||||
e.mu.Lock()
|
||||
|
||||
// Iterate listeners
|
||||
for _, listener := range e.listeners[event.Name] {
|
||||
|
||||
// Call listener, perhaps with data
|
||||
if event.Data == nil {
|
||||
go listener.callback()
|
||||
} else {
|
||||
unpacked := event.Data.([]interface{})
|
||||
go listener.callback(unpacked...)
|
||||
if !listener.expired {
|
||||
// Call listener, perhaps with data
|
||||
if event.Data == nil {
|
||||
go listener.callback()
|
||||
} else {
|
||||
unpacked := event.Data.([]interface{})
|
||||
go listener.callback(unpacked...)
|
||||
}
|
||||
}
|
||||
|
||||
// Update listen counter
|
||||
@ -133,15 +161,8 @@ func (e *Manager) Start(renderer interfaces.Renderer) {
|
||||
}
|
||||
}
|
||||
|
||||
// Remove expired listeners in place
|
||||
if len(listenersToRemove) > 0 {
|
||||
listeners := e.listeners[event.Name][:0]
|
||||
for _, listener := range listeners {
|
||||
if !listener.expired {
|
||||
listeners = append(listeners, listener)
|
||||
}
|
||||
}
|
||||
}
|
||||
e.mu.Unlock()
|
||||
|
||||
case <-e.quitChannel:
|
||||
e.running = false
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ import "github.com/wailsapp/wails/lib/messages"
|
||||
type EventManager interface {
|
||||
PushEvent(*messages.EventData)
|
||||
Emit(eventName string, optionalData ...interface{})
|
||||
OnMultiple(eventName string, callback func(...interface{}), counter uint)
|
||||
Once(eventName string, callback func(...interface{}))
|
||||
On(eventName string, callback func(...interface{}))
|
||||
Start(Renderer)
|
||||
Shutdown()
|
||||
|
@ -256,6 +256,9 @@ func (w *WebView) SelectFile(title string, filter string) string {
|
||||
wg.Done()
|
||||
})
|
||||
}()
|
||||
|
||||
defer w.focus() // Ensure the main window is put back into focus afterwards
|
||||
|
||||
wg.Wait()
|
||||
return result
|
||||
}
|
||||
@ -274,6 +277,9 @@ func (w *WebView) SelectDirectory() string {
|
||||
wg.Done()
|
||||
})
|
||||
}()
|
||||
|
||||
defer w.focus() // Ensure the main window is put back into focus afterwards
|
||||
|
||||
wg.Wait()
|
||||
return result
|
||||
}
|
||||
@ -292,10 +298,20 @@ func (w *WebView) SelectSaveFile(title string, filter string) string {
|
||||
wg.Done()
|
||||
})
|
||||
}()
|
||||
|
||||
defer w.focus() // Ensure the main window is put back into focus afterwards
|
||||
|
||||
wg.Wait()
|
||||
return result
|
||||
}
|
||||
|
||||
// focus puts the main window into focus
|
||||
func (w *WebView) focus() {
|
||||
w.window.Dispatch(func() {
|
||||
w.window.Focus()
|
||||
})
|
||||
}
|
||||
|
||||
// callback sends a callback to the frontend
|
||||
func (w *WebView) callback(data string) error {
|
||||
callbackCMD := fmt.Sprintf("window.wails._.Callback('%s');", data)
|
||||
|
@ -65,6 +65,10 @@ static inline void CgoWebViewSetTitle(void *w, char *title) {
|
||||
webview_set_title((struct webview *)w, title);
|
||||
}
|
||||
|
||||
static inline void CgoWebViewFocus(void *w) {
|
||||
webview_focus((struct webview *)w);
|
||||
}
|
||||
|
||||
static inline void CgoWebViewSetFullscreen(void *w, int fullscreen) {
|
||||
webview_set_fullscreen((struct webview *)w, fullscreen);
|
||||
}
|
||||
@ -170,6 +174,10 @@ type WebView interface {
|
||||
// SetTitle() changes window title. This method must be called from the main
|
||||
// thread only. See Dispatch() for more details.
|
||||
SetTitle(title string)
|
||||
|
||||
// Focus() puts the main window into focus
|
||||
Focus()
|
||||
|
||||
// SetFullscreen() controls window full-screen mode. This method must be
|
||||
// called from the main thread only. See Dispatch() for more details.
|
||||
SetFullscreen(fullscreen bool)
|
||||
@ -307,6 +315,10 @@ func (w *webview) SetColor(r, g, b, a uint8) {
|
||||
C.CgoWebViewSetColor(w.w, C.uint8_t(r), C.uint8_t(g), C.uint8_t(b), C.uint8_t(a))
|
||||
}
|
||||
|
||||
func (w *webview) Focus() {
|
||||
C.CgoWebViewFocus(w.w)
|
||||
}
|
||||
|
||||
func (w *webview) SetFullscreen(fullscreen bool) {
|
||||
C.CgoWebViewSetFullscreen(w.w, C.int(boolToInt(fullscreen)))
|
||||
}
|
||||
@ -353,7 +365,9 @@ func _webviewDispatchGoCallback(index unsafe.Pointer) {
|
||||
f = fns[uintptr(index)]
|
||||
delete(fns, uintptr(index))
|
||||
m.Unlock()
|
||||
f()
|
||||
if f != nil {
|
||||
f()
|
||||
}
|
||||
}
|
||||
|
||||
//export _webviewExternalInvokeCallback
|
||||
@ -369,5 +383,7 @@ func _webviewExternalInvokeCallback(w unsafe.Pointer, data unsafe.Pointer) {
|
||||
}
|
||||
}
|
||||
m.Unlock()
|
||||
cb(wv, C.GoString((*C.char)(data)))
|
||||
if cb != nil {
|
||||
cb(wv, C.GoString((*C.char)(data)))
|
||||
}
|
||||
}
|
||||
|
@ -168,6 +168,7 @@ struct webview_priv
|
||||
WEBVIEW_API int webview_eval(struct webview *w, const char *js);
|
||||
WEBVIEW_API int webview_inject_css(struct webview *w, const char *css);
|
||||
WEBVIEW_API void webview_set_title(struct webview *w, const char *title);
|
||||
WEBVIEW_API void webview_focus(struct webview *w);
|
||||
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen);
|
||||
WEBVIEW_API void webview_set_color(struct webview *w, uint8_t r, uint8_t g,
|
||||
uint8_t b, uint8_t a);
|
||||
@ -396,6 +397,11 @@ struct webview_priv
|
||||
gtk_window_set_title(GTK_WINDOW(w->priv.window), title);
|
||||
}
|
||||
|
||||
WEBVIEW_API void webview_focus(struct webview *w)
|
||||
{
|
||||
gtk_window_present(GTK_WINDOW(w->priv.window));
|
||||
}
|
||||
|
||||
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)
|
||||
{
|
||||
if (fullscreen)
|
||||
@ -1641,6 +1647,11 @@ struct webview_priv
|
||||
#endif
|
||||
}
|
||||
|
||||
WEBVIEW_API void webview_focus(struct webview *w)
|
||||
{
|
||||
SetFocus(w->priv.hwnd);
|
||||
}
|
||||
|
||||
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)
|
||||
{
|
||||
if (w->priv.is_fullscreen == !!fullscreen)
|
||||
@ -2208,6 +2219,11 @@ struct webview_priv
|
||||
[w->priv.window setTitle:nsTitle];
|
||||
}
|
||||
|
||||
WEBVIEW_API void webview_focus(struct webview *w)
|
||||
{
|
||||
[w->priv.window makeKeyWindow];
|
||||
}
|
||||
|
||||
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)
|
||||
{
|
||||
int b = ((([w->priv.window styleMask] & NSWindowStyleMaskFullScreen) ==
|
||||
|
@ -19,6 +19,16 @@ func (r *Events) On(eventName string, callback func(optionalData ...interface{})
|
||||
r.eventManager.On(eventName, callback)
|
||||
}
|
||||
|
||||
// Once pass through
|
||||
func (r *Events) Once(eventName string, callback func(optionalData ...interface{})) {
|
||||
r.eventManager.Once(eventName, callback)
|
||||
}
|
||||
|
||||
// OnMultiple pass through
|
||||
func (r *Events) OnMultiple(eventName string, callback func(optionalData ...interface{}), counter uint) {
|
||||
r.eventManager.OnMultiple(eventName, callback, counter)
|
||||
}
|
||||
|
||||
// Emit pass through
|
||||
func (r *Events) Emit(eventName string, optionalData ...interface{}) {
|
||||
r.eventManager.Emit(eventName, optionalData...)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "**** Checking if Wails passes unit tests ****"
|
||||
if ! go test ./...
|
||||
if ! go test ./lib/... ./runtime/... ./cmd/...
|
||||
then
|
||||
echo ""
|
||||
echo "ERROR: Unit tests failed!"
|
||||
|
Loading…
Reference in New Issue
Block a user