Added ability for custom WINE install
This commit is contained in:
parent
d975da7c6f
commit
f2481d57f3
1 changed files with 42 additions and 8 deletions
50
Winegon.sh
50
Winegon.sh
|
@ -2,6 +2,15 @@
|
|||
mkdir -p $HOME/.local/share/polygon-prefix
|
||||
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 [[ ($WINEBIN == Default) ]]; then
|
||||
WINEBIN=$(which wine)
|
||||
else
|
||||
echo "Warning: using custom wine binary"
|
||||
fi
|
||||
|
||||
#Dependencies
|
||||
fedora_install () {
|
||||
sudo dnf install wine winetricks
|
||||
|
@ -45,10 +54,21 @@ check_dependencies () {
|
|||
}
|
||||
|
||||
#Downloads Polygon
|
||||
download_game_base () {
|
||||
if [ $WINEPREFIXX ]; then
|
||||
echo "Prefix already exists, removing"
|
||||
rm -rf $WINEPREFIXX
|
||||
mkdir -p $WINEPREFIXX
|
||||
else
|
||||
echo "No prefix exists, creating one"
|
||||
mkdir -p $WINEPREFIXX
|
||||
fi
|
||||
}
|
||||
|
||||
download_game_10 () {
|
||||
rm -f "Polygon2010.exe"
|
||||
wget "https://setup2010.pizzaboxer.xyz/Polygon2010.exe"
|
||||
env WINEPREFIX=$WINEPREFIXX wine "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/
|
||||
|
@ -58,7 +78,7 @@ download_game_10 () {
|
|||
download_game_11 () {
|
||||
rm -f "Polygon2011.exe"
|
||||
wget "https://setup2011.pizzaboxer.xyz/Polygon2011.exe"
|
||||
env WINEPREFIX=$WINEPREFIXX wine "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/
|
||||
|
@ -68,7 +88,7 @@ download_game_11 () {
|
|||
download_game_12 () {
|
||||
rm -f "Polygon2012.exe"
|
||||
wget "https://setup2012.pizzaboxer.xyz/Polygon2012.exe"
|
||||
env WINEPREFIX=$WINEPREFIXX wine "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/vcomp90.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/
|
||||
echo "2012 downloaded and installed!"
|
||||
|
@ -84,7 +104,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 wine $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/Polygon.exe %u" >> $DESKTOPFILE10
|
||||
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-386164ab165b55af/Polygon.exe %u" >> $DESKTOPFILE10
|
||||
echo "Categories=Game;" >> $DESKTOPFILE10
|
||||
echo "MimeType=$MIMETYPE10;" >> $DESKTOPFILE10
|
||||
|
||||
|
@ -100,7 +120,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 wine $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/Polygon.exe %u" >> $DESKTOPFILE11
|
||||
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-9512c515176f9859/Polygon.exe %u" >> $DESKTOPFILE11
|
||||
echo "Categories=Game;" >> $DESKTOPFILE11
|
||||
echo "MimeType=$MIMETYPE11;" >> $DESKTOPFILE11
|
||||
|
||||
|
@ -116,7 +136,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 wine $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/Polygon.exe %u" >> $DESKTOPFILE12
|
||||
echo "Exec=env WINEPREFIX=$WINEPREFIXX $WINEBIN $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/Polygon.exe %u" >> $DESKTOPFILE12
|
||||
echo "Categories=Game;" >> $DESKTOPFILE12
|
||||
echo "MimeType=$MIMETYPE12;" >> $DESKTOPFILE12
|
||||
|
||||
|
@ -180,6 +200,10 @@ resync_databases () {
|
|||
echo "Synced desktop and mime databases"
|
||||
}
|
||||
|
||||
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"
|
||||
|
@ -188,12 +212,14 @@ 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"
|
||||
echo "then press enter"
|
||||
read what
|
||||
|
||||
if [[ $what == 1 ]]; then
|
||||
echo "Selected to install every client"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
download_game_10
|
||||
download_game_11
|
||||
download_game_12
|
||||
|
@ -210,6 +236,7 @@ else
|
|||
if [[ $what == 2 ]]; then
|
||||
echo "Selected to install 2010"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
download_game_10
|
||||
desktop_file_10
|
||||
url_handler_base
|
||||
|
@ -220,6 +247,7 @@ else
|
|||
if [[ $what == 3 ]]; then
|
||||
echo "Selected to install 2011"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
download_game_11
|
||||
desktop_file_11
|
||||
url_handler_base
|
||||
|
@ -230,6 +258,7 @@ else
|
|||
if [[ $what == 4 ]]; then
|
||||
echo "Selected to install 2012"
|
||||
check_dependencies
|
||||
download_game_base
|
||||
download_game_12
|
||||
desktop_file_12
|
||||
url_handler_base
|
||||
|
@ -249,8 +278,13 @@ else
|
|||
echo "Selected to start 2012 Studio"
|
||||
env WINEPREFIX=$WINEPREFIXX wine $WINEPREFIXX/drive_c/users/$USER/AppData/Local/Project\ Polygon/Versions/version-f9324578ab26456f/PolygonStudio.exe
|
||||
else
|
||||
echo "No valid option specified"
|
||||
exit
|
||||
if [[ $what == 8 ]]; then
|
||||
echo "Killed wine processes in prefix"
|
||||
kill_processes
|
||||
else
|
||||
echo "No valid option specified"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue