-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check system for user installed Linux dependencies #1180
Conversation
Deploying with Cloudflare Pages
|
Better, but still not correct...
However, after
Here is the output for version v2.0.0-beta.31 after
I have installed all mention packages through the package manager, except npm, which is too old. |
Why would LANG change things? All I'm doing for the libraries is running pkg-config and checking if it finds the cflags for the given library |
|
Nice catch @pebbe - I think we can fix this by setting LANG before shelling. Thanks for taking time to test 👍 |
@pebbe - I've added a change that will attempt to set LANG for the call. I'm unable to test this locally. Is there a more robust way to detect packages are installed? |
Perhaps this?
|
v2/internal/system/system_linux.go
Outdated
checker := checkerFunctions[dep.Name] | ||
if checker != nil { | ||
checkLocallyInstalled(checker, dep) | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is continue really needed here?
also the if
on line 48 what protects us against?
var stdo, stde bytes.Buffer | ||
cmd.Stdout = &stdo | ||
cmd.Stderr = &stde | ||
cmd.Env = append(os.Environ(), "LANG=en_US.utf8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid that this fix wont cut it
$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8
$ wails doctor
Wails CLI v2.0.0-beta.test
Scanning system - Please wait (this may take a long time)...Done.
System
------
OS: Ubuntu
Version: 20.04
ID: ubuntu
Go Version: go1.17.1
Platform: linux
Architecture: amd64
Package Manager: apt
Dependency Package Name Status Version
---------- ------------ ------ -------
*docker docker.io Installed 20.10.12
gcc build-essential Installed 9.3.0
libgtk-3 libgtk-3-dev Available 3.24.20-0ubuntu1
libwebkit libwebkit2gtk-4.0-dev Available 2.34.4-0ubuntu0.20.04.1
npm npm Installed 8.3.1
pkg-config pkg-config Installed 0.29.1
* - Optional Dependency
Diagnosis
---------
Your system has missing dependencies!
Required package(s) installation details:
- libgtk-3: sudo apt install libgtk-3-dev
- libwebkit: sudo apt install libwebkit2gtk-4.0-dev
I am looking into it brb
var stdo, stde bytes.Buffer | ||
cmd.Stdout = &stdo | ||
cmd.Stderr = &stde | ||
cmd.Env = append(os.Environ(), "LANG=en_US.utf8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change line 69 to
cmd.Env = append(os.Environ(), "LC_ALL=en_US.utf8")
$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-8
$ wails doctor
Wails CLI v2.0.0-beta.test
Scanning system - Please wait (this may take a long time)...Done.
System
------
OS: Ubuntu
Version: 20.04
ID: ubuntu
Go Version: go1.17.1
Platform: linux
Architecture: amd64
Package Manager: apt
Dependency Package Name Status Version
---------- ------------ ------ -------
*docker docker.io Installed 20.10.12
gcc build-essential Installed 12.8ubuntu1.1
libgtk-3 libgtk-3-dev Installed 3.24.20-0ubuntu1
libwebkit libwebkit2gtk-4.0-dev Installed 2.34.4-0ubuntu0.20.04.1
npm npm Installed 8.3.1
pkg-config pkg-config Installed 0.29.1-0ubuntu4
* - Optional Dependency
Diagnosis
---------
Your system is ready for Wails development!
https://stackoverflow.com/questions/43953328/how-to-set-locale-in-the-current-terminals-session
Co-authored-by: stffabi <stffabi@users.noreply.github.com>
9a45e82
to
7d0d51e
Compare
Do we think this can be merged? |
Merging this as it appears to be better than what we have. |
Attempts to discover the dependencies if not installed via the package manager.
The library discovery code is untested!