Change Cursor on OSX + setuptools

Hi! Having trouble using

wp = WindowProperties()

on a mac. It works perfect on Windows AND on the OSX as long as I don’t create the build using buildtools.

The crossHair.cur gets moved by setuptools to the resources folder, as it should, and the application finds it, but it does not change the pointer.

If I run the script directly in python on OSX it works. Does a special entry needs to be done in the plist file?



You can use ExecutionEnvironment.getEnvironmentVariable("MAIN_DIR") to have the path to your application resource directory, wherever it is.

On Linux, Windows and macOS (unbundled app) it’s where your app main is located; on macOS bundled app, it will be /…/…/Resources

Thanks eldee! It worked perfectly!

One follow up question, which I might open in a new thread…

The “hotspot” of the .cur file is not being updated. Again, it works on Win, but not on osx. Both in the script version of the application and on the setuptools package. Any insight about this?


I’s actually a bug, the code does not retrieve the hotspot information for the cur file…

Could you fill an issue on GitHub ?

Thanks so much! Submitted.

Link to the issue report for reference: