Comments (13)
Ah, sorry, that's just how you get fyne from the develop branch. You also need to use the new fyne command: https://github.com/fyne-io/tools/blob/main/cmd/fyne/main.go
go install fyne.io/tools/cmd/fyne@main
from fyne.
The problem seems to be that on ARM we are picking GLES, while we should pick GL for Mac M* hardware when inside a docker container.
from fyne.
I don't know if this is a daft question but why are you running a GUI app in a docker container? All our tooling is designed to build native apps for each platform.
P.s. If you want to build a GUI for docker won't it need to be a Linux app not a macOS app?
from fyne.
Does it help to build with -tags egl
? Most apps have switched to EGL from GLX by now on Linux but go-gl
(or maybe it is upstream GLFW
) still uses GLX by default.
from fyne.
This might also be an effect related to the fact that you might not have all the necessary graphics drivers installed in the Docker container. I do most of my development in a Fedora Toolbox container on Fedora Silverblue and that requires some extra driver packages to be installed for things to work as expected (see containers/toolbox#1023 (comment))
from fyne.
I don't know if this is a daft question but why are you running a GUI app in a docker container?
Not a daft question, and for the record the project compiles flawlessly on MacOS with just XCode and Go installed. However I'm trying to make a coding screen for interviewees and wanted to make then environment as simple and non-invasive for them to use as possible, so I was hoping to provide a devcontainer they could just checkout and use without having to install a bunch of dependencies on their computers they may not need to use.
In the past I've done this with apps that either don't have GUIs or use the web, but we are a Go shop and I thought this would be a good platform.
As an aside, I tried to use the web target as another work around and downgraded go to 1.19 to use gopherjs's 1.19 beta, but one of the dependencies my project has uses generics. I tried export GOPHERJS_EXPERIMENT=generics
then building, but it still gave me problems - maybe the environment variables aren't passed from fyne into gopherjs?
Does it help to build with -tags egl?
I get the same result with or without the -tags egl
, assuming I'm doing this right:
$ fyne build -tags egl
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
2024/04/12 15:11:48 Fyne error: window creation error
2024/04/12 15:11:48 Cause: APIUnavailable: GLX: OpenGL ES requested but GLX_EXT_create_context_es2_profile is unavailable
2024/04/12 15:11:48 At: /go/pkg/mod/fyne.io/fyne/[email protected]/internal/driver/glfw/driver_notwindows.go:9
I installed libgl1-mesa-glx
and mesa-vulkan-drivers
in addition to all the other mesa packages I had but that didn't change the output.
from fyne.
I was hoping to provide a devcontainer they could just checkout and use without having to install a bunch of dependencies on their computers they may not need to use.
A fyne app has no runtime dependencies, so hopefully this is not a build issue.
If you need to bundle other tools for your interview setup then I guess I can see why you took this path - but a virtual machine would more commonly be used for this sort of setup - and VirtualBox is able to provide the proper graphics context for the runtime.
As an aside, I tried to use the web target as another work around and downgraded go to 1.19 to use gopherjs's 1.19 beta, but one of the dependencies my project has uses generics. I tried export GOPHERJS_EXPERIMENT=generics then building, but it still gave me problems - maybe the environment variables aren't passed from fyne into gopherjs?
You could use the develop
branch of Fyne and/or the new tools/cmd/fyne
repo/location which no longer uses GopherJS for the web build.
from fyne.
You could use the develop branch of Fyne and/or the new tools/cmd/fyne repo/location which no longer uses GopherJS for the web build.
How would I do this? I tried go get ...@develop
but I got a lot of compiler and import errors I wasn't sure how to proceed with.
from fyne.
Never try to go get github.com/fyne-io/fyne/v2. You should still use fyne.io like usual
from fyne.
@Jacalz in that case how do I use the develop branch? Or should I just not try that?
You could use the develop branch of Fyne and/or the new tools/cmd/fyne repo/location which no longer uses GopherJS for the web build.
from fyne.
These two commands ought to work:
go get fyne.io/fyne/v2@develop
go mod tidy
from fyne.
Ah, ok that works, thanks. When I do that I get:
$ fyne serve
../../go/pkg/mod/fyne.io/fyne/[email protected]/app.go:84:16: Pointer not declared by package atomic
error building application: exit status 1
is that something I'm doing wrong or a temporary hiccup with the develop branch?
Sorry, I realize this is veering off topic from the original issue request but it is potentially more directly addressing my primary goal.
from fyne.
Thank you @Jacalz ! That got me going and the app works for me now. I have a small problem which is that it loads into a black screen - I think this is because of Chrome's anti-autoplay of audio policy and my app loads ebitengine to play audio, but that's a separate issue.
The specific problem I created this ticket for isn't solved but I have an even better work around, so thank you everyone who chimed in.
from fyne.
Related Issues (20)
- Add an API to get the "min" width of text widgets with wrapping that would be needed to show the text without wrapping HOT 7
- App Crash on IOS Simulator HOT 6
- Add SizeName property to Hyperlink widget HOT 1
- widget.Entry insert some word is very log HOT 10
- when dialog.ShowFileOpen then click cancel,window quit and program terminated HOT 1
- Add a type of overlay/popup container that doesn't block interaction with the underlying layer
- [Entry] Typing Shift+Tab should not insert a tab character
- table cells in disorder HOT 3
- Tray: Child menu items of a parent won't display if there is more than one parent item on Linux Mint
- TextGrid background color shows visual artifacts when FYNE_SCALE is not 1.0, 1.5, or 2.0
- Poor contrast for progressbar text
- GridWrapLayout doesn't play nicely with parent containers/layouts HOT 11
- Add a lower-level EditableText widget HOT 3
- Mobile: open pop-up (or any other overlay) does not play well with window-head HOT 2
- Strange behavior on NewAppTabs in a container border
- Trying to access a URL through `canvas.NewImageFromURI()` in a test results in a panic HOT 2
- Hope to load more than one font resources into theme, for supporting various kind of chars, like an font family could do HOT 2
- Add new RichText API for appending markdown to an existing widget HOT 1
- RichTextSegment HOT 1
- Fyne crashes when resizing by touching Window 10's border.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fyne.