GithubHelp home page GithubHelp logo

lucor / fyne-cross Goto Github PK

View Code? Open in Web Editor NEW
69.0 3.0 12.0 304 KB

Cross Compile Fyne Applications

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 9.09% Go 88.51% Shell 0.58% Makefile 1.82%
fyne go cross-platform docker

fyne-cross's Introduction

ARCHIVED

fyne-cross is now an official Fyne project and has been moved to: https://github.com/fyne-io/fyne-cross

Fyne Cross

CI Go Report Card GoDoc version

fyne-cross is a simple tool to cross compile and create distribution packages for Fyne applications.

It has been inspired by xgo and uses a docker image built on top of the golang-cross image, that includes the MinGW compiler for windows, and an OSX SDK, along with the Fyne requirements.

Supported targets are:

  • darwin/amd64
  • darwin/386
  • freebsd/amd64
  • linux/amd64
  • linux/386
  • linux/arm
  • linux/arm64
  • windows/amd64
  • windows/386
  • android
  • ios

Note: iOS compilation is supported only on darwin hosts. See fyne README mobile for pre-requisites.

Requirements

Installation

GO111MODULE=on go get github.com/lucor/fyne-cross/v2/cmd/fyne-cross

fyne-cross will be installed in GOPATH/bin, unless GOBIN is set.

Updating docker images

To update to a newer docker image the --pull flag can be specified. If set, fyne-cross will attempt to pull the image required to cross compile the application for the specified target.

For example:

fyne-cross linux --pull

will pull only the fyne-cross:base-latest image required to cross compile for linux target.

Development release

To install a preview of the v2 version or help in testing:

go get github.com/lucor/fyne-cross/v2/cmd/fyne-cross@develop

Usage

fyne-cross <command> [options]

The commands are:

	darwin        Build and package a fyne application for the darwin OS
	linux         Build and package a fyne application for the linux OS
	windows       Build and package a fyne application for the windows OS
	android       Build and package a fyne application for the android OS
	ios           Build and package a fyne application for the iOS OS
	freebsd       Build and package a fyne application for the freebsd OS
	version       Print the fyne-cross version information

Use "fyne-cross <command> -help" for more information about a command.

Wildcards

The arch flag support wildcards in case want to compile against all supported GOARCH for a specified GOOS

Example:

fyne-cross windows -arch=*

is equivalent to

fyne-cross windows -arch=amd64,386

Example

The example below cross compile and package the fyne examples application

git clone https://github.com/fyne-io/examples.git
cd examples

Compile and package the main example app

fyne-cross linux

Note: by default fyne-cross will compile the package into the current dir.

The command above is equivalent to: fyne-cross linux .

Compile and package a particular example app

fyne-cross linux -output bugs ./cmd/bugs

Contribute

  • Fork and clone the repository
  • Make and test your changes
  • Open a pull request against the develop branch

Contributors

See contributors page

Legal note

OSX/Darwin/Apple builds: Please ensure you have read and understood the Xcode license terms before continuing.

fyne-cross's People

Contributors

diptag avatar fiam avatar girbons avatar jacalz avatar jeandeaual avatar lucor avatar mrctms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fyne-cross's Issues

[Feature Request] Add option to build release binaries

Go binaries are generally quite large and the only way to make them significantly smaller is to strip out the debugging and dwarf data if you don't want to lose any performance. That is done with -ldflags="-s -w" duing package build time.

I would like an option to just pass something like -release or -strip to build all the resulting cross compiled binaries using that to remove a couple megabytes from each file. If you are sending out a binary to customers, it feels like debug data is unnecessary for most use cases. Those that don't deem it necessary can thus just build without it if they so desire.

MacOSX10.10.sdk docker: failed to register layer:

docker version

Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:25:58 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:24:29 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

fyne-cross -version

fyne-cross version 1.3.2

Do I have to install MacOSX10.10.sdk?
I just want to build for linux with arm architecture
What should I do? Thank you

Add support for Go 1.13

Hi! Recently encountered a problem of building an application with a version other than 1.12, so I had to build manually from a target os. Is it possible to add an option to specify which version of go compiler to use?

As I can see docker/golang-cross#39 won't/can't add versions other than 1.12 for OS X - maybe its worth it to add support for new versions to other OS? There is also new version coming soon.

linux/386 does not work with 1.2.x

After upgrading to golang-cross:1.12.2 based on debian buster, cross compiling for linux/386 does not work.

fyne-cross --targets="linux/386"  
Build output folder: /code/lucor/test/build
Target linux/386
Building...
# runtime/cgo
In file included from _cgo_export.c:3:
/usr/include/stdlib.h:25:10: fatal error: bits/libc-header-start.h: No such file or directory
 #include <bits/libc-header-start.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 2

To fix need to create a dedicated 386 docker image.

Missed requirement: docker binary not found in PATH.

[developer@archlinux Workspace]$ fyne-cross --targets=windows/amd64 fyne.test.go 
Missed requirement: docker binary not found in PATH
[developer@archlinux Workspace]$ which docker
/usr/bin/docker

This is on my archlinux development server, the docker binary is installed via yay -S docker, if there is a specific type of docker you need, please make a note of it in the README

fyne-cross err : invalid for option uid

PS D:\store\examples> fyne-cross --targets=linux/amd64,windows/amd64,darwin/amd64 github.com/fyne-io/examples
Downloading dependencies
Value "S-1-5-21-378678101-2309852114-219419761-500" invalid for option uid (number expected)
adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID]
[--disabled-password] [--disabled-login] [--add_extra_groups] USER
   Add a normal user

adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password]
[--disabled-login] [--add_extra_groups] USER
   Add a system user

adduser --group [--gid ID] GROUP
addgroup [--gid ID] GROUP
   Add a user group

addgroup --system [--gid ID] GROUP
   Add a system group

adduser USER GROUP
   Add an existing user to an existing group

general options:
  --quiet | -q      don't give process information to stdout
  --force-badname   allow usernames which do not match the
                    NAME_REGEX configuration variable
  --help | -h       usage message
  --version | -v    version number and copyright
  --conf | -c FILE  use FILE as configuration file

exit status 1

pkg-config missing packages

Looks that packages are missing?
(Building for linux)

Building for linux amd64
go: creating new go.mod: module fyne-cross-temp-module
go: finding ...
go: downloading ...
go: extracting ...
# pkg-config --cflags  -- gio-2.0 glib-2.0 gobject-2.0
Package gio-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gio-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gio-2.0' found
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
pkg-config: exit status 1
Could not build for linux/amd64: exit status 2

how to set icon

fyne-cross --targets=linux/amd64,windows/amd64,darwin/amd64
how to set icon

Ensure Docker Images are Up-To-Date

This is a feature request for an addition to the setup steps performed by fyne-cross that will pull the latest docker images.

docker pull lucor/fyne-cross:android-latest
docker pull lucor/fyne-cross:base-latest

Does not set GOOS

[developer@archlinux fyne-projects]$ fyne-cross --targets="windows/amd64" tour.go 
Downloading dependencies
Build output folder: /Workspace/fyne-projects/build
Building for windows/amd64
/go/src/github.com/sqweek/dialog/dlgs_windows.go:10:2: cannot find package "github.com/TheTitanrain/w32" in any of:
        /usr/local/go/src/github.com/TheTitanrain/w32 (from $GOROOT)
        /go/src/github.com/TheTitanrain/w32 (from $GOPATH)
exit status 1

fails, but this command

#!/usr/bin/sh
export GOOS=windows
export CC=x86_64-w64-mingw32-gcc 
export CGO_ENABLED=1 
go build $1

works

code i am working with

package main

import (
	"log"

	"fyne.io/fyne"
	"fyne.io/fyne/app"
	"fyne.io/fyne/layout"
	"fyne.io/fyne/theme"
	"fyne.io/fyne/widget"
	"github.com/sqweek/dialog"
)

func main() {
	myApp := app.New()
	myWindow := myApp.NewWindow("Toolbar Widget")

	toolbar := widget.NewToolbar(
		widget.NewToolbarAction(theme.DocumentCreateIcon(), func() {
			log.Println("Select Wallpaper")
			dialog.File().Filter("Png Image File", "png").Load()
		}),
		widget.NewToolbarSeparator(),
		widget.NewToolbarAction(theme.ContentCutIcon(), func() {}),
		widget.NewToolbarSpacer(),
		widget.NewToolbarAction(theme.HelpIcon(), func() {
			log.Println("Display help")
		}),
	)

	content := fyne.NewContainerWithLayout(layout.NewBorderLayout(toolbar, nil, nil, nil),
		toolbar, widget.NewLabel("Content"))
	myWindow.SetContent(content)
	myWindow.ShowAndRun()
}

MacOS dist packaging should have separate name

Building with the dist packaging support in develop creates the application with a name in the pattern of name-darwin-amd64.app. This is far from practical as nobody would want their distribution binary have *-darwin-amd64 in their name when it shows up in launchpad.

I suggest that a flag is provided -appName that lets the user set the application name in the MacOS packaging. My app would then be called Sparta.app instead of sparta-darwin-amd64.app.

couldn‘t install

I built out a bugs.apk, but I couldn't install on my phone.
$ adb install bugs.apk
Performing Streamed Install
adb: failed to install bugs.apk: Failure [INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME: Invalid manifest package: must have at least one '.' separator]
I am working on a win10
thanks for your help

how to deal this error

[root@localhost examples]#    fyne-cross --targets=linux/amd64
Project root dir: /root/goproject/examples
Package dir: .
Build output folder: /root/goproject/examples/build
Target linux/amd64
Building...
# runtime
/usr/local/go/src/runtime/stubs_x86.go:10:6: stackcheck redeclared in this block
        previous declaration at /usr/local/go/src/runtime/stubs_amd64x.go:10:6
/usr/local/go/src/runtime/unaligned1.go:11:6: readUnaligned32 redeclared in this block
        previous declaration at /usr/local/go/src/runtime/alg.go:321:40
/usr/local/go/src/runtime/unaligned1.go:15:6: readUnaligned64 redeclared in this block
        previous declaration at /usr/local/go/src/runtime/alg.go:329:40
exit status 2

thanks

-ldflags doesn't work in v2

Since v2 of fyne-cross, the -ldflags command line option is not passed to Docker anymore:

$ fyne-cross linux -debug -ldflags "-X main.version=1.2.3"
[i] Target: linux/amd64
command.Context{Volume:volume.Volume{binDirHost:"/home/alexis/fyne-cross-ldflags/fyne-cross/bin", cacheDirHost:"/home/alexis/.cache/fyne-cross", distDirHost:"/home/alexis/fyne-cross-ldflags/fyne-cross/dist", tmpDirHost:"/home/alexis/fyne-cross-ldflags/fyne-cross/tmp", workDirHost:"/home/alexis/fyne-cross-ldflags"}, Architecture:"amd64", Env:[]string{"GOOS=linux", "GOARCH=amd64", "CC=gcc"}, ID:"linux-amd64", LdFlags:[]string(nil), OS:"linux", Tags:[]string(nil), AppID:"fyne-cross-ldflags", CacheEnabled:true, DockerImage:"lucor/fyne-cross:base-latest", Icon:"/home/alexis/fyne-cross-ldflags/Icon.png", Output:"fyne-cross-ldflags", Package:".", StripDebug:true, Debug:true}
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /home/alexis/fyne-cross-ldflags/fyne-cross/bin/linux-amd64
[✓] "dist" dir cleaned: /home/alexis/fyne-cross-ldflags/fyne-cross/dist/linux-amd64
[✓] "temp" dir cleaned: /home/alexis/fyne-cross-ldflags/fyne-cross/tmp/linux-amd64
[i] Checking for go.mod: /home/alexis/fyne-cross-ldflags/go.mod
[✓] go.mod found
[i] Building binary...
/usr/bin/docker run --rm -t -w /app -v /home/alexis/fyne-cross-ldflags:/app -v /home/alexis/.cache/fyne-cross:/go -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOOS=linux -e GOARCH=amd64 -e CC=gcc -e fyne_uid=1000 lucor/fyne-cross:base-latest go build -ldflags '-w -s' -o /app/fyne-cross/bin/linux-amd64/fyne-cross-ldflags -v .
[✓] Binary: /home/alexis/fyne-cross-ldflags/fyne-cross/bin/linux-amd64/fyne-cross-ldflags
[i] Packaging app...
/usr/bin/docker run --rm -t -w /app/fyne-cross/tmp/linux-amd64 -v /home/alexis/fyne-cross-ldflags:/app -v /home/alexis/.cache/fyne-cross:/go -e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e fyne_uid=1000 lucor/fyne-cross:base-latest /usr/local/bin/fyne package -os linux -name fyne-cross-ldflags -icon /app/fyne-cross/tmp/linux-amd64/Icon.png -appID fyne-cross-ldflags -executable /app/fyne-cross/bin/linux-amd64/fyne-cross-ldflags
[✓] Package: /home/alexis/fyne-cross-ldflags/fyne-cross/dist/linux-amd64/fyne-cross-ldflags.tar.gz

Here's the sample program I used to test:

package main

import (
	"fyne.io/fyne/app"
	"fyne.io/fyne/widget"
)

var version string

func main() {
	a := app.New()

	w := a.NewWindow("Hello")
	w.SetContent(widget.NewVBox(
		widget.NewLabel(version),
		widget.NewButton("Quit", func() {
			a.Quit()
		}),
	))

	w.ShowAndRun()
}

With go build -ldflags="-s -w -X main.version=1.2.3", we can see the version number in the label, but the label is empty when building with fyne-cross linux -ldflags "-X main.version=1.2.3"

fyne-cross command

when i use fyne-cross command ,i can not download golang.org/x often.but i have download the package in my local computer.

so i think ,if fyne-cross command can use docker "- v",i can use local gopath by "-v",like:
fyne-cross -v=/home/gopath

then we don’t need to download packages often,Is this method feasible?
thanks

Cross compile from macOS 10.15 to Windows 10

Running the following command on a clone of https://github.com/fyne-io/examples/ results in a windows executable file. But when I move the file over to Windows 10, it doesn't run. Any idea where to start looking?

fyne-cross --targets=windows/amd64 -v ./main.go
Project root dir: /git/examples
Package dir: ./main.go
Bin output folder: /git/examples/fyne-cross/bin
Dist output folder: /git/examples/fyne-cross/dist
[WARN] Icon app was not specified with --icon and a default one was not found at "/git/examples/Icon.png". Using Fyne logo as icon app for testing purpose
Icon app: /git/examples/fyne-cross/tmp/fyne.png
Building for target windows/amd64
go.mod found
Target windows/amd64 [OK]

Unable to find image 'lucor/fyne-cross:1.2.2' locally

fyne-cross --targets="windows/amd64" --output=HelloWorld.exe HelloWorld.go

Unable to find image 'lucor/fyne-cross:1.2.2' locally
docker: Error response from daemon: manifest for lucor/fyne-cross:1.2.2 not found: manifest unknown: manifest unknown.
See 'docker run --help'.
exit status 125

Same setup, but docker actually started to work with the new release

[developer@archlinux fyne-projects]$ fyne-cross -version
fyne-cross version 1.2.2

Add support for passing appID to dist packaging

The fyne package command has support for passing a -appID flag to specify the appID when packaging. this is useful for MacOS and needed for Android builds. Current version of dist packaging in fyne-cross does not support this.

Default binary name should be folder if none is provided

I was building my project using fyne-cross --targets=linux/amd64,windows and the project consists of main.go and assets.go files. Without specifying the name in the command, the built binary is named assets-windows-amd64.exe instead of tic-tac-toe-windows-amd64.exe as I expected. The folder that it resides in is named tic-tac-toe and thus I would think that it would be the name when none other is provided, just like running go build would do.

Package android files as .apk

