fyne-io / fyne-cross

Cross compiler tool for Fyne apps
BSD 3-Clause "New" or "Revised" License
237 stars 48 forks source link

Make it possible to include the SDK in the darwin container. #178

Closed Bluebugs closed 1 year ago

Bluebugs commented 1 year ago

Description:

When running fyne-cross with k8s, it is more efficient to build an image that include the SDK. This patch make it possible for fyne-cross to assume the SDK was packaged in the container.

Checklist:

andydotxyz commented 1 year ago

In theory we could also by default check for a bundled SDK before return an error. What do you think?

I agree with this - even the new flag docs imply that it is an indication rather than a specified location. So why not just check if it exists before mounting an external location and/or erroring because one was not specified?

Bluebugs commented 1 year ago

I am not to sure how you would check the existence of a file inside the container, any suggestion?

andydotxyz commented 1 year ago

I am not to sure how you would check the existence of a file inside the container, any suggestion?

I don't have a specific suggestion - it was just an idea. If it cannot be done then @lucor suggestion seems like a great one.

lucor commented 1 year ago

I am not to sure how you would check the existence of a file inside the container, any suggestion?

A solution that comes in mind is to run the a command in the container like:

docker run ... fyneio/fyne-cross-images:darwin sh -c 'ls /sdk/path/to/file' and check for the error

Bluebugs commented 1 year ago

docker run ... fyneio/fyne-cross-images:darwin sh -c 'ls /sdk/path/to/file' and check for the error

That's working, nice!

Bluebugs commented 1 year ago

Comment added!