Giter VIP home page Giter VIP logo

fyne-cross-images's Introduction

Fyne Cross Images

fyne-cross is a simple tool to cross compile and create distribution packages for Fyne applications using docker images that include Linux, the MinGW compiler for Windows, FreeBSD, and a macOS SDK, along with the Fyne requirements.

This project provides the docker images required by fyne-cross to cross compile.

Requirements

  • docker / podman

Supported targets

Table below reports the status of fyne-cross's supported cross compilation targets. The supported architectures for the host are amd64and arm64.

amd64 arm64
android/386 N/A
android/amd64 N/A
android/arm N/A
android/arm64 N/A
darwin/amd64
darwin/arm64
freebsd/amd64
freebsd/arm64
linux/amd64
linux/386
linux/arm
linux/arm64
windows/amd64
windows/386
web

Note:

  • darwin images should work out of the box against MacOSX SDKs 11.3. Other SDK versions could require a different min SDK version that can specified using the --macosx-version-min flag
  • android NDK is not available for linux/arm64, cross-compilation from arm64 hosts won't be supported in this initial release

Building container with darwin sdk included

In some case, you might want to build your own container and include the darwin sdk in it. A solution to this is to use fyne-cross darwin-sdk-extract command and copy the sdk you want in the subdirectory darwin-with-sdk/sdk. You can then use the Makefile to build that new container. If you do not need to rebuild the base and darwin container, just reusing the upstream version, you can do so by creating the appropriate .file that match the Makefile and the builder you are using to create your image. For example: touch .docker-base .docker-darwin if you are using docker with the multi architecture Makefile.

Contribute

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

Contributors

See contributors page

fyne-cross-images's People

Contributors

bluebugs avatar jacalz avatar lucor avatar metal3d avatar pbirkants avatar tkw1536 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fyne-cross-images's Issues

Install dev packages for libdecor on Wayland

Newer versions of Fyne (v2.5.0 and maybe v2.4.5) uses a Glfw version which has improved support for Wayland. Installing libdecor is not a requirement but it will result in a better Wayland experience for most people when running the binaries.

Add continuous integration infrastructure

Just throwing this issue here to discuss how we would see an acceptable way to do CI for this repo.

General idea is that on change, we build image for each target we can and run them with latest fyne-cross against a set of defined representative application.

Use a newer LLVM version for FreeBSD

Our FreeBSD images use LLVM version 12 which is three years old in April 2024.

See

ENV LLVM_VERSION=12

We should consider updating to a newer version for various improvements. It might be a good plan to match the version to the default LLVM version in the FreeBSD sources we use?

If we update to FreeBSD 13.3 for the sources, that would suggest using LLVM 17.

Automate Go and Fyne update

It would relieve the amount of work required to maintain this repository if we could also depends on some automation to automatically update our Fyne and Go version. General idea would be to have a github action for each. For Fyne, it could poke github API to figure out the latest release with a tag of the form (vX.Y.Z) and update base/Dockerfile:FYNE_VERSION accordingly. For Golang, it is a bit more complex, as we will need to figure out the latest release from tag (similar to Fyne), but then lookup on the website what are the expected value for checksum of the relevant linux arm64 and linux amd64 package.

Remove fixuid from the docker image

The fyne-cross tool has removed the need for using fixuid. We should remove it sometime going forward. Might require new versions as this would be a breaking change for someone using the old tools.

Get FreeBSD arm64 CI tests to work

The CI tests for FreeBSD arm64 are currently commented out in the ci.yml workflow to get the calculator build to work for that target. We should diagnose the issue and find out why it happens.

When running the test, it seemed like fyne-cross said that “freebsd/amd64” was the target in line two. Might be a good place to start.

Add continuous delivery infrastructure

Once we have CI (#28), it would be great to automate deployment of the image to docker. I would love that just pushing a tag would trigger an automated process. Alternatively would be great if just merging to main trigger tagging and push automatically to docker.

Building without fyne-cross

Hello, i've be trying to use the darwin image(fyneio/fyne-cross-images:1.1.3-darwin) from this repo in my CI/CD pipeline to build my fyne app.

Locally, to get in the image, i do this command:

Note: I'm in my project directory.

docker run -ti --rm -v .:/src -v .\SDKs\MacOSX11.3.sdk\:/sdk fyneio/fyne-cross-images:1.1.3-darwin /bin/bash

in the image, i set these variables coming from the fyne-cross repository (line 233):
go env -w CC="zig cc -v -target x86_64-macos.10.12 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks"
go env -w CXX="zig c++ -v -target x86_64-macos.10.12 -isysroot /sdk -iwithsysroot /usr/include -iframeworkwithsysroot /System/Library/Frameworks"
go env -w CGO_LDFLAGS="--sysroot /sdk -F/System/Library/Frameworks -L/usr/lib"
go env -w GOOS=darwin

however, after trying:
fyne package --appID myapp --os darwin

I get this error:
log.txt

am i missing something ?

Update Go version to 1.20

Is your feature request related to a problem? Please describe:

I'm using features new in Go 1.20 for my project, and it fails to compile.

internal/ui_authentication.go:16:6: cmd.WaitDelay undefined (type *exec.Cmd has no field or method WaitDelay)
internal/ui_authentication.go:52:6: cmd.WaitDelay undefined (type *exec.Cmd has no field or method WaitDelay)
note: module requires Go 1.20
[✗] exit status 2

Upon investigation, I saw that the base image is still using Go 1.18.4 and Fyne v2.2.3.

As I develop on an M2 Macbook, fyne-cross is my simplest solution to build for Linux x64 systems consistently.

Is it possible to construct a solution with the existing API?

N/A

Describe the solution you'd like to see:

A simple update to the latest Go and Fyne versions would be more than enough.

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.