Stranded Deep

What are the prerequisites ?

In general:

These can be normally installed with the package manager of the Distribution. Anything else in the script are core tools, which are available in any Linux Distribution.

Just place this script in the same folder as the tool. Then execute it to prepare the prefix and execute the program.

Everything related to this tool will stay in the same folder.

#!/bin/bash
##Copyright © 2021 Max Megavolt <[email protected]>
##This work is free. You can redistribute it and/or modify it under the
##terms of the Do What The ■■■■ You Want To Public License, Version 2,
##as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
#Install Ubuntu/Debian requirements:
#sudo apt install wine winetricks
#Install Manjaro/Archlinux requirements:
#sudo pacman -Syu wine winetricks
LANG=C
export WINEPREFIX=${PWD}/prefix
export WINE=$(which wine)
export WINEBOOT=$(which wineboot)
export WINETRICKS=$(which winetricks)
export XDG_CACHE_HOME=${PWD}/cache
export yellow="\e[1;33m"
export red="\e[1;31m"
export green="\e[1;32m"
export reset="\e[0m"
# Only run if the exe of the tool is present
if [ -f ./StrandedDeepTools.exe ]; then

# Prepare the Wineprefix if not exist
if [ ! -d $WINEPREFIX ]
then
echo -e "$green[INFO]$reset Preparing prefix"

# Create the wineprefix and boot it up
if [ -n $WINEBOOT ]
then
[ ! -d $WINEPREFIX ] && mkdir -pv $WINEPREFIX
wineboot
else
echo -e "$red[FAILED]$reset Please install wine"
exit 1
fi

# Install Microsoft Framework 4.0 inside the wineprefix
if [ -n $WINETRICKS ]
then
[ ! -d $XDG_CACHE_HOME ] && mkdir -pv $XDG_CACHE_HOME
winetricks dotnet40
else
echo -e "$red[FAILED]$reset Please install winetricks"
exit 1
fi
else
echo -e "${yellow}[WARNING]${reset} Prefix already there. Skipping."
fi

if [ ! -h "$WINEPREFIX/drive_c/users/$USER/AppData/LocalLow/Beam Team Games" ]
then
# Create a symlink of the linux path of the Stranded Deep Profiles inside the wineprefix
echo -e "$green[WORKAROUND]$reset Creating a Symlink of Stranded Deep Savegame"
ln -srfv "$HOME/.config/unity3d/Beam Team Games/" \
"$WINEPREFIX/drive_c/users/$USER/AppData/LocalLow/Beam Team Games"
elif [ -h "$WINEPREFIX/drive_c/users/$USER/AppData/LocalLow/Beam Team Games" ]
then
echo -e "$green[INFO]$reset Symlink  exists already. Skipping."
echo -e "$green[INFO]$reset Symlink: $WINEPREFIX/drive_c/users/$USER/AppData/LocalLow/Beam Team Games"
fi

STEAMAPPS=$(find $HOME -name steamapps -type d | head -1)

if [ -z $STEAMAPPS ]
then
echo -e "${yellow}[WARNING]${reset} Steam seems not to be installed. Skipping."
elif [ -n $STEAMAPPS ]
then
# Create a symlink of the linux path of steamapps inside the wineprefix
echo -e "$green[INFO]$reset Found the steamapps directory here: $STEAMAPPS"
echo -e "$green[INFO]$reset Symlink: $STEAMAPPS"
[ ! -d "$WINEPREFIX/drive_c/Program Files (x86)/Steam" ] && mkdir -pv "$WINEPREFIX/drive_c/Program Files (x86)/Steam"
ln -srfv "$STEAMAPPS/" "$WINEPREFIX/drive_c/Program Files (x86)/Steam/steamapps"
fi

# Start the All-In One Tool for Stranded Deep
echo -e "$green[INFO]$reset Try running StrandedDeepTools"
wine StrandedDeepTools.exe
else
echo -e "${yellow}[WARNING]${reset} The file \"StrandedDeepTools.exe\" is not in the same folder as the script."
echo -e "$green[INFO]$reset Please place the script inside the folder of StrandedDeepTools and run it there."
fi

Article information

Added on

Written by

hantacore

0 comments