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

OSX Standalone build can't find libsteam.dylib when build with OSX Unity 5.6.3p4 #86

Closed
Tinytouchtales opened this issue Nov 3, 2017 · 11 comments

Comments

@Tinytouchtales
Copy link

commented Nov 3, 2017

Hi,

i am encountering a weird issue on OSX. I can run and test my game in the editor, everything works as expected.
Once i build the game from the "Build & Run" menu it gives me an error that it can't find libsteam.dylib. I manually fixed this issue by going into the .app package to Contents/Frameworks/MonoEmbedRuntime/osx/ and copying the missing dylib manually there. After that the error is gone but steam won't init. (no detailed error here)
When i upload the build with steam pipe and starting the game via steam itself everything works as expected again.

I'm not sure if this is the expected behavior but at least the manual coping of dylib should be an issue.

@Metapyziks

This comment has been minimized.

Copy link
Contributor

commented Nov 7, 2017

I'm not sure if there's a nicer way to do this at the moment, but here's an example of an editor script you can use to automate copying those libraries on build:

https://github.com/Facepunch/Facepunch.Steamworks.Unity/blob/master/Assets/Scripts/Editor/CopySteamLibraries.cs

You'll just need to put that script inside an Editor folder somewhere in your Assets.

I haven't got an OSX machine set up at the moment, so I can't guarantee the paths in that script are correct.

@Tinytouchtales

This comment has been minimized.

Copy link
Author

commented Nov 7, 2017

Ok, thanks again. Might be worth to put it in the description on the main page somewhere since this wasn't obvious for me at all.

@Metapyziks

This comment has been minimized.

Copy link
Contributor

commented Nov 7, 2017

That's a fair point, so I've updated the readme to mention the editor script.

@garrynewman garrynewman closed this Dec 6, 2017

@cpioli

This comment has been minimized.

Copy link

commented Jan 3, 2018

I am having an issue with CopyStreamLibraries.cs in my game's Mac Build w/ Unity 5.6.3f1. The script is only moving steam_appid.txt to the correct position, not libsteam_api.dylib. Any attempt to copy/paste the .dylib into the .app file's directory or into Contents/Frameworks/MonoEmbedRuntime/osx/ results in the same problems @Tinytouchtales mentioned.

Until I can be sure our Mac build can connect to Steamworks and update Achievements I do not feel safe uploading the new build.

[edit: I also mentioned this on the FP.Steamworks thread in the Steam developers' forum, and thought I should repost it here]

[edit 2: pardon the double post. whoops]

@Tinytouchtales

This comment has been minimized.

Copy link
Author

commented Jan 5, 2018

@cpioli After you've moved the file by hand you need to publish the game to Steam itself. For me Steam only works either in the Unity3D editor or when running the game from the official steam client. Starting the App from your desktop with the files correctly copied will not start steam correctly.

@cpioli

This comment has been minimized.

Copy link

commented Jan 5, 2018

If that's the case, I suppose my team and I have no choice. For clarification, though, does the dylib has to be put into the .app file's directory, or Contents/Frameworks/MonoEmbedRuntime/osx/?

@Tinytouchtales

This comment has been minimized.

Copy link
Author

commented Jan 6, 2018

@cpioli like i described above: manually fixed this issue by going into the .app package (right click, show package content) to Contents/Frameworks/MonoEmbedRuntime/osx/ and copying the missing dylib manually there.

@Tinytouchtales

This comment has been minimized.

Copy link
Author

commented Jan 8, 2018

@cpioli

here's how my Unity root looks like: https://imgur.com/PvJ1OPs
here's how my .app content looks like: https://imgur.com/ttm3Xap
here's my achievement code: https://pastebin.com/eYJJvsMx

@cpioli

This comment has been minimized.

Copy link

commented Jan 8, 2018

Hi @Tinytouchtales, I actually got it working. The final issue was that I forgot the steam_appid.txt file. Once that was in it worked perfectly! Thanks for all your help, we're going to launch sometime this week.

@danoli3

This comment has been minimized.

Copy link
Contributor

commented Jan 19, 2018

Modifying the Application package as described after the Post Build, unity flags the application as modified and not genuine. I'm working on an alternate solution I'll PR when finished.

@kkukshtel

This comment has been minimized.

Copy link
Contributor

commented Apr 24, 2019

Any follow up here? @danoli3 did you submit at PR that fixes this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.