From 690390a52a855290fe68fde97c9fd92967ea33c4 Mon Sep 17 00:00:00 2001 From: Techwizz Date: Sun, 24 Jul 2022 21:31:45 -0600 Subject: [PATCH] Added support for changing where Polygon is installed, along with updated default path --- Winegon.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Winegon.sh b/Winegon.sh index 77849d9..c288a6b 100755 --- a/Winegon.sh +++ b/Winegon.sh @@ -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 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 WINEBIN=$(which wine) else @@ -69,9 +72,9 @@ download_game_10 () { rm -f "Polygon2010.exe" wget "https://setup2010.pizzaboxer.xyz/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 $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 $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.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!" } @@ -79,9 +82,9 @@ download_game_11 () { rm -f "Polygon2011.exe" wget "https://setup2011.pizzaboxer.xyz/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 $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 $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.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!" } @@ -89,8 +92,8 @@ download_game_12 () { rm -f "Polygon2012.exe" wget "https://setup2012.pizzaboxer.xyz/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 $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.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!" } @@ -104,7 +107,7 @@ desktop_file_10 () { echo "Type=Application" >> $DESKTOPFILE10 echo "Name=Polygon URL 10" >> $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 "MimeType=$MIMETYPE10;" >> $DESKTOPFILE10 @@ -120,7 +123,7 @@ desktop_file_11 () { echo "Type=Application" >> $DESKTOPFILE11 echo "Name=Polygon URL 11" >> $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 "MimeType=$MIMETYPE11;" >> $DESKTOPFILE11 @@ -136,7 +139,7 @@ desktop_file_12 () { echo "Type=Application" >> $DESKTOPFILE12 echo "Name=Polygon URL 12" >> $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 "MimeType=$MIMETYPE12;" >> $DESKTOPFILE12