Checks for install path of Polygon

This commit is contained in:
Paul Black 2022-07-30 02:49:46 +00:00
parent abf55ba4d9
commit ad83285a82

View file

@ -5,8 +5,9 @@ WINEPREFIXX=$HOME/.local/share/polygon-prefix
# To change what WINE that is used, specify the path. An example would be wine-tkg/bin/wine
WINEBIN=Default
# If the install path for Polygon changes, change this variable
POLYGONPATH=$WINEPREFIXX/drive_c/Program\ Files\ \(x86\)/Project\ Polygon
# 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
if [[ ($WINEBIN == Default) ]]; then
WINEBIN=$(which wine)
@ -72,9 +73,6 @@ download_game_10 () {
rm -f "Polygon2010.exe"
wget "https://setup2010.pizzaboxer.xyz/Polygon2010.exe"
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2010.exe"
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/
echo "2010 downloaded and installed!"
}
@ -82,9 +80,6 @@ download_game_11 () {
rm -f "Polygon2011.exe"
wget "https://setup2011.pizzaboxer.xyz/Polygon2011.exe"
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2011.exe"
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/
echo "2011 downloaded and installed!"
}
@ -92,11 +87,39 @@ download_game_12 () {
rm -f "Polygon2012.exe"
wget "https://setup2012.pizzaboxer.xyz/Polygon2012.exe"
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2012.exe"
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/
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
@ -223,9 +246,13 @@ 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
@ -240,7 +267,9 @@ else
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
@ -251,7 +280,9 @@ else
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
@ -262,7 +293,9 @@ else
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