Skip to content

How to get a MacOS packaged build to run? #194

@liana-p

Description

@liana-p

I've been trying to get a MacOS build running and can't get it to work. My app runs fine if using electron directly, or if building without steam. It's when using steamworks that it breaks.

I was getting the following errors. Using the open command on MacOS and pointing it to the executable inside the .app folder I was able to get logs out:

[0624/140510.973198:ERROR:base/i18n/icu_util.cc:177] icudtl.dat not found in bundle
[0624/140510.973600:ERROR:base/i18n/icu_util.cc:224] Invalid file descriptor to ICU data received.
[46433:0624/140511.034126:ERROR:content/browser/network_service_instance_impl.cc:586] Network service crashed, restarting service.
[0624/140511.221391:ERROR:base/i18n/icu_util.cc:177] icudtl.dat not found in bundle
[0624/140511.221719:ERROR:base/i18n/icu_util.cc:224] Invalid file descriptor to ICU data received.

That was after I added a command to copy steam_appid.txt inside game.app/Contents/MacOS. On other OSes I was just copying steam_appid.txt to the root of the executable, but on mac the executable is deeper in subfolders, so I had to do that for it to work when testing builds locally.

After more research I found this thread and ended up trying to add the no-sandbox command line argument for mac builds. Now they were launching, so I tried copying it to my Windows PC and uploading it to steam with steam pipe (I can't find any way to upload builds from Mac, and I wonder if copying the folder to windows could break it). Once downloaded from Steam, the build has the following errors, despite working locally:

dyld[49394]: Library not loaded: @rpath/Electron Framework.framework/Electron Framework

  Referenced from: <[SOME ID]> [HOME FOLDER]/Library/Application Support/Steam/steamapps/common/[GAME FOLDER]/[GAME].app/Contents/MacOS/[GAME EXECUTABLE]

  Reason: tried: '[HOME FOLDER]/Library/Application Support/Steam/steamapps/common/[GAME FOLDER]/[GAME].app/Contents/Frameworks/Electron Framework.framework/Electron Framework' (not a mach-o file), '[HOME FOLDER]/Library/Application Support/Steam/steamapps/common/[GAME FOLDER]/[GAME].app/Contents/Frameworks/Electron Framework.framework/Electron Framework' (not a mach-o file)

I have no background knowledge on how electron or chromium works so I don't know what could be happening.

I also tried what's mentioned in #149 and looked at any other issue threads about Mac, but it's hard to tell how to get a Mac build working, or if anyone has.

Other relevant info:

  • I am not doing code signing. I'm not sure if we have to?
  • This is a Mac M1 (so apple silicon)
  • The build architecture is intel (x64). Universal builds don't work, and I wanted to make an intel build for compatibility
  • I am using electron forge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions