Slashbunny / gog-galaxy-plugin-downloader

Downloads and Updates GOG Galaxy 2.0 Plugins/Integrations
GNU General Public License v3.0
268 stars 20 forks source link

Add MacOS Support (was: CoreServices Module not found) #16

Open mliradelc opened 4 years ago

mliradelc commented 4 years ago

Hi, I was trying the integration with steam and the Steam pluging doesn't starts:

I'm using MAC OS Catalina Steam version plugin version "0.51.1" (ca27391f-2675-49b1-92c0-896d43afa4f8

This is from the logs:

2020-06-21 14:11:49,409 - root - ERROR - Plugin exception
Traceback (most recent call last):
  File "/Applications/GOG Galaxy.app/Contents/Resources/plugin_runner.py", line 35, in <module>
    module = importlib.import_module(filename)
  File "/Applications/GOG Galaxy.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/mliradel/Library/Application Support/GOG.com/Galaxy/plugins/installed/steam_ca27391f-2675-49b1-92c0-896d43afa4f8/plugin.py", line 38, in <module>
    from uri_scheme_handler import is_uri_handler_installed
  File "/Users/mliradel/Library/Application Support/GOG.com/Galaxy/plugins/installed/steam_ca27391f-2675-49b1-92c0-896d43afa4f8/uri_scheme_handler.py", line 28, in <module>
    from CoreServices.LaunchServices import LSCopyDefaultHandlerForURLScheme
ModuleNotFoundError: No module named 'CoreServices'
Slashbunny commented 4 years ago

This reminded me that some plugins have separate versions for Mac and Windows. Unfortunately, this updater script only is configured with a single version, which is always the Windows version. So if it doesn't work on Mac, that is probably why. The program installed the Windows variant of the plugin, which is probably why it didn't work for you.

Luckily, all the plugins that have a Mac and Windows version are "FriendsOfGalaxy" plugins, which are available from within the Galaxy client (no need to use this program).

You can type * in the Search box to see them all:

image

This includes the Steam plugin.

My recommendation would be to delete any folders installed in the following location:

/Users/mliradel/Library/Application Support/GOG.com/Galaxy/plugins/installed/

And just use the Galaxy client to download those plugins, since it'll download the Mac version for you.

As for the other, non-FriendsOfGalaxy plugins that are out there, I am guessing many may have issues with Mac, since I rarely, if ever, see different versions for Mac. 🤔

mliradelc commented 4 years ago

Thanks @Slashbunny for your answer. I tried to use this tool because the GOG version had problems finding the Steam server.

Another issue that I found it's the lack of lxml package. I had to load it mannually to the plugin folder in order to make it "work",Then I found the CoreServices error and that it's not a library missing..