POL_Install_gecko

Informations

Creator Message
Quentin PÂRIS Anonymous

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 1359219
Wine: System

Feedbacks

Description

Install Gecko package. https://wiki.winehq.org/Gecko 

Source code

#!/bin/bash
# PlayOnLinux Function
# Date : see changelog
# Last revision : see changelog
# Author : Unknown
# Only For : http://www.playonlinux.com

# CHANGELOG:
# [Unknown] (?)
#   Initial script.
# [GNU_Raziel] (2011-08-28 21:00)
#   Update
# [Dadu042] (2020-10-12 14-00)
#   Attempt to make it easier to understand.
# [Dadu042] (2020-10-12 14-30)
#   Attempt to add Gecko v2.47 for Wine v1.9.13 to v3.x.x .
#   Note: the current default Gecko version is still v1.3.0 (2011 ?).

# Check if Gecko is already installed (otherwise do exit this script).
unset GECKO_EXIST
GECKO_EXIST=`find $WINEPREFIX -name "xul.dll"`
if [ ! -n "$GECKO_EXIST" ]; then
# Load the HTML rendering Engine (Gecko)
WINDIR="$WINEPREFIX/drive_c/windows/"
case `wine --version` in
wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.1.0
        GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56
        GECKO_EXT=cab
        ;;
wine-1.1.1[234]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.0
        GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09
        GECKO_EXT=cab
        ;;
wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.1
        GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8
        GECKO_EXT=cab
        ;;
esac
# x86_64 gecko package for wine64
if [ -e "$WINDIR/syswow64" ]; then
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
wine-1.9.1[3456789]|wine-2|wine-3)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=2.47
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=5ebc4ec71c92b3db3d84b334a1db385d
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
else
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
wine-1.9.1[3456789]|wine-2|wine-3)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=2.47
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=d93ac0d2e6aceafe9113a9918916df45
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
fi
 
# From this code: 
# http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
# the final URL is:
# http://downloads.sourceforge.net/wine/wine_gecko-1.3.0-x86.msi
# And as of 2020-10-12, this URL to this file is dead...

if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
then

        POL_Download_Resource "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"  "Gecko"

        # Obsolete code (since POL v3 or v4):
        # POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
        # mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
fi
 
# Extract files
if [ "$GECKO_EXT" == "cab" ]; then
        mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
        cd "$GECKO_DIR/gecko/$GECKO_VERSION"
        cabextract "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab"
        cd "$olddir"
else
        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.msi"
        cd "$olddir"
fi
 
 
cat > "$POL_USER_ROOT/tmp/geckopath.reg" <<_EOF_
REGEDIT4
 
[HKEY_LOCAL_MACHINE\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
_EOF_
 
printf '"GeckoPath"="' >>"$POL_USER_ROOT/tmp/geckopath.reg"
case $GECKO_VERSION in
0.*)
        printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
# x86 gecko path for wine64
if [ -e "$WINDIR/syswow64" ]; then
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
else
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
fi
 
# Set installation path
POL_Wine regedit "$POL_USER_ROOT/tmp/geckopath.reg"
     
# Register the dll, since it was disabled before
POL_Wine regsvr32 mshtml
fi

Contributions

Filters:

Contribute
Member Message
foriequal0 Saturday 4 September 2021 at 20:48
foriequal0 Anonymous

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -15,31 +15,37 @@
 # [Dadu042] (2020-10-12 14-30)
 #   Attempt to add Gecko v2.47 for Wine v1.9.13 to v3.x.x .
 #   Note: the current default Gecko version is still v1.3.0 (2011 ?).
+# [foriequal0] (2021-09-05)
+#   Fix detecting gecko installation which collides with mono28
+#   Fix gecko download URLs & checksums
+#   Fix wine 2, 3 version prefix detection
+#   Add wine 5, 6 support
 
+# Load the HTML rendering Engine (Gecko)
+WINDIR="$WINEPREFIX/drive_c/windows/"
 # Check if Gecko is already installed (otherwise do exit this script).
 unset GECKO_EXIST
-GECKO_EXIST=`find $WINEPREFIX -name "xul.dll"`
+GECKO_EXIST=$(find "$WINDIR" -name "xul.dll")
 if [ ! -n "$GECKO_EXIST" ]; then
-# Load the HTML rendering Engine (Gecko)
-WINDIR="$WINEPREFIX/drive_c/windows/"
+# Matching Gecko versions: https://wiki.winehq.org/Gecko#Installing
 case `wine --version` in
 wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
         GECKO_DIR="$WINDIR"
         GECKO_VERSION=0.1.0
-        GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56
-        GECKO_EXT=cab
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-0.1.0.cab"
+        GECKO_MD5SUM=b188c296f045d20abdb11e9c0564894b
         ;;
 wine-1.1.1[234]*)
         GECKO_DIR="$WINDIR"
         GECKO_VERSION=0.9.0
-        GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09
-        GECKO_EXT=cab
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-0.9.0.cab"
+        GECKO_MD5SUM=74b34ff5bad105f07fe17cdd1391c70c
         ;;
 wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
         GECKO_DIR="$WINDIR"
         GECKO_VERSION=0.9.1
-        GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8
-        GECKO_EXT=cab
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-0.9.1.cab"
+        GECKO_MD5SUM=6abd26c3caf66b497acf73958b5119a5
         ;;
 esac
 # x86_64 gecko package for wine64
@@ -48,37 +54,44 @@
 wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
         GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=1.0.0
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
-        GECKO_EXT=cab
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab"
+        GECKO_MD5SUM=9c5c335fc077c0558561afaf25a09e51
         ;;
 wine-1.3.[23456789]|wine-1.3.1[012345])
         GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=1.1.0
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
-        GECKO_EXT=cab
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.1.0-x86.cab"
+        GECKO_MD5SUM=7217cb91106f2efd85d6d1a84f5ee305
         ;;
 wine-1.3.1[6789]|wine-1.3.2[012345])
         GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=1.2.0
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
-        GECKO_EXT=msi
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.2.0-x86.msi"
+        GECKO_MD5SUM=f2ed548494c86c511892b1c02491c8c4
         ;;
-wine-1.9.1[3456789]|wine-2|wine-3)
+wine-1.9.1[3456789]|wine-2.*|wine-3.*)
         GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=2.47
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=5ebc4ec71c92b3db3d84b334a1db385d
-        GECKO_EXT=msi
+        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47/wine_gecko-2.47-x86.msi"
+        GECKO_MD5SUM=5ebc4ec71c92b3db3d84b334a1db385d
+        ;;
+wine-5.*)
+        GECKO_DIR="$WINDIR/syswow64"
+        GECKO_VERSION=2.47.1
+        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47.1/wine-gecko-2.47.1-x86.msi"
+        GECKO_MD5SUM=4a467150fac8256c8ea6a98a8eef1f67
+        ;;
+wine-6.*)
+        GECKO_DIR="$WINDIR/syswow64"
+        GECKO_VERSION=2.47.2
+        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86.msi"
+        GECKO_MD5SUM=e0a26e37397961b2c7f624575590ef66
         ;;
 *)
         GECKO_DIR="$WINDIR/syswow64"
-        GECKO_VERSION=1.3.0
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
-        GECKO_EXT=msi
+        GECKO_VERSION=1.3
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.3-x86.msi"
+        GECKO_MD5SUM=9e21684bb68d016b837744d53abb2fde
         ;;
 esac
 else
@@ -86,65 +99,63 @@
 wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
         GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=1.0.0
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
-        GECKO_EXT=cab
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab"
+        GECKO_MD5SUM=9c5c335fc077c0558561afaf25a09e51
         ;;
 wine-1.3.[23456789]|wine-1.3.1[012345])
         GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=1.1.0
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
-        GECKO_EXT=cab
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.1.0-x86.cab"
+        GECKO_MD5SUM=7217cb91106f2efd85d6d1a84f5ee305
         ;;
 wine-1.3.1[6789]|wine-1.3.2[012345])
         GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=1.2.0
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
-        GECKO_EXT=msi
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.2.0-x86.msi"
+        GECKO_MD5SUM=f2ed548494c86c511892b1c02491c8c4
         ;;
-wine-1.9.1[3456789]|wine-2|wine-3)
+wine-1.9.1[3456789]|wine-2.*|wine-3.*)
         GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=2.47
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=d93ac0d2e6aceafe9113a9918916df45
-        GECKO_EXT=msi
+        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47/wine_gecko-2.47-x86.msi"
+        GECKO_MD5SUM=5ebc4ec71c92b3db3d84b334a1db385d
 	;;
+wine-5.*)
+        GECKO_DIR="$WINDIR/system32"
+        GECKO_VERSION=2.47.1
+        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47.1/wine-gecko-2.47.1-x86.msi"
+        GECKO_MD5SUM=4a467150fac8256c8ea6a98a8eef1f67
+        ;;
+wine-6.*)
+        GECKO_DIR="$WINDIR/system32"
+        GECKO_VERSION=2.47.2
+        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86.msi"
+        GECKO_MD5SUM=e0a26e37397961b2c7f624575590ef66
+        ;;
 *)
         GECKO_DIR="$WINDIR/system32"
-        GECKO_VERSION=1.3.0
-        GECKO_ARCH=-x86
-        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
-        GECKO_EXT=msi
+        GECKO_VERSION=1.3
+        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.3-x86.msi"
+        GECKO_MD5SUM=9e21684bb68d016b837744d53abb2fde
         ;;
 esac
 fi
- 
-# From this code: 
-# http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
-# the final URL is:
-# http://downloads.sourceforge.net/wine/wine_gecko-1.3.0-x86.msi
-# And as of 2020-10-12, this URL to this file is dead...
 
-if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
+GECKO_INSTALLER="${GECKO_URL##*/}"
+if test ! -f "$POL_USER_ROOT/ressources/$GECKO_INSTALLER"
 then
-
-	POL_Download_Resource "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"  "Gecko"
-
-	# Obsolete code (since POL v3 or v4):
-	# POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
-        # mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
+	POL_Download_Resource "$GECKO_URL" "$GECKO_MD5SUM"
 fi
  
 # Extract files
+GECKO_EXT="${GECKO_URL##*.}"
 if [ "$GECKO_EXT" == "cab" ]; then
         mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
         cd "$GECKO_DIR/gecko/$GECKO_VERSION"
-        cabextract "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab"
+        cabextract "$POL_USER_ROOT/ressources/$GECKO_INSTALLER"
         cd "$olddir"
 else
-        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.msi"
+        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/$GECKO_INSTALLER"
         cd "$olddir"
 fi
  
@@ -155,33 +166,27 @@
 [HKEY_LOCAL_MACHINE\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
 _EOF_
  
-printf '"GeckoPath"="' >>"$POL_USER_ROOT/tmp/geckopath.reg"
+echo '"GeckoPath"="' >> "$POL_USER_ROOT/tmp/geckopath.reg"
 case $GECKO_VERSION in
 0.*)
-        printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
+        echo 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
         sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
         ;;
-esac
-# x86 gecko path for wine64
-if [ -e "$WINDIR/syswow64" ]; then
-case $GECKO_VERSION in
-1.*)
-        printf 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
-        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
-        ;;
-esac
-else
-case $GECKO_VERSION in
-1.*)
-        printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
-        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
+*)
+        # x86 gecko path for wine64
+        if [ -e "$WINDIR/syswow64" ]; then
+                echo 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
+                sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
+        else
+                echo 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
+                sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
+        fi
         ;;
 esac
-fi
- 
+
 # Set installation path
 POL_Wine regedit "$POL_USER_ROOT/tmp/geckopath.reg"
-     
+
 # Register the dll, since it was disabled before
 POL_Wine regsvr32 mshtml
 fi
\ No newline at end of file

New source code

#!/bin/bash
# PlayOnLinux Function
# Date : see changelog
# Last revision : see changelog
# Author : Unknown
# Only For : http://www.playonlinux.com

# CHANGELOG:
# [Unknown] (?)
#   Initial script.
# [GNU_Raziel] (2011-08-28 21:00)
#   Update
# [Dadu042] (2020-10-12 14-00)
#   Attempt to make it easier to understand.
# [Dadu042] (2020-10-12 14-30)
#   Attempt to add Gecko v2.47 for Wine v1.9.13 to v3.x.x .
#   Note: the current default Gecko version is still v1.3.0 (2011 ?).
# [foriequal0] (2021-09-05)
#   Fix detecting gecko installation which collides with mono28
#   Fix gecko download URLs & checksums
#   Fix wine 2, 3 version prefix detection
#   Add wine 5, 6 support

# Load the HTML rendering Engine (Gecko)
WINDIR="$WINEPREFIX/drive_c/windows/"
# Check if Gecko is already installed (otherwise do exit this script).
unset GECKO_EXIST
GECKO_EXIST=$(find "$WINDIR" -name "xul.dll")
if [ ! -n "$GECKO_EXIST" ]; then
# Matching Gecko versions: https://wiki.winehq.org/Gecko#Installing
case `wine --version` in
wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.1.0
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-0.1.0.cab"
        GECKO_MD5SUM=b188c296f045d20abdb11e9c0564894b
        ;;
wine-1.1.1[234]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.0
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-0.9.0.cab"
        GECKO_MD5SUM=74b34ff5bad105f07fe17cdd1391c70c
        ;;
wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.1
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-0.9.1.cab"
        GECKO_MD5SUM=6abd26c3caf66b497acf73958b5119a5
        ;;
esac
# x86_64 gecko package for wine64
if [ -e "$WINDIR/syswow64" ]; then
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.0.0
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab"
        GECKO_MD5SUM=9c5c335fc077c0558561afaf25a09e51
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.1.0
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.1.0-x86.cab"
        GECKO_MD5SUM=7217cb91106f2efd85d6d1a84f5ee305
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.2.0
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.2.0-x86.msi"
        GECKO_MD5SUM=f2ed548494c86c511892b1c02491c8c4
        ;;
wine-1.9.1[3456789]|wine-2.*|wine-3.*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=2.47
        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47/wine_gecko-2.47-x86.msi"
        GECKO_MD5SUM=5ebc4ec71c92b3db3d84b334a1db385d
        ;;
wine-5.*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=2.47.1
        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47.1/wine-gecko-2.47.1-x86.msi"
        GECKO_MD5SUM=4a467150fac8256c8ea6a98a8eef1f67
        ;;
wine-6.*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=2.47.2
        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86.msi"
        GECKO_MD5SUM=e0a26e37397961b2c7f624575590ef66
        ;;
*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.3
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.3-x86.msi"
        GECKO_MD5SUM=9e21684bb68d016b837744d53abb2fde
        ;;
esac
else
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.0.0
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab"
        GECKO_MD5SUM=9c5c335fc077c0558561afaf25a09e51
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.1.0
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.1.0-x86.cab"
        GECKO_MD5SUM=7217cb91106f2efd85d6d1a84f5ee305
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.2.0
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.2.0-x86.msi"
        GECKO_MD5SUM=f2ed548494c86c511892b1c02491c8c4
        ;;
wine-1.9.1[3456789]|wine-2.*|wine-3.*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=2.47
        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47/wine_gecko-2.47-x86.msi"
        GECKO_MD5SUM=5ebc4ec71c92b3db3d84b334a1db385d
        ;;
wine-5.*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=2.47.1
        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47.1/wine-gecko-2.47.1-x86.msi"
        GECKO_MD5SUM=4a467150fac8256c8ea6a98a8eef1f67
        ;;
wine-6.*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=2.47.2
        GECKO_URL="http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86.msi"
        GECKO_MD5SUM=e0a26e37397961b2c7f624575590ef66
        ;;
*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.3
        GECKO_URL="http://downloads.sourceforge.net/wine/wine_gecko-1.3-x86.msi"
        GECKO_MD5SUM=9e21684bb68d016b837744d53abb2fde
        ;;
esac
fi

GECKO_INSTALLER="${GECKO_URL##*/}"
if test ! -f "$POL_USER_ROOT/ressources/$GECKO_INSTALLER"
then
        POL_Download_Resource "$GECKO_URL" "$GECKO_MD5SUM"
fi
 
# Extract files
GECKO_EXT="${GECKO_URL##*.}"
if [ "$GECKO_EXT" == "cab" ]; then
        mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
        cd "$GECKO_DIR/gecko/$GECKO_VERSION"
        cabextract "$POL_USER_ROOT/ressources/$GECKO_INSTALLER"
        cd "$olddir"
else
        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/$GECKO_INSTALLER"
        cd "$olddir"
fi
 
 
cat > "$POL_USER_ROOT/tmp/geckopath.reg" <<_EOF_
REGEDIT4
 
[HKEY_LOCAL_MACHINE\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
_EOF_
 
echo '"GeckoPath"="' >> "$POL_USER_ROOT/tmp/geckopath.reg"
case $GECKO_VERSION in
0.*)
        echo 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
*)
        # x86 gecko path for wine64
        if [ -e "$WINDIR/syswow64" ]; then
                echo 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
                sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        else
                echo 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
                sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        fi
        ;;
esac

# Set installation path
POL_Wine regedit "$POL_USER_ROOT/tmp/geckopath.reg"

# Register the dll, since it was disabled before
POL_Wine regsvr32 mshtml
fi

Replies

Dadu042 Friday 4 December 2020 at 20:14
Dadu042

Message

Useless function, because from Wine v2 or v3, Wine does includes its own Gecko version.

Replies

Dadu042 Monday 12 October 2020 at 15:33
Dadu042

Information

This update has been approved by the team.

Differences

@@ -16,7 +16,7 @@
 #   Attempt to add Gecko v2.47 for Wine v1.9.13 to v3.x.x .
 #   Note: the current default Gecko version is still v1.3.0 (2011 ?).
 
-# Check if Gecko is not already installed
+# Check if Gecko is already installed (otherwise do exit this script).
 unset GECKO_EXIST
 GECKO_EXIST=`find $WINEPREFIX -name "xul.dll"`
 if [ ! -n "$GECKO_EXIST" ]; then
@@ -121,15 +121,18 @@
 esac
 fi
  
-# From this URL,
+# From this code: 
 # http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
-# What the final URL is:
+# the final URL is:
 # http://downloads.sourceforge.net/wine/wine_gecko-1.3.0-x86.msi
+# And as of 2020-10-12, this URL to this file is dead...
 
 if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
 then
 
 	POL_Download_Resource "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"  "Gecko"
+
+	# Obsolete code (since POL v3 or v4):
 	# POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
         # mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
 fi

New source code

#!/bin/bash
# PlayOnLinux Function
# Date : see changelog
# Last revision : see changelog
# Author : Unknown
# Only For : http://www.playonlinux.com

# CHANGELOG:
# [Unknown] (?)
#   Initial script.
# [GNU_Raziel] (2011-08-28 21:00)
#   Update
# [Dadu042] (2020-10-12 14-00)
#   Attempt to make it easier to understand.
# [Dadu042] (2020-10-12 14-30)
#   Attempt to add Gecko v2.47 for Wine v1.9.13 to v3.x.x .
#   Note: the current default Gecko version is still v1.3.0 (2011 ?).

# Check if Gecko is already installed (otherwise do exit this script).
unset GECKO_EXIST
GECKO_EXIST=`find $WINEPREFIX -name "xul.dll"`
if [ ! -n "$GECKO_EXIST" ]; then
# Load the HTML rendering Engine (Gecko)
WINDIR="$WINEPREFIX/drive_c/windows/"
case `wine --version` in
wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.1.0
        GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56
        GECKO_EXT=cab
        ;;
wine-1.1.1[234]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.0
        GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09
        GECKO_EXT=cab
        ;;
wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.1
        GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8
        GECKO_EXT=cab
        ;;
esac
# x86_64 gecko package for wine64
if [ -e "$WINDIR/syswow64" ]; then
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
wine-1.9.1[3456789]|wine-2|wine-3)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=2.47
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=5ebc4ec71c92b3db3d84b334a1db385d
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
else
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
wine-1.9.1[3456789]|wine-2|wine-3)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=2.47
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=d93ac0d2e6aceafe9113a9918916df45
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
fi
 
# From this code: 
# http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
# the final URL is:
# http://downloads.sourceforge.net/wine/wine_gecko-1.3.0-x86.msi
# And as of 2020-10-12, this URL to this file is dead...

if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
then

        POL_Download_Resource "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"  "Gecko"

        # Obsolete code (since POL v3 or v4):
        # POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
        # mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
fi
 
# Extract files
if [ "$GECKO_EXT" == "cab" ]; then
        mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
        cd "$GECKO_DIR/gecko/$GECKO_VERSION"
        cabextract "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab"
        cd "$olddir"
else
        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.msi"
        cd "$olddir"
fi
 
 
cat > "$POL_USER_ROOT/tmp/geckopath.reg" <<_EOF_
REGEDIT4
 
[HKEY_LOCAL_MACHINE\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
_EOF_
 
printf '"GeckoPath"="' >>"$POL_USER_ROOT/tmp/geckopath.reg"
case $GECKO_VERSION in
0.*)
        printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
# x86 gecko path for wine64
if [ -e "$WINDIR/syswow64" ]; then
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
else
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
fi
 
# Set installation path
POL_Wine regedit "$POL_USER_ROOT/tmp/geckopath.reg"
     
# Register the dll, since it was disabled before
POL_Wine regsvr32 mshtml
fi

Replies

Dadu042 Monday 12 October 2020 at 15:23
Dadu042

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

The download URL seems dead, and POL_SetupWindow_download seems obsolete.

Differences

@@ -121,10 +121,17 @@
 esac
 fi
  
+# From this URL,
+# http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
+# What the final URL is:
+# http://downloads.sourceforge.net/wine/wine_gecko-1.3.0-x86.msi
+
 if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
 then
-        POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
-        mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
+
+	POL_Download_Resource "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"  "Gecko"
+	# POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
+        # mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
 fi
  
 # Extract files

New source code

#!/bin/bash
# PlayOnLinux Function
# Date : see changelog
# Last revision : see changelog
# Author : Unknown
# Only For : http://www.playonlinux.com

# CHANGELOG:
# [Unknown] (?)
#   Initial script.
# [GNU_Raziel] (2011-08-28 21:00)
#   Update
# [Dadu042] (2020-10-12 14-00)
#   Attempt to make it easier to understand.
# [Dadu042] (2020-10-12 14-30)
#   Attempt to add Gecko v2.47 for Wine v1.9.13 to v3.x.x .
#   Note: the current default Gecko version is still v1.3.0 (2011 ?).

# Check if Gecko is not already installed
unset GECKO_EXIST
GECKO_EXIST=`find $WINEPREFIX -name "xul.dll"`
if [ ! -n "$GECKO_EXIST" ]; then
# Load the HTML rendering Engine (Gecko)
WINDIR="$WINEPREFIX/drive_c/windows/"
case `wine --version` in
wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.1.0
        GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56
        GECKO_EXT=cab
        ;;
wine-1.1.1[234]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.0
        GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09
        GECKO_EXT=cab
        ;;
wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.1
        GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8
        GECKO_EXT=cab
        ;;
esac
# x86_64 gecko package for wine64
if [ -e "$WINDIR/syswow64" ]; then
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
wine-1.9.1[3456789]|wine-2|wine-3)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=2.47
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=5ebc4ec71c92b3db3d84b334a1db385d
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
else
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
wine-1.9.1[3456789]|wine-2|wine-3)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=2.47
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=d93ac0d2e6aceafe9113a9918916df45
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
fi
 
# From this URL,
# http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
# What the final URL is:
# http://downloads.sourceforge.net/wine/wine_gecko-1.3.0-x86.msi

if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
then

        POL_Download_Resource "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"  "Gecko"
        # POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
        # mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
fi
 
# Extract files
if [ "$GECKO_EXT" == "cab" ]; then
        mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
        cd "$GECKO_DIR/gecko/$GECKO_VERSION"
        cabextract "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab"
        cd "$olddir"
else
        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.msi"
        cd "$olddir"
fi
 
 
cat > "$POL_USER_ROOT/tmp/geckopath.reg" <<_EOF_
REGEDIT4
 
[HKEY_LOCAL_MACHINE\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
_EOF_
 
printf '"GeckoPath"="' >>"$POL_USER_ROOT/tmp/geckopath.reg"
case $GECKO_VERSION in
0.*)
        printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
# x86 gecko path for wine64
if [ -e "$WINDIR/syswow64" ]; then
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
else
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
fi
 
# Set installation path
POL_Wine regedit "$POL_USER_ROOT/tmp/geckopath.reg"
     
# Register the dll, since it was disabled before
POL_Wine regsvr32 mshtml
fi

Replies

Edited by Dadu042

Dadu042 Monday 12 October 2020 at 15:03
Dadu042

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

Note: I try to check and update this script in order to help me with a other script (Crossfire) that seems to have a issue with web browser.

Differences

@@ -12,6 +12,9 @@
 #   Update
 # [Dadu042] (2020-10-12 14-00)
 #   Attempt to make it easier to understand.
+# [Dadu042] (2020-10-12 14-30)
+#   Attempt to add Gecko v2.47 for Wine v1.9.13 to v3.x.x .
+#   Note: the current default Gecko version is still v1.3.0 (2011 ?).
 
 # Check if Gecko is not already installed
 unset GECKO_EXIST
@@ -63,6 +66,13 @@
         GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
         GECKO_EXT=msi
         ;;
+wine-1.9.1[3456789]|wine-2|wine-3)
+        GECKO_DIR="$WINDIR/syswow64"
+        GECKO_VERSION=2.47
+        GECKO_ARCH=-x86
+        GECKO_SHA1SUM=5ebc4ec71c92b3db3d84b334a1db385d
+        GECKO_EXT=msi
+        ;;
 *)
         GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=1.3.0
@@ -94,6 +104,13 @@
         GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
         GECKO_EXT=msi
         ;;
+wine-1.9.1[3456789]|wine-2|wine-3)
+        GECKO_DIR="$WINDIR/system32"
+        GECKO_VERSION=2.47
+        GECKO_ARCH=-x86
+        GECKO_SHA1SUM=d93ac0d2e6aceafe9113a9918916df45
+        GECKO_EXT=msi
+	;;
 *)
         GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=1.3.0

New source code

#!/bin/bash
# PlayOnLinux Function
# Date : see changelog
# Last revision : see changelog
# Author : Unknown
# Only For : http://www.playonlinux.com

# CHANGELOG:
# [Unknown] (?)
#   Initial script.
# [GNU_Raziel] (2011-08-28 21:00)
#   Update
# [Dadu042] (2020-10-12 14-00)
#   Attempt to make it easier to understand.
# [Dadu042] (2020-10-12 14-30)
#   Attempt to add Gecko v2.47 for Wine v1.9.13 to v3.x.x .
#   Note: the current default Gecko version is still v1.3.0 (2011 ?).

# Check if Gecko is not already installed
unset GECKO_EXIST
GECKO_EXIST=`find $WINEPREFIX -name "xul.dll"`
if [ ! -n "$GECKO_EXIST" ]; then
# Load the HTML rendering Engine (Gecko)
WINDIR="$WINEPREFIX/drive_c/windows/"
case `wine --version` in
wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.1.0
        GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56
        GECKO_EXT=cab
        ;;
wine-1.1.1[234]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.0
        GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09
        GECKO_EXT=cab
        ;;
wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.1
        GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8
        GECKO_EXT=cab
        ;;
esac
# x86_64 gecko package for wine64
if [ -e "$WINDIR/syswow64" ]; then
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
wine-1.9.1[3456789]|wine-2|wine-3)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=2.47
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=5ebc4ec71c92b3db3d84b334a1db385d
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
else
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
wine-1.9.1[3456789]|wine-2|wine-3)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=2.47
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=d93ac0d2e6aceafe9113a9918916df45
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
fi
 
if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
then
        POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
        mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
fi
 
# Extract files
if [ "$GECKO_EXT" == "cab" ]; then
        mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
        cd "$GECKO_DIR/gecko/$GECKO_VERSION"
        cabextract "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab"
        cd "$olddir"
else
        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.msi"
        cd "$olddir"
fi
 
 
cat > "$POL_USER_ROOT/tmp/geckopath.reg" <<_EOF_
REGEDIT4
 
[HKEY_LOCAL_MACHINE\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
_EOF_
 
printf '"GeckoPath"="' >>"$POL_USER_ROOT/tmp/geckopath.reg"
case $GECKO_VERSION in
0.*)
        printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
# x86 gecko path for wine64
if [ -e "$WINDIR/syswow64" ]; then
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
else
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
fi
 
# Set installation path
POL_Wine regedit "$POL_USER_ROOT/tmp/geckopath.reg"
     
# Register the dll, since it was disabled before
POL_Wine regsvr32 mshtml
fi

Replies

Edited by Dadu042

Dadu042 Monday 12 October 2020 at 14:34
Dadu042

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -1,11 +1,19 @@
 #!/bin/bash
 # PlayOnLinux Function
-# Date : Unknown
-# Last revision : (2011-08-28 21:00)
-# Author : Unknown - Updated by GNU_Raziel
+# Date : see changelog
+# Last revision : see changelog
+# Author : Unknown
 # Only For : http://www.playonlinux.com
 
-# Check is gecko is not already installed
+# CHANGELOG:
+# [Unknown] (?)
+#   Initial script.
+# [GNU_Raziel] (2011-08-28 21:00)
+#   Update
+# [Dadu042] (2020-10-12 14-00)
+#   Attempt to make it easier to understand.
+
+# Check if Gecko is not already installed
 unset GECKO_EXIST
 GECKO_EXIST=`find $WINEPREFIX -name "xul.dll"`
 if [ ! -n "$GECKO_EXIST" ]; then
@@ -13,140 +21,140 @@
 WINDIR="$WINEPREFIX/drive_c/windows/"
 case `wine --version` in
 wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
-	GECKO_DIR="$WINDIR"
+        GECKO_DIR="$WINDIR"
         GECKO_VERSION=0.1.0
         GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56
-	GECKO_EXT=cab
+        GECKO_EXT=cab
         ;;
 wine-1.1.1[234]*)
         GECKO_DIR="$WINDIR"
         GECKO_VERSION=0.9.0
         GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09
-	GECKO_EXT=cab
+        GECKO_EXT=cab
         ;;
 wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
         GECKO_DIR="$WINDIR"
         GECKO_VERSION=0.9.1
         GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8
-	GECKO_EXT=cab
+        GECKO_EXT=cab
         ;;
 esac
 # x86_64 gecko package for wine64
 if [ -e "$WINDIR/syswow64" ]; then
 case `wine --version` in
 wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
-	GECKO_DIR="$WINDIR/syswow64"
+        GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=1.0.0
         GECKO_ARCH=-x86
         GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
-	GECKO_EXT=cab
-	;;
+        GECKO_EXT=cab
+        ;;
 wine-1.3.[23456789]|wine-1.3.1[012345])
-	GECKO_DIR="$WINDIR/syswow64"
+        GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=1.1.0
         GECKO_ARCH=-x86
         GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
-	GECKO_EXT=cab
-	;;
+        GECKO_EXT=cab
+        ;;
 wine-1.3.1[6789]|wine-1.3.2[012345])
-	GECKO_DIR="$WINDIR/syswow64"
+        GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=1.2.0
         GECKO_ARCH=-x86
         GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
-	GECKO_EXT=msi
+        GECKO_EXT=msi
         ;;
 *)
         GECKO_DIR="$WINDIR/syswow64"
         GECKO_VERSION=1.3.0
         GECKO_ARCH=-x86
         GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
-	GECKO_EXT=msi
+        GECKO_EXT=msi
         ;;
 esac
 else
 case `wine --version` in
 wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
-	GECKO_DIR="$WINDIR/system32"
+        GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=1.0.0
         GECKO_ARCH=-x86
         GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
-	GECKO_EXT=cab
-	;;
+        GECKO_EXT=cab
+        ;;
 wine-1.3.[23456789]|wine-1.3.1[012345])
-	GECKO_DIR="$WINDIR/system32"
+        GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=1.1.0
         GECKO_ARCH=-x86
         GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
-	GECKO_EXT=cab
-	;;
+        GECKO_EXT=cab
+        ;;
 wine-1.3.1[6789]|wine-1.3.2[012345])
-	GECKO_DIR="$WINDIR/system32"
+        GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=1.2.0
         GECKO_ARCH=-x86
         GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
-	GECKO_EXT=msi
+        GECKO_EXT=msi
         ;;
 *)
         GECKO_DIR="$WINDIR/system32"
         GECKO_VERSION=1.3.0
         GECKO_ARCH=-x86
         GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
-	GECKO_EXT=msi
+        GECKO_EXT=msi
         ;;
 esac
 fi
-
+ 
 if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
 then
-	POL_SetupWindow_download "$(eval_gettext 'Downloading gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT" 
-	mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
+        POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
+        mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
 fi
-
+ 
 # Extract files
 if [ "$GECKO_EXT" == "cab" ]; then
-	mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
-	cd "$GECKO_DIR/gecko/$GECKO_VERSION"
-	cabextract "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab"
-	cd "$olddir"
+        mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
+        cd "$GECKO_DIR/gecko/$GECKO_VERSION"
+        cabextract "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab"
+        cd "$olddir"
 else
-	POL_Wine msiexec /i "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.msi"
-	cd "$olddir"
+        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.msi"
+        cd "$olddir"
 fi
-
-
+ 
+ 
 cat > "$POL_USER_ROOT/tmp/geckopath.reg" <<_EOF_
 REGEDIT4
-
+ 
 [HKEY_LOCAL_MACHINE\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
 _EOF_
-
+ 
 printf '"GeckoPath"="' >>"$POL_USER_ROOT/tmp/geckopath.reg"
 case $GECKO_VERSION in
 0.*)
-	printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
-	sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
+        printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
+        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
         ;;
 esac
 # x86 gecko path for wine64
 if [ -e "$WINDIR/syswow64" ]; then
 case $GECKO_VERSION in
 1.*)
-	printf 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
-	sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
+        printf 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
+        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
         ;;
 esac
 else
 case $GECKO_VERSION in
 1.*)
-	printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
-	sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
+        printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
+        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
         ;;
 esac
 fi
-
+ 
 # Set installation path
 POL_Wine regedit "$POL_USER_ROOT/tmp/geckopath.reg"
-    
+     
 # Register the dll, since it was disabled before
 POL_Wine regsvr32 mshtml
 fi
\ No newline at end of file

New source code

#!/bin/bash
# PlayOnLinux Function
# Date : see changelog
# Last revision : see changelog
# Author : Unknown
# Only For : http://www.playonlinux.com

# CHANGELOG:
# [Unknown] (?)
#   Initial script.
# [GNU_Raziel] (2011-08-28 21:00)
#   Update
# [Dadu042] (2020-10-12 14-00)
#   Attempt to make it easier to understand.

# Check if Gecko is not already installed
unset GECKO_EXIST
GECKO_EXIST=`find $WINEPREFIX -name "xul.dll"`
if [ ! -n "$GECKO_EXIST" ]; then
# Load the HTML rendering Engine (Gecko)
WINDIR="$WINEPREFIX/drive_c/windows/"
case `wine --version` in
wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.1.0
        GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56
        GECKO_EXT=cab
        ;;
wine-1.1.1[234]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.0
        GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09
        GECKO_EXT=cab
        ;;
wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
        GECKO_DIR="$WINDIR"
        GECKO_VERSION=0.9.1
        GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8
        GECKO_EXT=cab
        ;;
esac
# x86_64 gecko package for wine64
if [ -e "$WINDIR/syswow64" ]; then
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/syswow64"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
else
case `wine --version` in
wine-1.1.2[789]*|wine-1.2*|wine-1.3|wine-1.3.1)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.0.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
        GECKO_EXT=cab
        ;;
wine-1.3.[23456789]|wine-1.3.1[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.1.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714
        GECKO_EXT=cab
        ;;
wine-1.3.1[6789]|wine-1.3.2[012345])
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.2.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
*)
        GECKO_DIR="$WINDIR/system32"
        GECKO_VERSION=1.3.0
        GECKO_ARCH=-x86
        GECKO_SHA1SUM=6964d1877668ab7da07a60f6dcf23fb0e261a808
        GECKO_EXT=msi
        ;;
esac
fi
 
if test ! -f "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
then
        POL_SetupWindow_download "$(eval_gettext 'Downloading Gecko ...')" "$TITLE" "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
        mv wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.$GECKO_EXT"
fi
 
# Extract files
if [ "$GECKO_EXT" == "cab" ]; then
        mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
        cd "$GECKO_DIR/gecko/$GECKO_VERSION"
        cabextract "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab"
        cd "$olddir"
else
        POL_Wine msiexec /i "$POL_USER_ROOT/ressources/wine_gecko-$GECKO_VERSION$GECKO_ARCH.msi"
        cd "$olddir"
fi
 
 
cat > "$POL_USER_ROOT/tmp/geckopath.reg" <<_EOF_
REGEDIT4
 
[HKEY_LOCAL_MACHINE\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
_EOF_
 
printf '"GeckoPath"="' >>"$POL_USER_ROOT/tmp/geckopath.reg"
case $GECKO_VERSION in
0.*)
        printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
# x86 gecko path for wine64
if [ -e "$WINDIR/syswow64" ]; then
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\syswow64\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
else
case $GECKO_VERSION in
1.*)
        printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
        sed "s/\\\\/\\\\\\\\/g" >> "$POL_USER_ROOT/tmp/geckopath.reg"
        ;;
esac
fi
 
# Set installation path
POL_Wine regedit "$POL_USER_ROOT/tmp/geckopath.reg"
     
# Register the dll, since it was disabled before
POL_Wine regsvr32 mshtml
fi

Replies

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com