Steam for Mac code reveals Linux compatibility in the works

By on
The folks over at Phoronix have found compelling evidence that Valve has plans for a Linux-friendly version of Steam. After rummaging through the bash launcher used by Steam for Mac OS X, the site discovered code referring directly to Linux -- something that isn't present on the Windows version of Steam. You can view the script after the break.

Phoronix says the launcher "checks the platform so that the appropriate library path can be added to the respective environmental variable for loading Steam's shared libraries needed by the client." It then launches the Steam library, which prompts another conditional platform check.

The site added that such an addition to the OS X version of Steam would be pointless if Valve doesn't have plans to run it on Linux. "This script could have been more easily hard-coded to be specific to Mac OS X, but it was not, and boasts Linux compatibility." Further proof can be found here.

So how about it? Is Valve's friendly neighborhood game distribution center finally headed for Linux?
#!/bin/bash

# figure out the absolute path to the script being run a bit
# non-obvious, the ${0%/*} pulls the path out of $0, cd's into the
# specified directory, then uses $PWD to figure out where that
# directory lives - and all this in a subshell, so we don't affect
# $PWD

STEAMROOT=$(cd "${0%/*}" && echo $PWD)

#determine platform
UNAME=`uname`
if [ "$UNAME" == "Darwin" ]; then
PLATFORM=osx32
# prepend our lib path to LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH="${STEAMROOT}"/${PLATFORM}:$DYLD_LIBRARY_PATH
elif [ "$UNAME" == "Linux" ]; then
PLATFORM=linux32
# prepend our lib path to LD_LIBRARY_PATH
export LD_LIBRARY_PATH="${STEAMROOT}"/${PLATFORM}:$LD_LIBRARY_PATH
fi


if [ -z $STEAMEXE ]; then
STEAMEXE=steam
fi

ulimit -n 2048

# and launch steam
cd "$STEAMROOT"

STATUS=42
while [ $STATUS -eq 42 ]; do
${DEBUGGER} "${STEAMROOT}"/${PLATFORM}/${STEAMEXE} $@
STATUS=$?
# are we running osx?
if [ $STATUS -eq 42 -a ${PLATFORM} == "osx32" -a -f Info.plist ]; then
# are we running from in a bundle?
exec open "${STEAMROOT}"/../..
fi
done
exit $STATUS

Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...
Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.