protonscr

generic installer

steamclosed duplicate
ValveSoftware/steam-for-linux#769 · opened 2013-01-21 by ObiWahn · updated 2013-01-21 · 1 comments · github
OObiWahn 2013-01-21 github

Steam needs some generic installer (like the nvidia installer) and all other linux games (quake - humblebundle games). Not all people who want to use steam will have admin rights or are willing to install non distribution software into their systems.
So some executable bin or tar.gz that can be extracted in a directory is imo the only way to go. On most linux systems the following construct should solve most path and lib finding problems:

cat > steam << HERE

!/bin/bash

cpath="$(readlink -f "${BASH_SOURCE[0]}")"
cpath="${cpath%/*}" #path of current script
export PATH="$cpath/bin:$PATH"
export LD_LIBRARY_PATH="$cpath/lib:$LD_LIBRARY_PATH"
"$cpath"/bin/steam_linux.sh "$@" &
unset cpath
HERE

The existence of readlink could be checked by distribution (e.g. existence of /etc/debian_version) Creating such an installer will save you the pain of creating different packages. You are still able to list supported distributions. And the linux installer code for different distributions will be in a single place and not diverge.

In general relative scripts that try to find their own path or use relative path should be avoided. Another maybe better option would be to ask the user for some install_target dir and wirte a .streamrc file to $HOME containing the path. Then the full path read from the file can be used to set the env.
Im am not sure if you would be allowed to distribute the Ubuntu libc with steam but in doubt you could probably bootstrap it like done in this script: https://gist.github.com/4231563.

You should really hire some op from [email protected] and let one of them write a bash installer. it will be probably done in 2 hours:P

Jjohnv-valve maintainer 2013-01-21 github

Nothing extracted yet.