Added support for changing where Polygon is installed, along with updated default path

This commit is contained in:
Paul Black 2022-07-24 21:31:45 -06:00
parent 485ec69777
commit 690390a52a

View file

@ -5,6 +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 # To change what WINE that is used, specify the path. An example would be wine-tkg/bin/wine
WINEBIN=Default WINEBIN=Default
# If the install path for Polygon changes, change this variable
POLYGONPATH=$WINEPREFIXX/drive_c/Program\ Files\ \(x86\)/Project\ Polygon
if [[ ($WINEBIN == Default) ]]; then if [[ ($WINEBIN == Default) ]]; then
WINEBIN=$(which wine) WINEBIN=$(which wine)
else else
@ -69,9 +72,9 @@ download_game_10 () {
rm -f "Polygon2010.exe" rm -f "Polygon2010.exe"
wget "https://setup2010.pizzaboxer.xyz/Polygon2010.exe" wget "https://setup2010.pizzaboxer.xyz/Polygon2010.exe"
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2010.exe" env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2010.exe"
cp -r $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/Microsoft.VC90.CRT/msvcm90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/Microsoft.VC90.CRT/msvcp90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/ 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 $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/Microsoft.VC90.OPENMP/vcomp90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/ cp -r $POLYGONPATH/Versions/version-386164ab165b55af/Microsoft.VC90.OPENMP/vcomp90.dll $POLYGONPATH/Versions/version-386164ab165b55af/
cp -r $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/Microsoft.VC90.MFC/* $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/ cp -r $POLYGONPATH/Versions/version-386164ab165b55af/Microsoft.VC90.MFC/* $POLYGONPATH/Versions/version-386164ab165b55af/
echo "2010 downloaded and installed!" echo "2010 downloaded and installed!"
} }
@ -79,9 +82,9 @@ download_game_11 () {
rm -f "Polygon2011.exe" rm -f "Polygon2011.exe"
wget "https://setup2011.pizzaboxer.xyz/Polygon2011.exe" wget "https://setup2011.pizzaboxer.xyz/Polygon2011.exe"
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2011.exe" env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2011.exe"
cp -r $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/Microsoft.VC90.CRT/msvcm90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/Microsoft.VC90.CRT/msvcp90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/ 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 $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/Microsoft.VC90.OPENMP/vcomp90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/ cp -r $POLYGONPATH/Versions/version-9512c515176f9859/Microsoft.VC90.OPENMP/vcomp90.dll $POLYGONPATH/Versions/version-9512c515176f9859/
cp -r $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/Microsoft.VC90.MFC/* $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/ cp -r $POLYGONPATH/Versions/version-9512c515176f9859/Microsoft.VC90.MFC/* $POLYGONPATH/Versions/version-9512c515176f9859/
echo "2011 downloaded and installed!" echo "2011 downloaded and installed!"
} }
@ -89,8 +92,8 @@ download_game_12 () {
rm -f "Polygon2012.exe" rm -f "Polygon2012.exe"
wget "https://setup2012.pizzaboxer.xyz/Polygon2012.exe" wget "https://setup2012.pizzaboxer.xyz/Polygon2012.exe"
env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2012.exe" env WINEPREFIX=$WINEPREFIXX $WINEBIN "Polygon2012.exe"
cp -r $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/Microsoft.VC90.CRT/msvcr90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/Microsoft.VC90.CRT/msvcp90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/ 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 $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/Microsoft.VC90.OPENMP/vcomp90.dll $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/ cp -r $POLYGONPATH/Versions/version-f9324578ab26456f/Microsoft.VC90.OPENMP/vcomp90.dll $POLYGONPATH/Versions/version-f9324578ab26456f/
echo "2012 downloaded and installed!" echo "2012 downloaded and installed!"
} }
@ -104,7 +107,7 @@ desktop_file_10 () {
echo "Type=Application" >> $DESKTOPFILE10 echo "Type=Application" >> $DESKTOPFILE10
echo "Name=Polygon URL 10" >> $DESKTOPFILE10 echo "Name=Polygon URL 10" >> $DESKTOPFILE10
echo "Comment=Play Polygon games!" >> $DESKTOPFILE10 echo "Comment=Play Polygon games!" >> $DESKTOPFILE10
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/Polygon.exe %u" >> $DESKTOPFILE10 echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $POLYGONPATH/Versions/version-386164ab165b55af/Polygon.exe %u" >> $DESKTOPFILE10
echo "Categories=Game;" >> $DESKTOPFILE10 echo "Categories=Game;" >> $DESKTOPFILE10
echo "MimeType=$MIMETYPE10;" >> $DESKTOPFILE10 echo "MimeType=$MIMETYPE10;" >> $DESKTOPFILE10
@ -120,7 +123,7 @@ desktop_file_11 () {
echo "Type=Application" >> $DESKTOPFILE11 echo "Type=Application" >> $DESKTOPFILE11
echo "Name=Polygon URL 11" >> $DESKTOPFILE11 echo "Name=Polygon URL 11" >> $DESKTOPFILE11
echo "Comment=Play Polygon games!" >> $DESKTOPFILE11 echo "Comment=Play Polygon games!" >> $DESKTOPFILE11
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/Polygon.exe %u" >> $DESKTOPFILE11 echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $POLYGONPATH/Versions/version-9512c515176f9859/Polygon.exe %u" >> $DESKTOPFILE11
echo "Categories=Game;" >> $DESKTOPFILE11 echo "Categories=Game;" >> $DESKTOPFILE11
echo "MimeType=$MIMETYPE11;" >> $DESKTOPFILE11 echo "MimeType=$MIMETYPE11;" >> $DESKTOPFILE11
@ -136,7 +139,7 @@ desktop_file_12 () {
echo "Type=Application" >> $DESKTOPFILE12 echo "Type=Application" >> $DESKTOPFILE12
echo "Name=Polygon URL 12" >> $DESKTOPFILE12 echo "Name=Polygon URL 12" >> $DESKTOPFILE12
echo "Comment=Play Polygon games!" >> $DESKTOPFILE12 echo "Comment=Play Polygon games!" >> $DESKTOPFILE12
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/Polygon.exe %u" >> $DESKTOPFILE12 echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $POLYGONPATH/Versions/version-f9324578ab26456f/Polygon.exe %u" >> $DESKTOPFILE12
echo "Categories=Game;" >> $DESKTOPFILE12 echo "Categories=Game;" >> $DESKTOPFILE12
echo "MimeType=$MIMETYPE12;" >> $DESKTOPFILE12 echo "MimeType=$MIMETYPE12;" >> $DESKTOPFILE12