How do I launch my game on steam via script?

44 views Asked by At

I've uploaded my game to steam and trying to make it work on windows, linux and macos. I've got macos working and now I'm trying to get linux working.

I'm writing my game in bevy (rust) and using the bevy_steamworks plugin to connect to the steam api which means I have set up the path to "libsteam_api.so". I've included "libsteam_api.so" in the zip file I uploaded and I've set steam to launch this script when you press play:

#!/bin/sh

export LD_LIBRARY_PATH="."
./glow "$@"

The script works great when I run it via the terminal but when launching through Steam the game exists immediately. Is there a better approach without a script or is there some simple error in my script?

1

There are 1 answers

0
Frank Weslien On

I made a slight modification to the script to let the game get the same process ID as the script but the real problem was that the game and executable were nested in a subfolder. So the export LD_LIBRARY_PATH="." the path was wrong. I removed the unnecessary folder and lifted everything up one step and now it works :)

Modified script:

#!/bin/sh

export LD_LIBRARY_PATH="."
exec ./glow "$@"