Initial commit
This commit is contained in:
commit
eed5b33a82
4 changed files with 72 additions and 0 deletions
13
LICENSE
Normal file
13
LICENSE
Normal file
|
@ -0,0 +1,13 @@
|
|||
Copyright (c) 2021 Marco "eukara" Hladik
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
13
compatibilitytool.vdf
Normal file
13
compatibilitytool.vdf
Normal file
|
@ -0,0 +1,13 @@
|
|||
"compatibilitytools"
|
||||
{
|
||||
"compat_tools"
|
||||
{
|
||||
"fteqw_wrapper" // Internal name of this tool
|
||||
{
|
||||
"install_path" "."
|
||||
"display_name" "FTEQW"
|
||||
"from_oslist" "windows"
|
||||
"to_oslist" "linux"
|
||||
}
|
||||
}
|
||||
}
|
39
fteqw_wrapper
Executable file
39
fteqw_wrapper
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
# there's run & wait-before-run, we only care about the latter.
|
||||
COMMANDTYPE=$1
|
||||
|
||||
# this is how Steam tries to run the game
|
||||
if [ "$COMMANDTYPE" == "wait-before-run" ]; then
|
||||
# used to decipher which game we'll play
|
||||
GAMEBINARY=$(basename "$2")
|
||||
# steam game dir
|
||||
GAMEDIR=$(dirname "$2")
|
||||
|
||||
# we have an unknown amount of parameters, let's make sure we get them
|
||||
# make sure this is quotes, because HeXen II has a space in its path
|
||||
PARMARR=( "$@" )
|
||||
ARGLEN=${#PARMARR[@]}
|
||||
|
||||
# get every parameter after the second (game location) and put it into
|
||||
# its own variable to pass over later
|
||||
GAMEARGS=${PARMARR[@]:2:$ARGLEN-1}
|
||||
|
||||
if [ "$GAMEBINARY" == "Winquake.exe" ]; then
|
||||
fteqw -basedir "$GAMEDIR" $GAMEARGS
|
||||
elif [ "$GAMEBINARY" == "qwcl.exe" ]; then
|
||||
fteqw -basedir "$GAMEDIR" -game qw $GAMEARGS
|
||||
elif [ "$GAMEBINARY" == "Glquake.exe" ]; then
|
||||
fteqw -basedir "$GAMEDIR" $GAMEARGS
|
||||
elif [ "$GAMEBINARY" == "glqwcl.exe" ]; then
|
||||
fteqw -basedir "$GAMEDIR" -game qw $GAMEARGS
|
||||
elif [ "$GAMEBINARY" == "quake3.exe" ]; then
|
||||
fteqw -basedir "$GAMEDIR" -quake3 $GAMEARGS
|
||||
elif [ "$GAMEBINARY" == "quake2.exe" ]; then
|
||||
fteqw -basedir "$GAMEDIR" -quake2 $GAMEARGS
|
||||
elif [ "$GAMEBINARY" == "glh2.exe" ]; then
|
||||
fteqw -basedir "$GAMEDIR" -hexen2 $GAMEARGS
|
||||
else
|
||||
fteqw -basedir "$GAMEDIR" $GAMEARGS
|
||||
fi
|
||||
fi
|
7
toolmanifest.vdf
Normal file
7
toolmanifest.vdf
Normal file
|
@ -0,0 +1,7 @@
|
|||
"manifest"
|
||||
{
|
||||
"commandline" "/fteqw_wrapper run"
|
||||
"commandline_waitforexitandrun" "/fteqw_wrapper wait-before-run"
|
||||
"commandline_getnativepath" "/fteqw_wrapper get-native-path"
|
||||
"commandline_getcompatpath" "/fteqw_wrapper get-compat-path"
|
||||
}
|
Loading…
Reference in a new issue