Right now it seems that the android builds are only .so files and not .apk files. it would be great if this could be achieved to make life easier for people building for android. I for example have no idea on how to install a .so file on an android phone and run the app..

[Feature Request] Ability to package with an icon using fyne/cmd

The cmd for fyne let's users package their applications with a logo to easily have fancy programs with working icons without much hassle, if any at all really. I would love to see a feature here that let's us specify an icon and get packaged versions of all applications (where possible) for all out cross compiled files.

Cannot build android app

error

[developer@archlinux go-mobile]$ fyne-cross --targets=android/arm --output=./ ./hello.go 
Build output folder: /Workspace/go-mobile/build
Target android/arm
No module found. Downloading dependencies using go get
Building...
# fyne.io/fyne/vendor/github.com/go-gl/gl/v3.2-core/gl
/go/src/fyne.io/fyne/vendor/github.com/go-gl/gl/v3.2-core/gl/procaddr.go:58:11: fatal error: 'GL/glx.h' file not found
        #include <GL/glx.h>
                 ^~~~~~~~~~
1 error generated.
# fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw
In file included from /go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4:
In file included from ./glfw/src/context.c:28:
In file included from ./glfw/src/internal.h:169:
./glfw/src/x11_platform.h:36:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
         ^~~~~~~~~~~~
1 error generated.
exit status 2

code

package main

import (
        "fyne.io/fyne/app"
        "fyne.io/fyne/widget"
)

func main() {
        a := app.New()

        w := a.NewWindow("Hello")
        w.SetContent(widget.NewVBox(
                widget.NewLabel("Hello Fyne!"),
                widget.NewButton("Quit", func() {
                        a.Quit()
                }),
        ))

        w.ShowAndRun()
}

GOPROXY support

Is there a way to change the environment GOPROXY in docker

how to go get private repositories

fyne-cross --targets=darwin/amd64

go: gitlfatal: could not read Username for 'https://XXX.com': terminal prompts disabledit fetch -f http://XXX.git refs/heads/:refs/heads/ refs/tags/:refs/tags/ in /go/pkg/mod/cache/vcs/
Could not build for darwin/amd64: exit status 187204f13e0c1bb573: exit status 128:

Unable to build target windows/amd64

[developer@archlinux Wallpaper]$ fyne-cross --targets=windows/amd64
Build output folder: /Workspace/Personal-Projects/Wallpaper/build
Target windows/amd64
Building...
# wallpaper
/usr/local/go/pkg/tool/linux_amd64/link: running x86_64-w64-mingw32-gcc failed: exit status 1
/usr/bin/x86_64-w64-mingw32-ld: i386 architecture of input file `/tmp/go-link-798816917/000000.o' is incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status

exit status 2
package main

import (
        "fyne.io/fyne/app"
        "fyne.io/fyne/widget"
)

func main() {
        a := app.New()

        w := a.NewWindow("Wallpaper")
        w.SetContent(widget.NewVBox(
                widget.NewLabel("Select your wallpaper"),
                widget.NewButton("Cancel", func() {
                        a.Quit()
                }),
        ))

        w.ShowAndRun()
}

unable to compile

Dist packaged linux binaries seem to include two binaries

Running a dist compile seems to result in two binaries being created, both the name and the regular one. Please see the screenshots below:

Binaries are doubled (leading to huge tar file size):

image

Desktop files are also double:

image

Icons too:

image

I am sorry that I didn't catch this in my earlier testing, I was way too focused on getting my MacOS binary to work 👎

Issue cross compiling from Windows 10 to darwin/amd64

Hello,
I'm using v1.4.0 of fyne-cross

C:\Users\80248\GolandProjects\pdfsplitgo>go get github.com/lucor/fyne-cross/cmd/fyne-cross
go: found github.com/lucor/fyne-cross/cmd/fyne-cross in github.com/lucor/fyne-cross v1.4.0

When I try to cross compile to darwin from my windows 10 machine I encounter the following issue:

C:\Users\80248\GolandProjects\pdfsplitgo>fyne-cross --targets=darwin/amd64 -v ./main.go
Project root dir: C:\Users\80248\GolandProjects\pdfsplitgo
Package dir: ./main.go
Bin output folder: C:\Users\80248\GolandProjects\pdfsplitgo\fyne-cross\bin
Dist output folder:  C:\Users\80248\GolandProjects\pdfsplitgo\fyne-cross\dist
Icon app:  C:\Users\80248\GolandProjects\pdfsplitgo\Icon.png
Building for darwin amd64
go.mod found
C:\Program Files\Docker\Docker\resources\bin\docker.exe run --rm -t -w /app -v C:\Users\80248\GolandProjects\pdfsplitgo:/app -v C:\Users\80248\AppData\Local\fyne-cross:/go -
e CGO_ENABLED=1 -e GOCACHE=/go/go-build -e GOOS=darwin -e GOARCH=amd64 -e CC=o32-clang lucor/fyne-cross:develop go build -ldflags ' -w -s' -o \app\fyne-cross\bin\darwin-amd6
4\main.go -v ./main.go
go: extracting github.com/fsnotify/fsnotify v1.4.9
go: extracting github.com/go-gl/glfw v0.0.0-20181213070059-819e8ce5125f
go: extracting golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
build command-line-arguments: cannot load github.com/fsnotify/fsnotify: rename /go/pkg/mod/github.com/fsnotify/fsnotify@v1.4.9.tmp-482460013 /go/pkg/mod/github.com/fsnotify/
fsnotify@v1.4.9: no such file or directory
Could not build for darwin/amd64: exit status 1

I am very new to Go and Fyne (and fyne-cross) so I hope it's not just a configuration issue...
Thanks for the app and your time!

Add wildcard support for goarch

In order to compile all supported GOARCH for a specified GOOS we have to specify all combinations.
For example to compile for all supported GOARCH on linux:
--targets=linux/amd64,linux/arm64,linux/386,linux/arm

Adding support for wildcard will make the command more usable in this case:
--targets=linux/*

Split docker images per os/arch

Right now we have a unique docker image that supports all os / arch.
Splitting, when possible, into multiple images will allow to reduce download size and time when need to compile only against a subset of os / arch

Introduce a root folder and layout for fyne-cross output

fyne-cross could generates several files and folders when building and packaging fyne apps.
Introducing a unique root folder for fyne-cross should allow to:

  • avoid any possible conflict with the existing resources for the project layout we are going to build;
  • ignore the fyne-cross resources for a VCS (i.e. adding the root folder to a .gitignore file)

A possible layout could be:

project-root
├── main.go
├── go.mod
├── go.sum
├── ......
├── fyne-cross //fyne-cross root dir
│   └── bin  // will contains the binaries
│   └── dist // will contains the distribution packages
│   └── tmp // will be use to store temporary resources used to build binaries and packages

can not connect net when i use docker images

docker run -t -i lucor/fyne-cross:develop /bin/bash

can not connect net .
just like this can connect network:

docker run -t -i  --net host  lucor/fyne-cross:develop /bin/bash

i can not download any package now,so i want to ask,the docker images can connect network default?

Android build targets failing

Any build target of Android fails with the following error. All 4 arch result in the same error. Windows, Linux, and Darwin are all successful. It seems like the lucor/fyne-cross:android container is missing some required packages.

Target android/amd64
No module found. Downloading dependencies using go get
Building...
# fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw
In file included from /go/src/fyne.io/fyne/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4:
In file included from ./glfw/src/context.c:28:
In file included from ./glfw/src/internal.h:169:
./glfw/src/x11_platform.h:36:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
         ^~~~~~~~~~~~
1 error generated.
# fyne.io/fyne/vendor/github.com/go-gl/gl/v3.2-core/gl
/go/src/fyne.io/fyne/vendor/github.com/go-gl/gl/v3.2-core/gl/procaddr.go:58:11: fatal error: 'GL/glx.h' file not found
        #include <GL/glx.h>
                 ^~~~~~~~~~
1 error generated.
exit status 2

To Reproduce

fyne-cross --targets=android/amd64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.