Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ##
- # 2012, S.D.
- ##
- # S.D.'s script to (almost) properly launch Unity3D games
- # Assign absolute path to the game binary to the GAME_BINARY variable
- GAME_BINARY="/home/${USER}/bin/demos/Cornerstone/Linux_Build_2.3.x86_64"
- if [ x"$GAME_BINARY" = x'' ]
- then
- echo "Set GAME_BINARY to the game binary's absolute path in script '$0'"
- exit 1
- else if [ ! -f "$GAME_BINARY" ]
- then
- echo "GAME_BINARY is not set to the path to the game's binary"
- exit 1
- else if [ ! -x "$GAME_BINARY" ]
- then
- echo "GAME_BINARY is not executable; fix permissions"
- exit 1
- fi
- fi
- fi
- # Move to script's directory
- cd "`dirname $(realpath "$GAME_BINARY")`"
- XWININFO_HEIGHT=$(xwininfo -root | grep Height | cut -d ' ' -f 4)
- XWININFO_WIDTH=$(xwininfo -root | grep Width | cut -d ' ' -f 4)
- exec ${GAME_BINARY} -screen-height $XWININFO_HEIGHT -screen-width $XWININFO_WIDTH
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement