Clay 24 Posted April 21, 2010 We have our hands on the bash launcher used by Valve's Steam client for Mac OS X that was recently announced -- along with the Source Engine for OS X -- and is currently in closed beta. While such scripts are usually insignificant, there is something interesting within it and that is explicit support for Linux.Here's the proof.#!/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# $PWDSTEAMROOT=$(cd "${0%/*}" && echo $PWD)#determine platformUNAME=`uname`if [ "$UNAME" == "Darwin" ]; then PLATFORM=osx32 # prepend our lib path to LD_LIBRARY_PATH export DYLD_LIBRARY_PATH="${STEAMROOT}"/${PLATFORM}:$DYLD_LIBRARY_PATHelif [ "$UNAME" == "Linux" ]; then PLATFORM=linux32 # prepend our lib path to LD_LIBRARY_PATH export LD_LIBRARY_PATH="${STEAMROOT}"/${PLATFORM}:$LD_LIBRARY_PATHfiWhy would Valve bother writing in support for Linux launching if they aren't porting it there? brb needs new pants.Source: http://www.phoronix.com/scan.php?page=article&item=steam_linux_script&num=1 Quote Share this post Link to post Share on other sites
Guitar Guy 25 Posted April 22, 2010 That's really awesome. If steam (and the source engine) were ported to linux, I'd switch. Oh, and Bad Company 2. Which I know that isn't happening :/ Quote Share this post Link to post Share on other sites
WaaX 6 Posted April 22, 2010 Too bad that nvidia hates open source and refuses to write drivers for their new hardware. Quote Share this post Link to post Share on other sites
Guest rw.Sentenced Posted April 22, 2010 Anyone actually seen what this does? This does nothing except determine the OS. What proof is there that this is even legit code? Quote Share this post Link to post Share on other sites
Dojima 7619 Posted April 22, 2010 Anyone actually seen what this does? This does nothing except determine the OS. What proof is there that this is even legit code?haha, I was thinking the same thing. It's rather specious, but you never know. Could have just been included to give nerds a boner. Quote Share this post Link to post Share on other sites
Fruggles 23 Posted April 22, 2010 Could have just been included to give nerds a boner.Mission Accomplished. Quote Share this post Link to post Share on other sites
Levyon 0 Posted April 22, 2010 Isn't OSX based off of Darwin? Quote Share this post Link to post Share on other sites
Clay 24 Posted April 22, 2010 Isn't OSX based off of Darwin?Yes.For you whistleblowers out there, if you don't mind being wrong, read this thread:http://www.phoronix.com/forums/showthread.php?t=23326Very clearly links to Steam Linux builds. Quote Share this post Link to post Share on other sites
Guest rw.Sentenced Posted April 22, 2010 So a website said they found something. So What? Until i get a copy of that launcher and see the bash code for myself, i aint believing it Quote Share this post Link to post Share on other sites
Clay 24 Posted April 22, 2010 So a website said they found something. So What? Until i get a copy of that launcher and see the bash code for myself, i aint believing itYou obviously didn't click the link...It's all on the Steampowered website. :|public_all.zipskins_all.zipbins_linux.zipsteam_linux.zipThe last two are where the important things are.Here's the whole bash script:#!/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# $PWDSTEAMROOT=$(cd "${0%/*}" && echo $PWD)#determine platformUNAME=`uname`if [ "$UNAME" == "Darwin" ]; then PLATFORM=osx32 # prepend our lib path to LD_LIBRARY_PATH export DYLD_LIBRARY_PATH="${STEAMROOT}"/${PLATFORM}:$DYLD_LIBRARY_PATH # make sure our architecture is sane ARCH=`arch` case "$ARCH" in ppc* ) osascript -e 'tell application "Dock" display dialog "Steam is only supported on Intel-based Macs." buttons "Exit" default button 1 with title "Unsupported Architecture" with icon stop activate end tell' exit -1 ;; esac # make sure we're running >= 10.5.0 OSXVER=`sw_vers -productVersion` case "$OSXVER" in 10.0.* | 10.1.* | 10.2.* | 10.3.* | 10.4.* ) osascript -e 'tell application "Dock" display dialog "Steam Requires OSX 10.5 or greater" buttons "Exit" default button 1 with title "Unsupported Operating System" with icon stop activate end tell' exit -1 ;; esac elif [ "$UNAME" == "Linux" ]; then PLATFORM=linux32 # prepend our lib path to LD_LIBRARY_PATH export LD_LIBRARY_PATH="${STEAMROOT}"/${PLATFORM}:$LD_LIBRARY_PATHfiif [ -z $STEAMEXE ]; then STEAMEXE=steamfiulimit -n 2048# and launch steamcd "$STEAMROOT"STATUS=42while [ $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}"/../.. fidoneexit $STATUS Quote Share this post Link to post Share on other sites
Tansen 52 Posted April 23, 2010 Here's the proof.#!/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# $PWDSTEAMROOT=$(cd "${0%/*}" && echo $PWD)#determine platformUNAME=`uname`if [ "$UNAME" == "Darwin" ]; then PLATFORM=osx32 # prepend our lib path to LD_LIBRARY_PATH export DYLD_LIBRARY_PATH="${STEAMROOT}"/${PLATFORM}:$DYLD_LIBRARY_PATHelif [ "$UNAME" == "Linux" ]; then PLATFORM=linux32 # prepend our lib path to LD_LIBRARY_PATH export LD_LIBRARY_PATH="${STEAMROOT}"/${PLATFORM}:$LD_LIBRARY_PATHfiWhy would Valve bother writing in support for Linux launching if they aren't porting it there? brb needs new pants.Source: http://www.phoronix.com/scan.php?page=article&item=steam_linux_script&num=1I'll get the bucket clay. Quote Share this post Link to post Share on other sites
Clay 24 Posted April 23, 2010 I'll get the bucket clay.It's too late. My desk is covered. Quote Share this post Link to post Share on other sites