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

Build for Mac #231

Closed
ataffanel opened this issue Feb 25, 2016 · 5 comments
Closed

Build for Mac #231

ataffanel opened this issue Feb 25, 2016 · 5 comments

Comments

@ataffanel
Copy link
Member

We should be able to make and distribute a Mac app using py2app.

@ataffanel
Copy link
Member Author

In my previous tests, one blocker was that mac2app compiles the python files in a zip, so the tab discovery did not work anymore. We may need to implement the tabs using setuptools entry points instead of the current file discovery in order to make the mac app.

@ataffanel
Copy link
Member Author

I have tried with py2app but I could not get it to work properly:

  • With python installed by brew there is a qt lib loading error in the resulting app
  • With the miniconda installed python generating the app is not working

I am not sure of what to do next, any help would be appreciated.

@ataffanel
Copy link
Member Author

Thanks to #435 we are one step closer to a mac build that works. cx_freeze is now able to build a max executable as well as a mac app. However the resulting executable does not run yet, this needs to be investigated further.

Anyway, the way to go seems to be with cx-freeze instead of py2app.

ataffanel added a commit that referenced this issue Sep 25, 2020
Makes ```python3 setup.py bdist_mac``` generates a working mac
app under the conditions:
 - cx-freeze installed from git (version >= 6.3)
 - ```sdl2``` and ```libusb``` installed with brew

The resulting app does not require any dependencies (sdl2 and
libusb are copied in the app bundle)
@ataffanel
Copy link
Member Author

The commit a7d0ff9 implements a working bdist_mac assuming the building machine has cx-freeze >= 6.3 (currently pulled from git) and libusb and sdl2 are installed on the build machine using brew.

More test and cosmetic tuning (like setting the app icon) are still required.

ataffanel added a commit that referenced this issue Sep 25, 2020
ataffanel added a commit that referenced this issue Sep 25, 2020
@ataffanel ataffanel added this to the next-release milestone Sep 26, 2020
@ataffanel
Copy link
Member Author

There is now an automated build in github actions, the resulting app is available as a build artifact.

As far as I can see there is one problem left: When running the app, the MacOS "gatekeeper" shows a warning and when if the app is opened using the 'open' entry of the right click menu, and then open is clicked, it opens and closes immediatly. Though it can open the next time it is clicked. I thing what is happening is that MacOS opens the app anyway while displaying the warning, kills it and re-open it when open is clicked. This means that the app is opened two times for a short while and since Crazyflie client opens ZMQ sockets at fixed port, it refuses to be opened a second time. If this assumption is confirmed, disabling the zmq sockets by default will solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants