It nows sucessfully installs Brick Hill!
This commit is contained in:
parent
8452100aca
commit
4a582a86b5
1 changed files with 76 additions and 245 deletions
|
@ -1,13 +1,12 @@
|
|||
#!/bin/bash
|
||||
mkdir -p $HOME/.local/share/polygon-prefix
|
||||
WINEPREFIXX=$HOME/.local/share/polygon-prefix
|
||||
mkdir -p $HOME/.local/share/brick-hill-prefix
|
||||
WINEPREFIXX=$HOME/.local/share/brick-hill-prefix
|
||||
|
||||
# To change what WINE that is used, specify the path. An example would be wine-tkg/bin/wine
|
||||
WINEBIN=Default
|
||||
|
||||
# Variables for known Polygon install locations
|
||||
POLYGONPATHPROGRAM=$WINEPREFIXX/drive_c/Program\ Files\ \(x86\)/Project\ Polygon
|
||||
POLYGONPATHAPPDATA=$WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon
|
||||
BRICKHILLPATH=$WINEPREFIXX/drive_c/users/$USER/AppData/Roaming/Brick\ Hill
|
||||
|
||||
if [[ ($WINEBIN == Default) ]]; then
|
||||
WINEBIN=$(which wine)
|
||||
|
@ -31,33 +30,32 @@ debian_install () {
|
|||
arch_install () {
|
||||
sudo pacman -S --needed wine winetricks
|
||||
}
|
||||
|
||||
check_dependencies () {
|
||||
if [[ $(cat /etc/*-release | grep "Fedora") ]]; then
|
||||
echo "Detected Fedora!"
|
||||
fedora_install
|
||||
else
|
||||
if [[ $(cat /etc/*-release | grep "Ubuntu") ]] || [[ $(cat /etc/*-release | grep "LinuxMint") ]] || [[ $(cat /etc/*-release | grep "Pop") ]]; then
|
||||
echo "Detected Ubuntu or derivative!"
|
||||
ubuntu_install
|
||||
else
|
||||
if [[ $(cat /etc/*-release | grep "Debian") ]]; then
|
||||
echo "Detected Debian!"
|
||||
debian_install
|
||||
else
|
||||
if [[ $(cat /etc/*-release | grep "Arch Linux") ]] || [[ $(cat /etc/*-release | grep "SteamOS") ]]; then
|
||||
echo "Detected Arch Linux or derivative!"
|
||||
arch_install
|
||||
else
|
||||
echo "You're on an unsupported distro. Please manually install the required dependencies from the README.md or make a pull request adding support for your distro"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
alpine_install () {
|
||||
doas apk add wine winetricks
|
||||
}
|
||||
|
||||
check_dependencies() {
|
||||
if grep -q "Fedora" /etc/*-release; then
|
||||
echo "Detected Fedora!"
|
||||
fedora_install
|
||||
elif grep -qE "Ubuntu|LinuxMint|Pop" /etc/*-release; then
|
||||
echo "Detected Ubuntu or derivative!"
|
||||
ubuntu_install
|
||||
elif grep -q "Debian" /etc/*-release; then
|
||||
echo "Detected Debian!"
|
||||
debian_install
|
||||
elif grep -qE "Arch Linux|SteamOS" /etc/*-release; then
|
||||
echo "Detected Arch Linux or derivative!"
|
||||
arch_install
|
||||
elif grep -q "Alpine Linux" /etc/*-release; then
|
||||
echo "Detected Alpine Linux!"
|
||||
alpine_install
|
||||
else
|
||||
echo "You're on an unsupported distro. Please manually install the required dependencies from the README.md or make a pull request adding support for your distro."
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
#Downloads Polygon
|
||||
download_game_base () {
|
||||
if [ $WINEPREFIXX ]; then
|
||||
echo "Prefix already exists, removing"
|
||||
|
@ -69,103 +67,27 @@ download_game_base () {
|
|||
fi
|
||||
}
|
||||
|
||||
download_game_10 () {
|
||||
rm -f "Polygon2010.exe"
|
||||
wget "https://setup2010.pizzaboxer.xyz/Polygon2010.exe"
|
||||
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2010.exe"
|
||||
echo "2010 downloaded and installed!"
|
||||
download_game () {
|
||||
rm -f "BrickHillSetup.exe"
|
||||
wget "https://brkcdn.com/downloads/BrickHillSetup.exe"
|
||||
env WINEPREFIX=$WINEPREFIXX $WINEBIN "BrickHillSetup.exe"
|
||||
echo "Brick Hill Downloaded and installed!"
|
||||
}
|
||||
|
||||
download_game_11 () {
|
||||
rm -f "Polygon2011.exe"
|
||||
wget "https://setup2011.pizzaboxer.xyz/Polygon2011.exe"
|
||||
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2011.exe"
|
||||
echo "2011 downloaded and installed!"
|
||||
}
|
||||
|
||||
download_game_12 () {
|
||||
rm -f "Polygon2012.exe"
|
||||
wget "https://setup2012.pizzaboxer.xyz/Polygon2012.exe"
|
||||
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2012.exe"
|
||||
echo "2012 downloaded and installed!"
|
||||
}
|
||||
|
||||
check_install_path () {
|
||||
if [ -d "$POLYGONPATH"]; then
|
||||
echo "Polygon is installed in Program Files x86"
|
||||
POLYGONPATH=$POLYGONPATHPROGRAM
|
||||
else
|
||||
if [ -d "$POLYGONPATHAPPDATA"]; then
|
||||
echo "Polygon is installed in AppData"
|
||||
POLYGONPATH=$POLYGONPATHAPPDATA
|
||||
else
|
||||
echo "Polygon is not installed in a recognized path, report this problem in issues or on the Discord server"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
download_game_10_postsetup () {
|
||||
cp -r $POLYGONPATH/Versions/version-386164ab165b55af/Microsoft.VC90.CRT/msvcm90.dll $POLYGONPATH/Versions/version-386164ab165b55af/Microsoft.VC90.CRT/msvcp90.dll $POLYGONPATH/Versions/version-386164ab165b55af/
|
||||
cp -r $POLYGONPATH/Versions/version-386164ab165b55af/Microsoft.VC90.OPENMP/vcomp90.dll $POLYGONPATH/Versions/version-386164ab165b55af/
|
||||
cp -r $POLYGONPATH/Versions/version-386164ab165b55af/Microsoft.VC90.MFC/* $POLYGONPATH/Versions/version-386164ab165b55af/
|
||||
|
||||
download_game_11_postsetup () {
|
||||
cp -r $POLYGONPATH/Versions/version-9512c515176f9859/Microsoft.VC90.CRT/msvcm90.dll $POLYGONPATH/Versions/version-9512c515176f9859/Microsoft.VC90.CRT/msvcp90.dll $POLYGONPATH/Versions/version-9512c515176f9859/
|
||||
cp -r $POLYGONPATH/Versions/version-9512c515176f9859/Microsoft.VC90.OPENMP/vcomp90.dll $POLYGONPATH/Versions/version-9512c515176f9859/
|
||||
cp -r $POLYGONPATH/Versions/version-9512c515176f9859/Microsoft.VC90.MFC/* $POLYGONPATH/Versions/version-9512c515176f9859/
|
||||
|
||||
download_game_12_postsetup () {
|
||||
cp -r $POLYGONPATH/Versions/version-f9324578ab26456f/Microsoft.VC90.CRT/msvcr90.dll $POLYGONPATH/Versions/version-f9324578ab26456f/Microsoft.VC90.CRT/msvcp90.dll $POLYGONPATH/Versions/version-f9324578ab26456f/
|
||||
cp -r $POLYGONPATH/Versions/version-f9324578ab26456f/Microsoft.VC90.OPENMP/vcomp90.dll $POLYGONPATH/Versions/version-f9324578ab26456f/
|
||||
|
||||
#Creates .desktop files
|
||||
desktop_file_10 () {
|
||||
#Roblox 2010
|
||||
DESKTOPFILE10=$HOME/.local/share/applications/PolygonURL10.desktop
|
||||
MIMETYPE10=x-scheme-handler/polygon-ten
|
||||
echo "[Desktop Entry]" > $DESKTOPFILE10
|
||||
echo "Version=1.0" >> $DESKTOPFILE10
|
||||
echo "Type=Application" >> $DESKTOPFILE10
|
||||
echo "Name=Polygon URL 10" >> $DESKTOPFILE10
|
||||
echo "Comment=Play Polygon games!" >> $DESKTOPFILE10
|
||||
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN '$POLYGONPATH/Versions/version-386164ab165b55af/Polygon.exe' %u" >> $DESKTOPFILE10
|
||||
echo "Categories=Game;" >> $DESKTOPFILE10
|
||||
echo "MimeType=$MIMETYPE10;" >> $DESKTOPFILE10
|
||||
desktop_file () {
|
||||
DESKTOPFILE=$HOME/.local/share/applications/BrickHillURL.desktop
|
||||
MIMETYPE=x-scheme-handler/brickhill.legacy
|
||||
echo "[Desktop Entry]" > $DESKTOPFILE
|
||||
echo "Version=1.0" >> $DESKTOPFILE
|
||||
echo "Type=Application" >> $DESKTOPFILE
|
||||
echo "Name=Brick Hill URL" >> $DESKTOPFILE
|
||||
echo "Comment=Play Brick Hill games!" >> $DESKTOPFILE
|
||||
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN '$BRICKHILLPATH/Player.exe' %u" >> $DESKTOPFILE
|
||||
echo "Categories=Game;" >> $DESKTOPFILE
|
||||
echo "MimeType=$MIMETYPE;" >> $DESKTOPFILE
|
||||
|
||||
echo "Created 2010 desktop file!"
|
||||
}
|
||||
|
||||
desktop_file_11 () {
|
||||
#Roblox 2011
|
||||
DESKTOPFILE11=$HOME/.local/share/applications/PolygonURL11.desktop
|
||||
MIMETYPE11=x-scheme-handler/polygon-eleven
|
||||
echo "[Desktop Entry]" > $DESKTOPFILE11
|
||||
echo "Version=1.0" >> $DESKTOPFILE11
|
||||
echo "Type=Application" >> $DESKTOPFILE11
|
||||
echo "Name=Polygon URL 11" >> $DESKTOPFILE11
|
||||
echo "Comment=Play Polygon games!" >> $DESKTOPFILE11
|
||||
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN '$POLYGONPATH/Versions/version-9512c515176f9859/Polygon.exe' %u" >> $DESKTOPFILE11
|
||||
echo "Categories=Game;" >> $DESKTOPFILE11
|
||||
echo "MimeType=$MIMETYPE11;" >> $DESKTOPFILE11
|
||||
|
||||
echo "Created 2011 desktop file!"
|
||||
}
|
||||
|
||||
desktop_file_12 () {
|
||||
#Roblox 2012
|
||||
DESKTOPFILE12=$HOME/.local/share/applications/PolygonURL12.desktop
|
||||
MIMETYPE12=x-scheme-handler/polygon-twelve
|
||||
echo "[Desktop Entry]" > $DESKTOPFILE12
|
||||
echo "Version=1.0" >> $DESKTOPFILE12
|
||||
echo "Type=Application" >> $DESKTOPFILE12
|
||||
echo "Name=Polygon URL 12" >> $DESKTOPFILE12
|
||||
echo "Comment=Play Polygon games!" >> $DESKTOPFILE12
|
||||
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN '$POLYGONPATH/Versions/version-f9324578ab26456f/Polygon.exe' %u" >> $DESKTOPFILE12
|
||||
echo "Categories=Game;" >> $DESKTOPFILE12
|
||||
echo "MimeType=$MIMETYPE12;" >> $DESKTOPFILE12
|
||||
|
||||
echo "Created 2012 desktop file!"
|
||||
echo "Created Brick Hill desktop file!"
|
||||
}
|
||||
|
||||
url_handler_base () {
|
||||
|
@ -182,41 +104,19 @@ url_handler_base () {
|
|||
fi
|
||||
}
|
||||
|
||||
url_handler_10 () {
|
||||
MIMEENTRY10="$MIMETYPE10=$(basename "$DESKTOPFILE10")"
|
||||
if grep -Fxq "$MIMEENTRY10" "$MIMEAPPS"
|
||||
url_handler () {
|
||||
MIMEENTRY="$MIMETYPE=$(basename "$DESKTOPFILE")"
|
||||
if grep -Fxq "$MIMEENTRY" "$MIMEAPPS"
|
||||
then
|
||||
echo "URL handler for 10 is already created! Skipping..."
|
||||
else
|
||||
echo $MIMEENTRY10 >> $MIMEAPPS
|
||||
echo "Created URL handler for Polygon 10!"
|
||||
fi
|
||||
}
|
||||
|
||||
url_handler_11 () {
|
||||
MIMEENTRY11="$MIMETYPE11=$(basename "$DESKTOPFILE11")"
|
||||
if grep -Fxq "$MIMEENTRY11" "$MIMEAPPS"
|
||||
then
|
||||
echo "URL handler for 11 is already created! Skipping..."
|
||||
else
|
||||
echo $MIMEENTRY11 >> $MIMEAPPS
|
||||
echo "Created URL handler for Polygon 11!"
|
||||
fi
|
||||
}
|
||||
|
||||
url_handler_12 () {
|
||||
MIMEENTRY12="$MIMETYPE12=$(basename "$DESKTOPFILE12")"
|
||||
if grep -Fxq "$MIMEENTRY12" "$MIMEAPPS"
|
||||
then
|
||||
echo "URL handler for 12 is already created! Skipping..."
|
||||
else
|
||||
echo $MIMEENTRY12 >> $MIMEAPPS
|
||||
echo "Created URL handler for Polygon 12!"
|
||||
echo $MIMEENTRY >> $MIMEAPPS
|
||||
echo "Created URL handler for Brick Hill!"
|
||||
fi
|
||||
}
|
||||
|
||||
install_winetricks_dependencies () {
|
||||
env WINEPREFIX=$WINEPREFIXX winetricks --unattended vcrun2008 vcrun2015 mfc90
|
||||
env WINEPREFIX=$WINEPREFIXX winetricks --unattended dotnet40 gdiplus
|
||||
}
|
||||
|
||||
resync_databases () {
|
||||
|
@ -229,101 +129,32 @@ kill_processes () {
|
|||
env WINEPREFIX=$WINEPREFIXX "$WINEBIN"server -k
|
||||
}
|
||||
|
||||
echo "Welcome to Winegon! (for Project Polygon)"
|
||||
echo "type 1 to install every client"
|
||||
echo "type 2 to install 2010"
|
||||
echo "type 3 to install 2011"
|
||||
echo "type 4 to install 2012"
|
||||
echo "type 5 to start 2010 Studio"
|
||||
echo "type 6 to start 2011 Studio"
|
||||
echo "type 7 to start 2012 Studio"
|
||||
echo "type 8 to kill processes in prefix"
|
||||
run_updater () {
|
||||
env WINEPREFIX=$WINEPREFIXX $WINEBIN $WINEPREFIXX/drive_c/Program\ Files\ \(x86\)/Brick\ Hill/legacy_autoupdater.exe
|
||||
}
|
||||
|
||||
echo "Welcome to the Brick Hill Linux installer!"
|
||||
echo "type 1 to install Brick Hill"
|
||||
echo "type 2 to kill processes in prefix"
|
||||
echo "then press enter"
|
||||
read what
|
||||
|
||||
if [[ $what == 1 ]]; then
|
||||
echo "Selected to install every client"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
check_install_path
|
||||
download_game_10
|
||||
download_game_10_postsetup
|
||||
download_game_11
|
||||
download_game_11_postsetup
|
||||
download_game_12
|
||||
download_game_12_postsetup
|
||||
desktop_file_10
|
||||
desktop_file_11
|
||||
desktop_file_12
|
||||
url_handler_base
|
||||
url_handler_10
|
||||
url_handler_11
|
||||
url_handler_12
|
||||
resync_databases
|
||||
install_winetricks_dependencies
|
||||
else
|
||||
if [[ $what == 2 ]]; then
|
||||
echo "Selected to install 2010"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
check_install_path
|
||||
download_game_10
|
||||
download_game_10_postsetup
|
||||
desktop_file_10
|
||||
url_handler_base
|
||||
url_handler_10
|
||||
resync_databases
|
||||
install_winetricks_dependencies
|
||||
else
|
||||
if [[ $what == 3 ]]; then
|
||||
echo "Selected to install 2011"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
check_install_path
|
||||
download_game_11
|
||||
download_game_11_postsetup
|
||||
desktop_file_11
|
||||
url_handler_base
|
||||
url_handler_11
|
||||
resync_databases
|
||||
install_winetricks_dependencies
|
||||
else
|
||||
if [[ $what == 4 ]]; then
|
||||
echo "Selected to install 2012"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
check_install_path
|
||||
download_game_12
|
||||
download_game_12_postsetup
|
||||
desktop_file_12
|
||||
url_handler_base
|
||||
url_handler_12
|
||||
resync_databases
|
||||
install_winetricks_dependencies
|
||||
else
|
||||
if [[ $what == 5 ]]; then
|
||||
echo "Selected to start 2010 Studio"
|
||||
env WINEPREFIX=$WINEPREFIXX wine "$POLYGONPATH/Versions/version-386164ab165b55af/PolygonStudio.exe"
|
||||
else
|
||||
if [[ $what == 6 ]]; then
|
||||
echo "Selected to start 2011 Studio"
|
||||
env WINEPREFIX=$WINEPREFIXX wine "$POLYGONPATH/Versions/version-9512c515176f9859/PolygonStudio.exe"
|
||||
else
|
||||
if [[ $what == 7 ]]; then
|
||||
echo "Selected to start 2012 Studio"
|
||||
env WINEPREFIX=$WINEPREFIXX wine "$POLYGONPATH/Versions/version-f9324578ab26456f/PolygonStudio.exe"
|
||||
else
|
||||
if [[ $what == 8 ]]; then
|
||||
echo "Killed wine processes in prefix"
|
||||
kill_processes
|
||||
else
|
||||
echo "No valid option specified"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
case $what in
|
||||
1)
|
||||
echo "Selected to install Brick Hill"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
download_game
|
||||
desktop_file
|
||||
url_handler_base
|
||||
url_handler
|
||||
resync_databases
|
||||
install_winetricks_dependencies
|
||||
run_updater
|
||||
echo "Done!"
|
||||
;;
|
||||
2)
|
||||
echo "Selected to kill processes in prefix"
|
||||
kill_processes
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue