1
0
Atdalīts 0

Added Twitch client support

This commit is contained in:
Bret R. Human 2019-05-21 08:52:53 -04:00
vecāks a97e58f4e2
revīzija 5b28f61aee
2 mainīti faili ar 27 papildinājumiem un 4 dzēšanām

Parādīt failu

@ -10,7 +10,7 @@
## info@cynicaloptimist.me
#####################################################################
# bn3t-run
script_ver="0.1"
script_ver="0.2"
page="https://mage.cynicaloptimist.me/en/bn3t"
# author: Bret Human
# date: Dec 6, 2018
@ -38,6 +38,7 @@ page="https://mage.cynicaloptimist.me/en/bn3t"
runas_user="`whoami`"
app_name="Battle.net"
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)"
app_loc="/Battle.net/Battle.net.exe"
console="bash"
@ -51,6 +52,7 @@ Usage: ./`basename ${0}` -g (game) -p (prefix) -a (arch) -dvsbwtnchx
-s | Runs ${app_name} setup
-b | Runs wineboot
-w | Runs winetricks
-m | Runs Twitch client
-t | Attempts to launch to the system tray
-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)
@ -223,7 +225,7 @@ function run_wine () {
## 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
"g"|"G") game_launch="${OPTARG}";;
"d"|"D")
@ -242,6 +244,22 @@ while getopts ":g:G:p:P:a:A:dDvVsSbBwWtTnNcChHxX" option; do
*) inform "Weird architecture: ${OPTARG}, ignoring";;
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")
echo "Running winetricks..."
nobs_mode="y"

Parādīt failu

@ -10,7 +10,7 @@
## info@cynicaloptimist.me
#####################################################################
# bn3t
script_ver="0.1"
script_ver="0.2"
page="https://mage.cynicaloptimist.me/en/bn3t"
# author: Bret Human
# 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
-b | Runs wineboot
-w | Runs winetricks
-m | Runs Twitch Client (for /M/ods - I'm running out of letters)
-t | Attempts to launch to the system tray
-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)
@ -182,7 +183,7 @@ function check {
## Pick up any arguments provided
# None are required, we'll use default values.
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
"k"|"K") die 0;;
"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"
launch_opt="${launch_opt} -b"
;;
"m"|"M")
inform "Twitch mode"
launch_opt="${launch_opt} -m"
;;
"n"|"N")
inform "No BS mode"
nobs_mode="y"