Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirements for target platforms #2154

Closed
Gys opened this issue Apr 10, 2021 · 15 comments
Closed

requirements for target platforms #2154

Gys opened this issue Apr 10, 2021 · 15 comments
Assignees
Labels
information-needed Further information is requested

Comments

@Gys
Copy link

Gys commented Apr 10, 2021

I compiled an app on macOS Big Sur to use on another MacBook. The resulting app could not run on that machine because You can't use this version of the application "MyApp" with this version of macOS. You have macOS 10.15.7. The application requires macOS 11.0 or later.".

I tried to lookup here and in the docs what minimum OS versions are supported for each platform, but could not find anything. It would be useful if that was more clear. If I missed it, I looked for 'target', 'platform' and 'requirements'.

In case this depends on certain libraries, meaning that if omitted a lower OS version would be supported, then that info would also be very helpful.

@Gys Gys added the bug Something isn't working label Apr 10, 2021
@andydotxyz
Copy link
Member

You did not say how your app was built...

calling “fyne package” should have created a .app package that is portable to older macOS versions.

@Gys
Copy link
Author

Gys commented Apr 11, 2021

Sorry, I just wrote 'compiled' but I indeed called fyne package to create a '.app'. Strange. So you mean the app should run on macOS 10.15.7?

@andydotxyz
Copy link
Member

Yes, it should work back to 10.11

@Jacalz
Copy link
Member

Jacalz commented Apr 12, 2021

Were you by any chance using an M1 MacBook?

@Gys
Copy link
Author

Gys commented Apr 12, 2021

No, it was an old MacBook Air from 2012. I can access it again in a week or so and will try again with a hello world app.

@andydotxyz andydotxyz added question A question has been asked and removed bug Something isn't working labels Apr 12, 2021
@andydotxyz
Copy link
Member

It would be good to get the spec for the macbook if possible.
I'm not sure if all of those produced were 64 bit or not...

@Gys
Copy link
Author

Gys commented Apr 23, 2021

I found what is happening.

Delete the files myapp and myapp.app.
Build a new version doing go build and then fyne package.
Move the resulting myapp.app to the Macbook Air.
The app now shows a 'no access' image on top of its icon and double click triggers the message You can't use this version of the application "MyApp" with this version of macOS. You have macOS 10.15.7. The application requires macOS 11.0 or later.".

Delete the files myapp and myapp.app.
Build a new version only doing fyne package.
Move the resulting myapp.app to the Macbook Air.
The app works as expected.

Fyne: cli v2.0.0
Go: go1.16.3 darwin/amd64
Build machine is Macbook Pro: hardware version 2018, macOS 11.2.1
Target machine is Macbook Air: hardware version mid-2012, macOS 10.15.7 (latest for this hardware).

The myapp.app works locally (Macbook Pro) always as expected. The difference (using go build) is only relevant when copying the app to the Macbook Air.

@andydotxyz
Copy link
Member

andydotxyz commented Apr 24, 2021

Do not run go build before fyne package. If the executable is already built then the build flags we know how to set will not be applied because it’s already compiled.

@Gys
Copy link
Author

Gys commented Apr 25, 2021

Is that documented? The book says:
“Before packaging, it is a good idea to confirm that your application builds successfully using the go build command. When your app is ready, simply execute the fyne package command and it will process your app and metadata to create the platform-appropriate output.”

Then again, I should probably have used fyne release to build a version for another computer? I did not test, but maybe using go build and then fyne release might work?

BTW, it seems possible to check which flags were used to build a Go executable. I found this: https://stackoverflow.com/questions/44148449/how-to-check-whether-golang-binary-is-compiled-with-ldflags-s-w/44168916
Might be something to consider adding to the fyne cli.

@andydotxyz
Copy link
Member

I don’t know what checking the parameters would help with? We’ve made the assumption that someone building the exe instead of letting Fyne do it for them has done so for a reason.

Can you please say which section of which book you are using? These things move on and we may need to make an errata.

@Gys
Copy link
Author

Gys commented Apr 26, 2021

We’ve made the assumption that someone building the exe instead of letting Fyne do it for them has done so for a reason.

Yes, the reason is to check if the exe builds correctly ;-)

Checking for specific build flags could help to see if the exe was compiled with the correct build flags. As per your previous comment, specific build flags are applied for packaging. If the fyne cli would give a message explaining specific build tags are needed then I would know its relevancy.

The citation is from Chapter 9 -> Packaging applications (desktop and mobile) -> Packaging for your current computer

@andydotxyz
Copy link
Member

You’re right that is misleading sorry. The command used to be less capable and that page should have been updated.
I’ll try and put an errata on the book page.

@andydotxyz andydotxyz mentioned this issue Apr 27, 2021
3 tasks
@andydotxyz
Copy link
Member

I opened #2203 PR when I realised that we could assume that found exe files that were not manually specified could be overwritten. This should fix the issue so the book examples work correctly.

@andydotxyz andydotxyz self-assigned this Apr 27, 2021
@Jacalz Jacalz added information-needed Further information is requested and removed question A question has been asked labels Nov 21, 2021
@Jacalz
Copy link
Member

Jacalz commented Nov 21, 2021

Has this been resolved already? Can we close it?

@andydotxyz
Copy link
Member

Yes I think I should have closed this ages ago, good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information-needed Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants