proposal: add fyne cross command#106
Conversation
This is cool - but does this mean that cross-platform package now uses cross by default, or that we need a new parameter to the package command to instruct it to use |
|
The idea with this first version is to have a dedicated command for cross-building, leaving packaging to the For packaging, If the new flags are acceptable, we could integrate this directly into At the moment the following flags are used: NAME:
fyne cross - Cross-compile Fyne applications using containers
USAGE:
fyne cross [command options] [arguments...]
OPTIONS:
--target value, --os value set operating system to target (android, android/arm, android/arm64, android/amd64, android/386, darwin, freebsd, ios, linux, netbsd, openbsd, windows)
--src value, --source-dir value set directory to package, if executable is not set
--release enable installation in release mode, disable debug, etc (default: false)
--output value, -o value specify name for the output file (default: based on current directory)
--image value specify custom container image (overrides default)
--pull pull latest container image (default: false)
--cache-dir value directory for Go build and Zig compiler caches (default: /Users/lucor/Library/Caches/fyne-tools)
--no-cache disable Go build and Zig compiler caching (default: false)
--ldflags value [ --ldflags value ] specify linker flags to pass to go build (can be used multiple times)
--tags value [ --tags value ] specify build tags (can be used multiple times)
--verbose, -v show details when running (default: false)
--help, -h show help``` |
Sounds like a good first step, thanks. Perhaps it should hint that packaging is not complete (as it would have been for fyne-cross before). |
|
Nice, I like where this is going.
Should be the same as the main Fyne repo I think.
That does sound more like general file distribution, which makes me wonder if a vendor/protocol specific command makes sense as part of our CLI/API or if it should be a type of a broader upload command or similar. |
This PR introduces a new
fyne crosscommand that brings cross-compilation directly into the Fyne tools, replacing the need forfyne-crosswhile using containerized build environments.If adopted, this will effectively deprecate the standalone
fyne-crosstool.Requires: https://github.com/lucor/fyne-cross-images/pull/68
Notable Changes
fyne package.This also means the Docker images do not need to include Fyne tools anymore.
fyne crosscommand.fixuid.Open Questions
fyne-tools?Testing
Build images:
Requires container images from:
https://github.com/lucor/fyne-cross-images (branch
feat/cross)Cross compile
AI Disclosure: AI was used to generate many tests and assist with this work. Everything has been manually reviewed.