Added internal unix2dos so that the external program is no longer needed.

This commit is contained in:
stormdragon2976 2023-06-12 11:21:40 -04:00
parent 88e3378f6a
commit 0e8a15611a

View File

@ -215,12 +215,6 @@ checklist() {
fi fi
packageList+=("perl") packageList+=("perl")
packageList+=("sqlite") packageList+=("sqlite")
if command -v unix2dos &> /dev/null ; then
[[ $# -eq 0 ]] && echo "Dos2unix is installed."
else
errorList+=("Warning: unix2dos is not installed. Some games need a configuration file in dos format before they will run.")
fi
packageList+=("unix2dos")
if command -v w3m &> /dev/null ; then if command -v w3m &> /dev/null ; then
[[ $# -eq 0 ]] && echo "W3m is installed." [[ $# -eq 0 ]] && echo "W3m is installed."
else else
@ -517,6 +511,18 @@ install_wine() {
set +e set +e
} }
unix2dos() {
if [[ $# -eq 0 ]]; then
echo "Usage: unix2dos file(s)."
exit 1
fi
for file in "${@}" ; do
sed -i 's/$/\r/' "${file}"
done
}
winetricks() { winetricks() {
# Report used packages to the winetricks maintainer so he knows they are being used. # Report used packages to the winetricks maintainer so he knows they are being used.
if ! [[ -e "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" ]]; then if ! [[ -e "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" ]]; then
@ -2238,7 +2244,7 @@ download "https://erion.cf/files/ag_103.zip"
mkdir -p "$WINEPREFIX/drive_c/Program Files/bsc-key-generator" mkdir -p "$WINEPREFIX/drive_c/Program Files/bsc-key-generator"
7z x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z" 7z x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z"
echo "$USER"$'\n'"$(hostname)"$'\n'"none"$'\n'"US" > "$WINEPREFIX/drive_c/Program Files/Hunter/config.dat" echo "$USER"$'\n'"$(hostname)"$'\n'"none"$'\n'"US" > "$WINEPREFIX/drive_c/Program Files/Hunter/config.dat"
command -v unix2dos &> /dev/null && unix2dos "$WINEPREFIX/drive_c/Program Files/Hunter/config.dat" || echo "Warning! You do not have unix2dos or dos2unix installed, Hunter may not work!" unix2dos "$WINEPREFIX/drive_c/Program Files/Hunter/config.dat"
if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then
wine "c:\Program Files\Hunter\HunterRegistration.exe" & wine "c:\Program Files\Hunter\HunterRegistration.exe" &
xdotool sleep 10 key Return sleep 2 key Return sleep 2 key Alt+n xdotool sleep 10 key Return sleep 2 key Return sleep 2 key Alt+n
@ -3035,7 +3041,7 @@ export norh=false # Must install a voice, and rhvoice works easily with 64 bit.
mkdir -p "$WINEPREFIX/drive_c/Program Files/bsc-key-generator" mkdir -p "$WINEPREFIX/drive_c/Program Files/bsc-key-generator"
7z x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z" 7z x -o"$WINEPREFIX/drive_c/Program Files/bsc-key-generator" "${cache}/BSC unlock code generator.7z"
echo "$USER"$'\n'"$(hostname)"$'\n'"none"$'\n'"US" > "$WINEPREFIX/drive_c/Program Files/Troopanum 2.0/config.dat" echo "$USER"$'\n'"$(hostname)"$'\n'"none"$'\n'"US" > "$WINEPREFIX/drive_c/Program Files/Troopanum 2.0/config.dat"
command -v unix2dos &> /dev/null && unix2dos "$WINEPREFIX/drive_c/Program Files/Troopanum 2.0/config.dat" || echo "Warning! You do not have unix2dos or dos2unix installed, Troopanum 2.0 may not work!" unix2dos "$WINEPREFIX/drive_c/Program Files/Troopanum 2.0/config.dat"
if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then if command -v xclip &> /dev/null && command -v xdotool &> /dev/null ; then
wine "c:\Program Files\Troopanum 2.0\register.exe" & wine "c:\Program Files\Troopanum 2.0\register.exe" &
xdotool sleep 10 key Return sleep 2 key Return sleep 2 key Alt+n xdotool sleep 10 key Return sleep 2 key Return sleep 2 key Alt+n