Added Twitch client support
This commit is contained in:
parent
a97e58f4e2
commit
5b28f61aee
22
bn3t-run.sh
22
bn3t-run.sh
|
@ -10,7 +10,7 @@
|
||||||
## info@cynicaloptimist.me
|
## info@cynicaloptimist.me
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# bn3t-run
|
# bn3t-run
|
||||||
script_ver="0.1"
|
script_ver="0.2"
|
||||||
page="https://mage.cynicaloptimist.me/en/bn3t"
|
page="https://mage.cynicaloptimist.me/en/bn3t"
|
||||||
# author: Bret Human
|
# author: Bret Human
|
||||||
# date: Dec 6, 2018
|
# date: Dec 6, 2018
|
||||||
|
@ -38,6 +38,7 @@ page="https://mage.cynicaloptimist.me/en/bn3t"
|
||||||
runas_user="`whoami`"
|
runas_user="`whoami`"
|
||||||
app_name="Battle.net"
|
app_name="Battle.net"
|
||||||
dl_addr="https://www.battle.net/download/getInstallerForGame?os=win&locale=enUS&version=LIVE&gameProgram=BATTLENET_APP"
|
dl_addr="https://www.battle.net/download/getInstallerForGame?os=win&locale=enUS&version=LIVE&gameProgram=BATTLENET_APP"
|
||||||
|
tc_addr="https://desktop.twitchsvc.net/installer/windows/TwitchSetup.exe"
|
||||||
install_dir="/drive_c/Program Files (x86)"
|
install_dir="/drive_c/Program Files (x86)"
|
||||||
app_loc="/Battle.net/Battle.net.exe"
|
app_loc="/Battle.net/Battle.net.exe"
|
||||||
console="bash"
|
console="bash"
|
||||||
|
@ -51,6 +52,7 @@ Usage: ./`basename ${0}` -g (game) -p (prefix) -a (arch) -dvsbwtnchx
|
||||||
-s | Runs ${app_name} setup
|
-s | Runs ${app_name} setup
|
||||||
-b | Runs wineboot
|
-b | Runs wineboot
|
||||||
-w | Runs winetricks
|
-w | Runs winetricks
|
||||||
|
-m | Runs Twitch client
|
||||||
-t | Attempts to launch to the system tray
|
-t | Attempts to launch to the system tray
|
||||||
-n | No BS mode - doesn't launch an app (for boot/tricks/console safety)
|
-n | No BS mode - doesn't launch an app (for boot/tricks/console safety)
|
||||||
-c | Launch a console session as specified user (can launch Xapps)
|
-c | Launch a console session as specified user (can launch Xapps)
|
||||||
|
@ -223,7 +225,7 @@ function run_wine () {
|
||||||
|
|
||||||
|
|
||||||
## Pick up any arguments provided
|
## Pick up any arguments provided
|
||||||
while getopts ":g:G:p:P:a:A:dDvVsSbBwWtTnNcChHxX" option; do
|
while getopts ":g:G:p:P:a:A:dDvVsSbBwWtTnNcChHxXmM" option; do
|
||||||
case "${option}" in
|
case "${option}" in
|
||||||
"g"|"G") game_launch="${OPTARG}";;
|
"g"|"G") game_launch="${OPTARG}";;
|
||||||
"d"|"D")
|
"d"|"D")
|
||||||
|
@ -242,6 +244,22 @@ while getopts ":g:G:p:P:a:A:dDvVsSbBwWtTnNcChHxX" option; do
|
||||||
*) inform "Weird architecture: ${OPTARG}, ignoring";;
|
*) inform "Weird architecture: ${OPTARG}, ignoring";;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
"m"|"M")
|
||||||
|
echo "Running Twitch Client..."
|
||||||
|
nobs_mode="y"
|
||||||
|
|
||||||
|
if [ -d ${WINEPREFIX}/drive_c/users/${runas_user}/Application\ Data/Twitch ]; then
|
||||||
|
wine C:\\users\\${runas_user}\\Application\ Data\\Twitch\\Bin\\Twitch.exe
|
||||||
|
else
|
||||||
|
inform "...but it helps to install it first..."
|
||||||
|
if [ ! -f "/tmp/TwitchSetup.exe" ]; then
|
||||||
|
inform "/tmp/TwitchSetup.exe was not found. Retreiving."
|
||||||
|
wget -O "/tmp/TwitchSetup.exe" "${tc_addr}" ||
|
||||||
|
(echo "Failed to download installer from ${tc_addr}"; warp 1)
|
||||||
|
fi
|
||||||
|
wine "/tmp/TwitchSetup.exe"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
"w"|"W")
|
"w"|"W")
|
||||||
echo "Running winetricks..."
|
echo "Running winetricks..."
|
||||||
nobs_mode="y"
|
nobs_mode="y"
|
||||||
|
|
9
bn3t.sh
9
bn3t.sh
|
@ -10,7 +10,7 @@
|
||||||
## info@cynicaloptimist.me
|
## info@cynicaloptimist.me
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# bn3t
|
# bn3t
|
||||||
script_ver="0.1"
|
script_ver="0.2"
|
||||||
page="https://mage.cynicaloptimist.me/en/bn3t"
|
page="https://mage.cynicaloptimist.me/en/bn3t"
|
||||||
# author: Bret Human
|
# author: Bret Human
|
||||||
# date: Dec 6, 2018
|
# date: Dec 6, 2018
|
||||||
|
@ -59,6 +59,7 @@ Usage: ./`basename ${0}` -g (game) -u (user) -p (prefix) -a (arch) -dvksbwtnchxi
|
||||||
-s | Runs ${app_name} setup
|
-s | Runs ${app_name} setup
|
||||||
-b | Runs wineboot
|
-b | Runs wineboot
|
||||||
-w | Runs winetricks
|
-w | Runs winetricks
|
||||||
|
-m | Runs Twitch Client (for /M/ods - I'm running out of letters)
|
||||||
-t | Attempts to launch to the system tray
|
-t | Attempts to launch to the system tray
|
||||||
-n | No BS mode - doesn't launch an app (for boot/tricks/console safety)
|
-n | No BS mode - doesn't launch an app (for boot/tricks/console safety)
|
||||||
-c | Launch a console session as specified user (can launch Xapps)
|
-c | Launch a console session as specified user (can launch Xapps)
|
||||||
|
@ -182,7 +183,7 @@ function check {
|
||||||
## Pick up any arguments provided
|
## Pick up any arguments provided
|
||||||
# None are required, we'll use default values.
|
# None are required, we'll use default values.
|
||||||
launch_opt=""
|
launch_opt=""
|
||||||
while getopts ":g:G:u:U:p:P:a:A:dDvVkKsSbBwWtTnNcChHxXiI" option; do
|
while getopts ":g:G:u:U:p:P:a:A:dDvVkKsSbBwWtTnNcChHxXiImM" option; do
|
||||||
case "${option}" in
|
case "${option}" in
|
||||||
"k"|"K") die 0;;
|
"k"|"K") die 0;;
|
||||||
"g"|"G") launch_opt="${launch_opt} -g ${OPTARG}";;
|
"g"|"G") launch_opt="${launch_opt} -g ${OPTARG}";;
|
||||||
|
@ -222,6 +223,10 @@ while getopts ":g:G:u:U:p:P:a:A:dDvVkKsSbBwWtTnNcChHxXiI" option; do
|
||||||
inform "Wineboot mode"
|
inform "Wineboot mode"
|
||||||
launch_opt="${launch_opt} -b"
|
launch_opt="${launch_opt} -b"
|
||||||
;;
|
;;
|
||||||
|
"m"|"M")
|
||||||
|
inform "Twitch mode"
|
||||||
|
launch_opt="${launch_opt} -m"
|
||||||
|
;;
|
||||||
"n"|"N")
|
"n"|"N")
|
||||||
inform "No BS mode"
|
inform "No BS mode"
|
||||||
nobs_mode="y"
|
nobs_mode="y"
|
||||||
|
|
Loading…
Reference in New Issue