Mozilla Firefox

Informations

Creator Message
SuperPlumus Anonymous
Admin

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 380187
Wine: 2.0.1

Feedbacks

Description

Type : Web Browser
Editor : Mozilla Foundation
Compatibility : 5/5
Installation modes : Download, Local

English :
Mozilla Firefox is a web browser.
You may need Mozilla Firefox if you want to test a website compatibility, you should not use it to navigate.
It also includes Flash Player and Shockwave Player


Français :
Mozilla Firefox est un navigateur internet.
Vous pouvez en avoir besoin pour tester la compatibilité d'un site web. Nous vous déconseillons de naviguer avec.
Il permet également d'installer (de manière optionnelle) Flash Player et Shockwave Player.

Screenshots

Miniature

Source code

#!/usr/bin/env playonlinux-bash
 
# CHANGELOG
# [SuperPlumus] (2011-11-27 08-24)
#   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
#   Correction link + md5 for Java
# [SuperPlumus] (2012-02-24 05-20)
#   Remove cheking md5 for Flash Player and Shockwave Player (Bug 673)
# [SuperPlumus] (2012-04-06 19-40)
#   Change Wine version 1.3.26 -> 1.4
#   Remove optionnal install Java
# [SuperPlumus] (2012-04-11 09-32)
#   Add support $POL_SELECTED_FILE
# [Quentin PÂRIS] (2012-05-12 23-05)
#   Improving theme
# [SuperPlumus] (2013-05-09 17-27)
#   Re-add support Shockwave Player (precedently disabled for bad url)
#   Clean code
#   Remove disable plugin-container (dom.ipc.plugins.enabled = false)
#   Shockwave Player : Set OS win2k to prevent crash on Shockwave Player installation, set winxp at the end of the Shockwave Player installation
# [SuperPlumus] (2013-09-30 08-41)
#   Update gettext messages
# [petch] (2013-10-13 17-41)
#   Change Wine version 1.4 -> 1.6
# [Ground0] (2014-07-25)
#   Change Wine version 1.6 -> 1.7.22
# [SuperPlumus] (2015-05-02 23-55)
#   Update download url mirror
# [petch] (2015-11-23 23-48)
#   Update download urls
# [SuperPlumus] (2017-05-20 16-24)
#   Set Windows version to win7 to setup (setup refuses to install in winxp)
#   Set Windows version to xinxp after setup, workarround, Firefox can't load any page in win7 after first starting, cf. https://bugs.winehq.org/show_bug.cgi?id=42388
#   Update wine version to 2.0.1

# Date : (2011-06-13 17-29)
# Last revision : (2015-05-02)
# Wine version used : 1.7.22
# Distribution used to test : OpenSUSE 13.1
# Firefox Version used to test : 31.0
# Author : SuperPlumus

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Mozilla Firefox"
PREFIX="MozillaFirefox"
WORKING_WINE_VERSION="2.0.1"

PLUGIN_NAME_FLASH="Flash Player"
PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

PLUGIN_FILE_SHOCKWAVE="Shockwave_Installer_Full.exe"
PLUGIN_URL_SHOCKWAVE="http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/$PLUGIN_FILE_SHOCKWAVE"

# Fonction pour simplifier l'utilisation de POL_SetupWindow_checkbox_list
is_checked ()
{
    if [ "$(echo "$CHECKS" | grep -o "$1")" != "" ]; then
        return 0
    else
        return 1
    fi
}

POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 856
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"


POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test

POL_System_TmpCreate "$PREFIX"

if [ -n "$POL_SELECTED_FILE" ]; then
    INSTALLER="$POL_SELECTED_FILE"
else
    POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

    if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
        # Language version
        POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"

        case "$APP_ANSWER" in
            "Afrikaans") FIREFOX_LANG="af" ;;
            "Albanian") FIREFOX_LANG="sq" ;;
            "Arabic") FIREFOX_LANG="ar" ;;
            "Asturian") FIREFOX_LANG="ast" ;;
            "Basque") FIREFOX_LANG="eu" ;;
            "Belarusian") FIREFOX_LANG="be" ;;
            "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
            "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
            "Breton") FIREFOX_LANG="br" ;;
            "Bulgarian") FIREFOX_LANG="bg" ;;
            "Catalan") FIREFOX_LANG="ca" ;;
            "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
            "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
            "Croatian") FIREFOX_LANG="hr" ;;
            "Czech") FIREFOX_LANG="cs" ;;
            "Danish") FIREFOX_LANG="da" ;;
            "Dutch") FIREFOX_LANG="nl" ;;
            "English (British)") FIREFOX_LANG="en-GB" ;;
            "English (South African)") FIREFOX_LANG="en-ZA" ;;
            "English (US)") FIREFOX_LANG="en-US" ;;
            "Esperanto") FIREFOX_LANG="eo" ;;
            "Estonian") FIREFOX_LANG="et" ;;
            "Finnish") FIREFOX_LANG="fi" ;;
            "French") FIREFOX_LANG="fr" ;;
            "Frisian") FIREFOX_LANG="fy-NL" ;;
            "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
            "Galician") FIREFOX_LANG="gl" ;;
            "German") FIREFOX_LANG="de" ;;
            "Greek") FIREFOX_LANG="el" ;;
            "Gujarati") FIREFOX_LANG="gu-IN" ;;
            "Hebrew") FIREFOX_LANG="he" ;;
            "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
            "Hungarian") FIREFOX_LANG="hu" ;;
            "Icelandic") FIREFOX_LANG="is" ;;
            "Indonesian") FIREFOX_LANG="id" ;;
            "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
            "Italian") FIREFOX_LANG="it" ;;
            "Japanese") FIREFOX_LANG="ja" ;;
            "Kannada") FIREFOX_LANG="kn" ;;
            "Korean") FIREFOX_LANG="ko" ;;
            "Latvian") FIREFOX_LANG="lv" ;;
            "Lithuanian") FIREFOX_LANG="lt" ;;
            "Macedonian") FIREFOX_LANG="mk" ;;
            "Malayalam") FIREFOX_LANG="ml" ;;
            "Marathi") FIREFOX_LANG="mr" ;;
            "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
            "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
            "Persian") FIREFOX_LANG="fa" ;;
            "Polish") FIREFOX_LANG="pl" ;;
            "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
            "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
            "Punjabi") FIREFOX_LANG="pa-IN" ;;
            "Romanian") FIREFOX_LANG="ro" ;;
            "Romansh") FIREFOX_LANG="rm" ;;
            "Russian") FIREFOX_LANG="ru" ;;
            "Sinhala") FIREFOX_LANG="si" ;;
            "Slovak") FIREFOX_LANG="sk" ;;
            "Slovenian") FIREFOX_LANG="sl" ;;
            "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
            "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
            "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
            "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
            "Swedish") FIREFOX_LANG="sv-SE" ;;
            "Telugu") FIREFOX_LANG="te" ;;
            "Thai") FIREFOX_LANG="th" ;;
            "Turkish") FIREFOX_LANG="tr" ;;
            "Ukrainian") FIREFOX_LANG="uk" ;;
            "Vietnamese") FIREFOX_LANG="vi" ;;
            "Welsh") FIREFOX_LANG="cy" ;;
            *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
        esac

        # Detection de la derniere version
        cd "$POL_System_TmpDir"

        # https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/README.txt
        # No MD5, since the script uses the latest installer version available
        POL_Download "https://download.mozilla.org/?product=firefox-latest&os=win&lang=$FIREFOX_LANG"
        INSTALLER="$POL_System_TmpDir/FirefoxSetup.exe"
        POL_System_mv "$POL_System_TmpDir/?product=firefox-latest&os=win&lang=$FIREFOX_LANG" "$INSTALLER"

    elif [ "$INSTALL_METHOD" = "LOCAL" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        INSTALLER="$APP_ANSWER"
    fi
fi

AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
CHECKS="$APP_ANSWER"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

# Firefox setup refuses to install in winxp
Set_OS "win7"

POL_Call POL_Install_LunaTheme

POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"

# Workarround, Firefox can't load any page in win7 after first starting, cf. https://bugs.winehq.org/show_bug.cgi?id=42388
Set_OS "winxp"

cd "$POL_System_TmpDir"

# Flash Player
if is_checked "$PLUGIN_NAME_FLASH"; then
    POL_Call POL_Install_flashplayer
fi

# Shockwave Player
if is_checked "$PLUGIN_NAME_SHOCKWAVE"; then
    POL_Download "$PLUGIN_URL_SHOCKWAVE" ""
    POL_Wine_WaitBefore "$PLUGIN_NAME_SHOCKWAVE"
    Set_OS "win2k"
    POL_Wine "$PLUGIN_FILE_SHOCKWAVE"
    Set_OS "winxp"
    POL_Wine_WaitExit "$PLUGIN_NAME_SHOCKWAVE"
fi

# Disables plugin container (that makes Firefox crash on pages that already used flash/shockwave)
#echo "pref("dom.ipc.plugins.enabled", false);" > "$WINEPREFIX/drive_c/$PROGRAMFILES/Mozilla Firefox/defaults/pref/firefox.js"

POL_System_TmpDelete

POL_Shortcut "firefox.exe" "$TITLE"

POL_SetupWindow_Close

exit

Contributions

Filters:

Contribute
Member Message
john777 Monday 19 February 2018 at 23:30
john777 Anonymous

Message

Hi,
Tks for the soft but for me it does not work on macos high sierra version 10.13.3, mozilla does not launch, i'd like to play on this site : " ludi.com " and it's impossible
Cordially

 

 

 

 

 

Replies

SuperPlumus Saturday 20 May 2017 at 17:59
SuperPlumus Anonymous
Admin

Information

This update has been approved by the team.

Message

Update script

- Set Windows version to win7 in Setup (Firefox refuses to install in winxp).

- Set Windows version to winxp in run (https://bugs.winehq.org/show_bug.cgi?id=42388).

- Update wine version.

 

Differences

@@ -1,5 +1,5 @@
 #!/usr/bin/env playonlinux-bash
-
+ 
 # CHANGELOG
 # [SuperPlumus] (2011-11-27 08-24)
 #   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
@@ -28,6 +28,10 @@
 #   Update download url mirror
 # [petch] (2015-11-23 23-48)
 #   Update download urls
+# [SuperPlumus] (2017-05-20 16-24)
+#   Set Windows version to win7 to setup (setup refuses to install in winxp)
+#   Set Windows version to xinxp after setup, workarround, Firefox can't load any page in win7 after first starting, cf. https://bugs.winehq.org/show_bug.cgi?id=42388
+#   Update wine version to 2.0.1
 
 # Date : (2011-06-13 17-29)
 # Last revision : (2015-05-02)
@@ -41,7 +45,7 @@
 
 TITLE="Mozilla Firefox"
 PREFIX="MozillaFirefox"
-WORKING_WINE_VERSION="1.7.22"
+WORKING_WINE_VERSION="2.0.1"
 
 PLUGIN_NAME_FLASH="Flash Player"
 PLUGIN_NAME_SHOCKWAVE="Shockwave Player"
@@ -155,7 +159,7 @@
 
         # Detection de la derniere version
         cd "$POL_System_TmpDir"
-    
+
         # https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/README.txt
         # No MD5, since the script uses the latest installer version available
         POL_Download "https://download.mozilla.org/?product=firefox-latest&os=win&lang=$FIREFOX_LANG"
@@ -177,11 +181,17 @@
 POL_Wine_SelectPrefix "$PREFIX"
 POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
+# Firefox setup refuses to install in winxp
+Set_OS "win7"
+
 POL_Call POL_Install_LunaTheme
 
 POL_Wine_WaitBefore "$TITLE"
 POL_Wine "$INSTALLER"
 
+# Workarround, Firefox can't load any page in win7 after first starting, cf. https://bugs.winehq.org/show_bug.cgi?id=42388
+Set_OS "winxp"
+
 cd "$POL_System_TmpDir"
 
 # Flash Player
@@ -208,4 +218,4 @@
 
 POL_SetupWindow_Close
 
-exit
+exit
\ No newline at end of file

New source code

#!/usr/bin/env playonlinux-bash
 
# CHANGELOG
# [SuperPlumus] (2011-11-27 08-24)
#   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
#   Correction link + md5 for Java
# [SuperPlumus] (2012-02-24 05-20)
#   Remove cheking md5 for Flash Player and Shockwave Player (Bug 673)
# [SuperPlumus] (2012-04-06 19-40)
#   Change Wine version 1.3.26 -> 1.4
#   Remove optionnal install Java
# [SuperPlumus] (2012-04-11 09-32)
#   Add support $POL_SELECTED_FILE
# [Quentin PÂRIS] (2012-05-12 23-05)
#   Improving theme
# [SuperPlumus] (2013-05-09 17-27)
#   Re-add support Shockwave Player (precedently disabled for bad url)
#   Clean code
#   Remove disable plugin-container (dom.ipc.plugins.enabled = false)
#   Shockwave Player : Set OS win2k to prevent crash on Shockwave Player installation, set winxp at the end of the Shockwave Player installation
# [SuperPlumus] (2013-09-30 08-41)
#   Update gettext messages
# [petch] (2013-10-13 17-41)
#   Change Wine version 1.4 -> 1.6
# [Ground0] (2014-07-25)
#   Change Wine version 1.6 -> 1.7.22
# [SuperPlumus] (2015-05-02 23-55)
#   Update download url mirror
# [petch] (2015-11-23 23-48)
#   Update download urls
# [SuperPlumus] (2017-05-20 16-24)
#   Set Windows version to win7 to setup (setup refuses to install in winxp)
#   Set Windows version to xinxp after setup, workarround, Firefox can't load any page in win7 after first starting, cf. https://bugs.winehq.org/show_bug.cgi?id=42388
#   Update wine version to 2.0.1

# Date : (2011-06-13 17-29)
# Last revision : (2015-05-02)
# Wine version used : 1.7.22
# Distribution used to test : OpenSUSE 13.1
# Firefox Version used to test : 31.0
# Author : SuperPlumus

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Mozilla Firefox"
PREFIX="MozillaFirefox"
WORKING_WINE_VERSION="2.0.1"

PLUGIN_NAME_FLASH="Flash Player"
PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

PLUGIN_FILE_SHOCKWAVE="Shockwave_Installer_Full.exe"
PLUGIN_URL_SHOCKWAVE="http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/$PLUGIN_FILE_SHOCKWAVE"

# Fonction pour simplifier l'utilisation de POL_SetupWindow_checkbox_list
is_checked ()
{
    if [ "$(echo "$CHECKS" | grep -o "$1")" != "" ]; then
        return 0
    else
        return 1
    fi
}

POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 856
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"


POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test

POL_System_TmpCreate "$PREFIX"

if [ -n "$POL_SELECTED_FILE" ]; then
    INSTALLER="$POL_SELECTED_FILE"
else
    POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

    if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
        # Language version
        POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"

        case "$APP_ANSWER" in
            "Afrikaans") FIREFOX_LANG="af" ;;
            "Albanian") FIREFOX_LANG="sq" ;;
            "Arabic") FIREFOX_LANG="ar" ;;
            "Asturian") FIREFOX_LANG="ast" ;;
            "Basque") FIREFOX_LANG="eu" ;;
            "Belarusian") FIREFOX_LANG="be" ;;
            "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
            "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
            "Breton") FIREFOX_LANG="br" ;;
            "Bulgarian") FIREFOX_LANG="bg" ;;
            "Catalan") FIREFOX_LANG="ca" ;;
            "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
            "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
            "Croatian") FIREFOX_LANG="hr" ;;
            "Czech") FIREFOX_LANG="cs" ;;
            "Danish") FIREFOX_LANG="da" ;;
            "Dutch") FIREFOX_LANG="nl" ;;
            "English (British)") FIREFOX_LANG="en-GB" ;;
            "English (South African)") FIREFOX_LANG="en-ZA" ;;
            "English (US)") FIREFOX_LANG="en-US" ;;
            "Esperanto") FIREFOX_LANG="eo" ;;
            "Estonian") FIREFOX_LANG="et" ;;
            "Finnish") FIREFOX_LANG="fi" ;;
            "French") FIREFOX_LANG="fr" ;;
            "Frisian") FIREFOX_LANG="fy-NL" ;;
            "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
            "Galician") FIREFOX_LANG="gl" ;;
            "German") FIREFOX_LANG="de" ;;
            "Greek") FIREFOX_LANG="el" ;;
            "Gujarati") FIREFOX_LANG="gu-IN" ;;
            "Hebrew") FIREFOX_LANG="he" ;;
            "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
            "Hungarian") FIREFOX_LANG="hu" ;;
            "Icelandic") FIREFOX_LANG="is" ;;
            "Indonesian") FIREFOX_LANG="id" ;;
            "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
            "Italian") FIREFOX_LANG="it" ;;
            "Japanese") FIREFOX_LANG="ja" ;;
            "Kannada") FIREFOX_LANG="kn" ;;
            "Korean") FIREFOX_LANG="ko" ;;
            "Latvian") FIREFOX_LANG="lv" ;;
            "Lithuanian") FIREFOX_LANG="lt" ;;
            "Macedonian") FIREFOX_LANG="mk" ;;
            "Malayalam") FIREFOX_LANG="ml" ;;
            "Marathi") FIREFOX_LANG="mr" ;;
            "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
            "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
            "Persian") FIREFOX_LANG="fa" ;;
            "Polish") FIREFOX_LANG="pl" ;;
            "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
            "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
            "Punjabi") FIREFOX_LANG="pa-IN" ;;
            "Romanian") FIREFOX_LANG="ro" ;;
            "Romansh") FIREFOX_LANG="rm" ;;
            "Russian") FIREFOX_LANG="ru" ;;
            "Sinhala") FIREFOX_LANG="si" ;;
            "Slovak") FIREFOX_LANG="sk" ;;
            "Slovenian") FIREFOX_LANG="sl" ;;
            "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
            "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
            "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
            "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
            "Swedish") FIREFOX_LANG="sv-SE" ;;
            "Telugu") FIREFOX_LANG="te" ;;
            "Thai") FIREFOX_LANG="th" ;;
            "Turkish") FIREFOX_LANG="tr" ;;
            "Ukrainian") FIREFOX_LANG="uk" ;;
            "Vietnamese") FIREFOX_LANG="vi" ;;
            "Welsh") FIREFOX_LANG="cy" ;;
            *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
        esac

        # Detection de la derniere version
        cd "$POL_System_TmpDir"

        # https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/README.txt
        # No MD5, since the script uses the latest installer version available
        POL_Download "https://download.mozilla.org/?product=firefox-latest&os=win&lang=$FIREFOX_LANG"
        INSTALLER="$POL_System_TmpDir/FirefoxSetup.exe"
        POL_System_mv "$POL_System_TmpDir/?product=firefox-latest&os=win&lang=$FIREFOX_LANG" "$INSTALLER"

    elif [ "$INSTALL_METHOD" = "LOCAL" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        INSTALLER="$APP_ANSWER"
    fi
fi

AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
CHECKS="$APP_ANSWER"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

# Firefox setup refuses to install in winxp
Set_OS "win7"

POL_Call POL_Install_LunaTheme

POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"

# Workarround, Firefox can't load any page in win7 after first starting, cf. https://bugs.winehq.org/show_bug.cgi?id=42388
Set_OS "winxp"

cd "$POL_System_TmpDir"

# Flash Player
if is_checked "$PLUGIN_NAME_FLASH"; then
    POL_Call POL_Install_flashplayer
fi

# Shockwave Player
if is_checked "$PLUGIN_NAME_SHOCKWAVE"; then
    POL_Download "$PLUGIN_URL_SHOCKWAVE" ""
    POL_Wine_WaitBefore "$PLUGIN_NAME_SHOCKWAVE"
    Set_OS "win2k"
    POL_Wine "$PLUGIN_FILE_SHOCKWAVE"
    Set_OS "winxp"
    POL_Wine_WaitExit "$PLUGIN_NAME_SHOCKWAVE"
fi

# Disables plugin container (that makes Firefox crash on pages that already used flash/shockwave)
#echo "pref("dom.ipc.plugins.enabled", false);" > "$WINEPREFIX/drive_c/$PROGRAMFILES/Mozilla Firefox/defaults/pref/firefox.js"

POL_System_TmpDelete

POL_Shortcut "firefox.exe" "$TITLE"

POL_SetupWindow_Close

exit

Replies

petch Tuesday 24 November 2015 at 0:00
petch
Developer

Warning

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

Message

Differences

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env playonlinux-bash
 
 # CHANGELOG
 # [SuperPlumus] (2011-11-27 08-24)
@@ -26,6 +26,8 @@
 #   Change Wine version 1.6 -> 1.7.22
 # [SuperPlumus] (2015-05-02 23-55)
 #   Update download url mirror
+# [petch] (2015-11-23 23-48)
+#   Update download urls
 
 # Date : (2011-06-13 17-29)
 # Last revision : (2015-05-02)
@@ -69,106 +71,102 @@
 
 POL_System_TmpCreate "$PREFIX"
 
-[ -z "$POL_SELECTED_FILE" ] && POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
-
-if [ "$INSTALL_METHOD" = "DOWNLOAD" ]
-then
-    # Language version
-    POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"
-
-    case "$APP_ANSWER" in
-        "Afrikaans") FIREFOX_LANG="af" ;;
-        "Albanian") FIREFOX_LANG="sq" ;;
-        "Arabic") FIREFOX_LANG="ar" ;;
-        "Asturian") FIREFOX_LANG="ast" ;;
-        "Basque") FIREFOX_LANG="eu" ;;
-        "Belarusian") FIREFOX_LANG="be" ;;
-        "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
-        "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
-        "Breton") FIREFOX_LANG="br" ;;
-        "Bulgarian") FIREFOX_LANG="bg" ;;
-        "Catalan") FIREFOX_LANG="ca" ;;
-        "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
-        "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
-        "Croatian") FIREFOX_LANG="hr" ;;
-        "Czech") FIREFOX_LANG="cs" ;;
-        "Danish") FIREFOX_LANG="da" ;;
-        "Dutch") FIREFOX_LANG="nl" ;;
-        "English (British)") FIREFOX_LANG="en-GB" ;;
-        "English (South African)") FIREFOX_LANG="en-ZA" ;;
-        "English (US)") FIREFOX_LANG="en-US" ;;
-        "Esperanto") FIREFOX_LANG="eo" ;;
-        "Estonian") FIREFOX_LANG="et" ;;
-        "Finnish") FIREFOX_LANG="fi" ;;
-        "French") FIREFOX_LANG="fr" ;;
-        "Frisian") FIREFOX_LANG="fy-NL" ;;
-        "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
-        "Galician") FIREFOX_LANG="gl" ;;
-        "German") FIREFOX_LANG="de" ;;
-        "Greek") FIREFOX_LANG="el" ;;
-        "Gujarati") FIREFOX_LANG="gu-IN" ;;
-        "Hebrew") FIREFOX_LANG="he" ;;
-        "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
-        "Hungarian") FIREFOX_LANG="hu" ;;
-        "Icelandic") FIREFOX_LANG="is" ;;
-        "Indonesian") FIREFOX_LANG="id" ;;
-        "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
-        "Italian") FIREFOX_LANG="it" ;;
-        "Japanese") FIREFOX_LANG="ja" ;;
-        "Kannada") FIREFOX_LANG="kn" ;;
-        "Korean") FIREFOX_LANG="ko" ;;
-        "Latvian") FIREFOX_LANG="lv" ;;
-        "Lithuanian") FIREFOX_LANG="lt" ;;
-        "Macedonian") FIREFOX_LANG="mk" ;;
-        "Malayalam") FIREFOX_LANG="ml" ;;
-        "Marathi") FIREFOX_LANG="mr" ;;
-        "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
-        "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
-        "Persian") FIREFOX_LANG="fa" ;;
-        "Polish") FIREFOX_LANG="pl" ;;
-        "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
-        "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
-        "Punjabi") FIREFOX_LANG="pa-IN" ;;
-        "Romanian") FIREFOX_LANG="ro" ;;
-        "Romansh") FIREFOX_LANG="rm" ;;
-        "Russian") FIREFOX_LANG="ru" ;;
-        "Sinhala") FIREFOX_LANG="si" ;;
-        "Slovak") FIREFOX_LANG="sk" ;;
-        "Slovenian") FIREFOX_LANG="sl" ;;
-        "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
-        "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
-        "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
-        "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
-        "Swedish") FIREFOX_LANG="sv-SE" ;;
-        "Telugu") FIREFOX_LANG="te" ;;
-        "Thai") FIREFOX_LANG="th" ;;
-        "Turkish") FIREFOX_LANG="tr" ;;
-        "Ukrainian") FIREFOX_LANG="uk" ;;
-        "Vietnamese") FIREFOX_LANG="vi" ;;
-        "Welsh") FIREFOX_LANG="cy" ;;
-        *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
-    esac
-
-    # Detection de la derniere version
-    cd "$POL_System_TmpDir"
-    #wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
-    wget "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
-    FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html|tail -n1)"
-    [ "$FIREFOX_FILE" = "" ] && POL_Debug_Fatal "Firefox version : detection failure. bug"
-
-    # Pas de MD5, car le script detecte la derniere version automatiquement
-    POL_Download "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
-    INSTALLER="$POL_System_TmpDir/$FIREFOX_FILE"
-elif [ "$INSTALL_METHOD" = "LOCAL" ]
-then
-    cd "$HOME"
-    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
-    INSTALLER="$APP_ANSWER"
-fi
-
-if [ -n "$POL_SELECTED_FILE" ]
-then
+if [ -n "$POL_SELECTED_FILE" ]; then
     INSTALLER="$POL_SELECTED_FILE"
+else
+    POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
+
+    if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
+        # Language version
+        POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"
+
+        case "$APP_ANSWER" in
+            "Afrikaans") FIREFOX_LANG="af" ;;
+            "Albanian") FIREFOX_LANG="sq" ;;
+            "Arabic") FIREFOX_LANG="ar" ;;
+            "Asturian") FIREFOX_LANG="ast" ;;
+            "Basque") FIREFOX_LANG="eu" ;;
+            "Belarusian") FIREFOX_LANG="be" ;;
+            "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
+            "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
+            "Breton") FIREFOX_LANG="br" ;;
+            "Bulgarian") FIREFOX_LANG="bg" ;;
+            "Catalan") FIREFOX_LANG="ca" ;;
+            "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
+            "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
+            "Croatian") FIREFOX_LANG="hr" ;;
+            "Czech") FIREFOX_LANG="cs" ;;
+            "Danish") FIREFOX_LANG="da" ;;
+            "Dutch") FIREFOX_LANG="nl" ;;
+            "English (British)") FIREFOX_LANG="en-GB" ;;
+            "English (South African)") FIREFOX_LANG="en-ZA" ;;
+            "English (US)") FIREFOX_LANG="en-US" ;;
+            "Esperanto") FIREFOX_LANG="eo" ;;
+            "Estonian") FIREFOX_LANG="et" ;;
+            "Finnish") FIREFOX_LANG="fi" ;;
+            "French") FIREFOX_LANG="fr" ;;
+            "Frisian") FIREFOX_LANG="fy-NL" ;;
+            "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
+            "Galician") FIREFOX_LANG="gl" ;;
+            "German") FIREFOX_LANG="de" ;;
+            "Greek") FIREFOX_LANG="el" ;;
+            "Gujarati") FIREFOX_LANG="gu-IN" ;;
+            "Hebrew") FIREFOX_LANG="he" ;;
+            "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
+            "Hungarian") FIREFOX_LANG="hu" ;;
+            "Icelandic") FIREFOX_LANG="is" ;;
+            "Indonesian") FIREFOX_LANG="id" ;;
+            "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
+            "Italian") FIREFOX_LANG="it" ;;
+            "Japanese") FIREFOX_LANG="ja" ;;
+            "Kannada") FIREFOX_LANG="kn" ;;
+            "Korean") FIREFOX_LANG="ko" ;;
+            "Latvian") FIREFOX_LANG="lv" ;;
+            "Lithuanian") FIREFOX_LANG="lt" ;;
+            "Macedonian") FIREFOX_LANG="mk" ;;
+            "Malayalam") FIREFOX_LANG="ml" ;;
+            "Marathi") FIREFOX_LANG="mr" ;;
+            "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
+            "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
+            "Persian") FIREFOX_LANG="fa" ;;
+            "Polish") FIREFOX_LANG="pl" ;;
+            "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
+            "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
+            "Punjabi") FIREFOX_LANG="pa-IN" ;;
+            "Romanian") FIREFOX_LANG="ro" ;;
+            "Romansh") FIREFOX_LANG="rm" ;;
+            "Russian") FIREFOX_LANG="ru" ;;
+            "Sinhala") FIREFOX_LANG="si" ;;
+            "Slovak") FIREFOX_LANG="sk" ;;
+            "Slovenian") FIREFOX_LANG="sl" ;;
+            "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
+            "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
+            "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
+            "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
+            "Swedish") FIREFOX_LANG="sv-SE" ;;
+            "Telugu") FIREFOX_LANG="te" ;;
+            "Thai") FIREFOX_LANG="th" ;;
+            "Turkish") FIREFOX_LANG="tr" ;;
+            "Ukrainian") FIREFOX_LANG="uk" ;;
+            "Vietnamese") FIREFOX_LANG="vi" ;;
+            "Welsh") FIREFOX_LANG="cy" ;;
+            *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
+        esac
+
+        # Detection de la derniere version
+        cd "$POL_System_TmpDir"
+    
+        # https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/README.txt
+        # No MD5, since the script uses the latest installer version available
+        POL_Download "https://download.mozilla.org/?product=firefox-latest&os=win&lang=$FIREFOX_LANG"
+        INSTALLER="$POL_System_TmpDir/FirefoxSetup.exe"
+        POL_System_mv "$POL_System_TmpDir/?product=firefox-latest&os=win&lang=$FIREFOX_LANG" "$INSTALLER"
+
+    elif [ "$INSTALL_METHOD" = "LOCAL" ]; then
+        cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+        INSTALLER="$APP_ANSWER"
+    fi
 fi
 
 AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

New source code

#!/usr/bin/env playonlinux-bash

# CHANGELOG
# [SuperPlumus] (2011-11-27 08-24)
#   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
#   Correction link + md5 for Java
# [SuperPlumus] (2012-02-24 05-20)
#   Remove cheking md5 for Flash Player and Shockwave Player (Bug 673)
# [SuperPlumus] (2012-04-06 19-40)
#   Change Wine version 1.3.26 -> 1.4
#   Remove optionnal install Java
# [SuperPlumus] (2012-04-11 09-32)
#   Add support $POL_SELECTED_FILE
# [Quentin PÂRIS] (2012-05-12 23-05)
#   Improving theme
# [SuperPlumus] (2013-05-09 17-27)
#   Re-add support Shockwave Player (precedently disabled for bad url)
#   Clean code
#   Remove disable plugin-container (dom.ipc.plugins.enabled = false)
#   Shockwave Player : Set OS win2k to prevent crash on Shockwave Player installation, set winxp at the end of the Shockwave Player installation
# [SuperPlumus] (2013-09-30 08-41)
#   Update gettext messages
# [petch] (2013-10-13 17-41)
#   Change Wine version 1.4 -> 1.6
# [Ground0] (2014-07-25)
#   Change Wine version 1.6 -> 1.7.22
# [SuperPlumus] (2015-05-02 23-55)
#   Update download url mirror
# [petch] (2015-11-23 23-48)
#   Update download urls

# Date : (2011-06-13 17-29)
# Last revision : (2015-05-02)
# Wine version used : 1.7.22
# Distribution used to test : OpenSUSE 13.1
# Firefox Version used to test : 31.0
# Author : SuperPlumus

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Mozilla Firefox"
PREFIX="MozillaFirefox"
WORKING_WINE_VERSION="1.7.22"

PLUGIN_NAME_FLASH="Flash Player"
PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

PLUGIN_FILE_SHOCKWAVE="Shockwave_Installer_Full.exe"
PLUGIN_URL_SHOCKWAVE="http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/$PLUGIN_FILE_SHOCKWAVE"

# Fonction pour simplifier l'utilisation de POL_SetupWindow_checkbox_list
is_checked ()
{
    if [ "$(echo "$CHECKS" | grep -o "$1")" != "" ]; then
        return 0
    else
        return 1
    fi
}

POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 856
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"


POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test

POL_System_TmpCreate "$PREFIX"

if [ -n "$POL_SELECTED_FILE" ]; then
    INSTALLER="$POL_SELECTED_FILE"
else
    POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

    if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
        # Language version
        POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"

        case "$APP_ANSWER" in
            "Afrikaans") FIREFOX_LANG="af" ;;
            "Albanian") FIREFOX_LANG="sq" ;;
            "Arabic") FIREFOX_LANG="ar" ;;
            "Asturian") FIREFOX_LANG="ast" ;;
            "Basque") FIREFOX_LANG="eu" ;;
            "Belarusian") FIREFOX_LANG="be" ;;
            "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
            "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
            "Breton") FIREFOX_LANG="br" ;;
            "Bulgarian") FIREFOX_LANG="bg" ;;
            "Catalan") FIREFOX_LANG="ca" ;;
            "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
            "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
            "Croatian") FIREFOX_LANG="hr" ;;
            "Czech") FIREFOX_LANG="cs" ;;
            "Danish") FIREFOX_LANG="da" ;;
            "Dutch") FIREFOX_LANG="nl" ;;
            "English (British)") FIREFOX_LANG="en-GB" ;;
            "English (South African)") FIREFOX_LANG="en-ZA" ;;
            "English (US)") FIREFOX_LANG="en-US" ;;
            "Esperanto") FIREFOX_LANG="eo" ;;
            "Estonian") FIREFOX_LANG="et" ;;
            "Finnish") FIREFOX_LANG="fi" ;;
            "French") FIREFOX_LANG="fr" ;;
            "Frisian") FIREFOX_LANG="fy-NL" ;;
            "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
            "Galician") FIREFOX_LANG="gl" ;;
            "German") FIREFOX_LANG="de" ;;
            "Greek") FIREFOX_LANG="el" ;;
            "Gujarati") FIREFOX_LANG="gu-IN" ;;
            "Hebrew") FIREFOX_LANG="he" ;;
            "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
            "Hungarian") FIREFOX_LANG="hu" ;;
            "Icelandic") FIREFOX_LANG="is" ;;
            "Indonesian") FIREFOX_LANG="id" ;;
            "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
            "Italian") FIREFOX_LANG="it" ;;
            "Japanese") FIREFOX_LANG="ja" ;;
            "Kannada") FIREFOX_LANG="kn" ;;
            "Korean") FIREFOX_LANG="ko" ;;
            "Latvian") FIREFOX_LANG="lv" ;;
            "Lithuanian") FIREFOX_LANG="lt" ;;
            "Macedonian") FIREFOX_LANG="mk" ;;
            "Malayalam") FIREFOX_LANG="ml" ;;
            "Marathi") FIREFOX_LANG="mr" ;;
            "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
            "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
            "Persian") FIREFOX_LANG="fa" ;;
            "Polish") FIREFOX_LANG="pl" ;;
            "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
            "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
            "Punjabi") FIREFOX_LANG="pa-IN" ;;
            "Romanian") FIREFOX_LANG="ro" ;;
            "Romansh") FIREFOX_LANG="rm" ;;
            "Russian") FIREFOX_LANG="ru" ;;
            "Sinhala") FIREFOX_LANG="si" ;;
            "Slovak") FIREFOX_LANG="sk" ;;
            "Slovenian") FIREFOX_LANG="sl" ;;
            "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
            "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
            "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
            "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
            "Swedish") FIREFOX_LANG="sv-SE" ;;
            "Telugu") FIREFOX_LANG="te" ;;
            "Thai") FIREFOX_LANG="th" ;;
            "Turkish") FIREFOX_LANG="tr" ;;
            "Ukrainian") FIREFOX_LANG="uk" ;;
            "Vietnamese") FIREFOX_LANG="vi" ;;
            "Welsh") FIREFOX_LANG="cy" ;;
            *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
        esac

        # Detection de la derniere version
        cd "$POL_System_TmpDir"
    
        # https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/README.txt
        # No MD5, since the script uses the latest installer version available
        POL_Download "https://download.mozilla.org/?product=firefox-latest&os=win&lang=$FIREFOX_LANG"
        INSTALLER="$POL_System_TmpDir/FirefoxSetup.exe"
        POL_System_mv "$POL_System_TmpDir/?product=firefox-latest&os=win&lang=$FIREFOX_LANG" "$INSTALLER"

    elif [ "$INSTALL_METHOD" = "LOCAL" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        INSTALLER="$APP_ANSWER"
    fi
fi

AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
CHECKS="$APP_ANSWER"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_Install_LunaTheme

POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"

cd "$POL_System_TmpDir"

# Flash Player
if is_checked "$PLUGIN_NAME_FLASH"; then
    POL_Call POL_Install_flashplayer
fi

# Shockwave Player
if is_checked "$PLUGIN_NAME_SHOCKWAVE"; then
    POL_Download "$PLUGIN_URL_SHOCKWAVE" ""
    POL_Wine_WaitBefore "$PLUGIN_NAME_SHOCKWAVE"
    Set_OS "win2k"
    POL_Wine "$PLUGIN_FILE_SHOCKWAVE"
    Set_OS "winxp"
    POL_Wine_WaitExit "$PLUGIN_NAME_SHOCKWAVE"
fi

# Disables plugin container (that makes Firefox crash on pages that already used flash/shockwave)
#echo "pref("dom.ipc.plugins.enabled", false);" > "$WINEPREFIX/drive_c/$PROGRAMFILES/Mozilla Firefox/defaults/pref/firefox.js"

POL_System_TmpDelete

POL_Shortcut "firefox.exe" "$TITLE"

POL_SetupWindow_Close

exit

Replies

Edited by petch

petch Sunday 25 October 2015 at 2:56
petch
Developer

Warning

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

Message

Try to fix "last version" scrapping, there's currently 2 installers in "latest" directories...

Differences

@@ -153,7 +153,7 @@
     cd "$POL_System_TmpDir"
     #wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
     wget "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
-    FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html)"
+    FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html|tail -n1)"
     [ "$FIREFOX_FILE" = "" ] && POL_Debug_Fatal "Firefox version : detection failure. bug"
 
     # Pas de MD5, car le script detecte la derniere version automatiquement

New source code

#!/bin/bash

# CHANGELOG
# [SuperPlumus] (2011-11-27 08-24)
#   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
#   Correction link + md5 for Java
# [SuperPlumus] (2012-02-24 05-20)
#   Remove cheking md5 for Flash Player and Shockwave Player (Bug 673)
# [SuperPlumus] (2012-04-06 19-40)
#   Change Wine version 1.3.26 -> 1.4
#   Remove optionnal install Java
# [SuperPlumus] (2012-04-11 09-32)
#   Add support $POL_SELECTED_FILE
# [Quentin PÂRIS] (2012-05-12 23-05)
#   Improving theme
# [SuperPlumus] (2013-05-09 17-27)
#   Re-add support Shockwave Player (precedently disabled for bad url)
#   Clean code
#   Remove disable plugin-container (dom.ipc.plugins.enabled = false)
#   Shockwave Player : Set OS win2k to prevent crash on Shockwave Player installation, set winxp at the end of the Shockwave Player installation
# [SuperPlumus] (2013-09-30 08-41)
#   Update gettext messages
# [petch] (2013-10-13 17-41)
#   Change Wine version 1.4 -> 1.6
# [Ground0] (2014-07-25)
#   Change Wine version 1.6 -> 1.7.22
# [SuperPlumus] (2015-05-02 23-55)
#   Update download url mirror

# Date : (2011-06-13 17-29)
# Last revision : (2015-05-02)
# Wine version used : 1.7.22
# Distribution used to test : OpenSUSE 13.1
# Firefox Version used to test : 31.0
# Author : SuperPlumus

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Mozilla Firefox"
PREFIX="MozillaFirefox"
WORKING_WINE_VERSION="1.7.22"

PLUGIN_NAME_FLASH="Flash Player"
PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

PLUGIN_FILE_SHOCKWAVE="Shockwave_Installer_Full.exe"
PLUGIN_URL_SHOCKWAVE="http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/$PLUGIN_FILE_SHOCKWAVE"

# Fonction pour simplifier l'utilisation de POL_SetupWindow_checkbox_list
is_checked ()
{
    if [ "$(echo "$CHECKS" | grep -o "$1")" != "" ]; then
        return 0
    else
        return 1
    fi
}

POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 856
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"


POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test

POL_System_TmpCreate "$PREFIX"

[ -z "$POL_SELECTED_FILE" ] && POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

if [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    # Language version
    POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"

    case "$APP_ANSWER" in
        "Afrikaans") FIREFOX_LANG="af" ;;
        "Albanian") FIREFOX_LANG="sq" ;;
        "Arabic") FIREFOX_LANG="ar" ;;
        "Asturian") FIREFOX_LANG="ast" ;;
        "Basque") FIREFOX_LANG="eu" ;;
        "Belarusian") FIREFOX_LANG="be" ;;
        "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
        "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
        "Breton") FIREFOX_LANG="br" ;;
        "Bulgarian") FIREFOX_LANG="bg" ;;
        "Catalan") FIREFOX_LANG="ca" ;;
        "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
        "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
        "Croatian") FIREFOX_LANG="hr" ;;
        "Czech") FIREFOX_LANG="cs" ;;
        "Danish") FIREFOX_LANG="da" ;;
        "Dutch") FIREFOX_LANG="nl" ;;
        "English (British)") FIREFOX_LANG="en-GB" ;;
        "English (South African)") FIREFOX_LANG="en-ZA" ;;
        "English (US)") FIREFOX_LANG="en-US" ;;
        "Esperanto") FIREFOX_LANG="eo" ;;
        "Estonian") FIREFOX_LANG="et" ;;
        "Finnish") FIREFOX_LANG="fi" ;;
        "French") FIREFOX_LANG="fr" ;;
        "Frisian") FIREFOX_LANG="fy-NL" ;;
        "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
        "Galician") FIREFOX_LANG="gl" ;;
        "German") FIREFOX_LANG="de" ;;
        "Greek") FIREFOX_LANG="el" ;;
        "Gujarati") FIREFOX_LANG="gu-IN" ;;
        "Hebrew") FIREFOX_LANG="he" ;;
        "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
        "Hungarian") FIREFOX_LANG="hu" ;;
        "Icelandic") FIREFOX_LANG="is" ;;
        "Indonesian") FIREFOX_LANG="id" ;;
        "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
        "Italian") FIREFOX_LANG="it" ;;
        "Japanese") FIREFOX_LANG="ja" ;;
        "Kannada") FIREFOX_LANG="kn" ;;
        "Korean") FIREFOX_LANG="ko" ;;
        "Latvian") FIREFOX_LANG="lv" ;;
        "Lithuanian") FIREFOX_LANG="lt" ;;
        "Macedonian") FIREFOX_LANG="mk" ;;
        "Malayalam") FIREFOX_LANG="ml" ;;
        "Marathi") FIREFOX_LANG="mr" ;;
        "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
        "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
        "Persian") FIREFOX_LANG="fa" ;;
        "Polish") FIREFOX_LANG="pl" ;;
        "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
        "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
        "Punjabi") FIREFOX_LANG="pa-IN" ;;
        "Romanian") FIREFOX_LANG="ro" ;;
        "Romansh") FIREFOX_LANG="rm" ;;
        "Russian") FIREFOX_LANG="ru" ;;
        "Sinhala") FIREFOX_LANG="si" ;;
        "Slovak") FIREFOX_LANG="sk" ;;
        "Slovenian") FIREFOX_LANG="sl" ;;
        "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
        "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
        "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
        "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
        "Swedish") FIREFOX_LANG="sv-SE" ;;
        "Telugu") FIREFOX_LANG="te" ;;
        "Thai") FIREFOX_LANG="th" ;;
        "Turkish") FIREFOX_LANG="tr" ;;
        "Ukrainian") FIREFOX_LANG="uk" ;;
        "Vietnamese") FIREFOX_LANG="vi" ;;
        "Welsh") FIREFOX_LANG="cy" ;;
        *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
    esac

    # Detection de la derniere version
    cd "$POL_System_TmpDir"
    #wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
    wget "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
    FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html|tail -n1)"
    [ "$FIREFOX_FILE" = "" ] && POL_Debug_Fatal "Firefox version : detection failure. bug"

    # Pas de MD5, car le script detecte la derniere version automatiquement
    POL_Download "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
    INSTALLER="$POL_System_TmpDir/$FIREFOX_FILE"
elif [ "$INSTALL_METHOD" = "LOCAL" ]
then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    INSTALLER="$APP_ANSWER"
fi

if [ -n "$POL_SELECTED_FILE" ]
then
    INSTALLER="$POL_SELECTED_FILE"
fi

AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
CHECKS="$APP_ANSWER"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_Install_LunaTheme

POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"

cd "$POL_System_TmpDir"

# Flash Player
if is_checked "$PLUGIN_NAME_FLASH"; then
    POL_Call POL_Install_flashplayer
fi

# Shockwave Player
if is_checked "$PLUGIN_NAME_SHOCKWAVE"; then
    POL_Download "$PLUGIN_URL_SHOCKWAVE" ""
    POL_Wine_WaitBefore "$PLUGIN_NAME_SHOCKWAVE"
    Set_OS "win2k"
    POL_Wine "$PLUGIN_FILE_SHOCKWAVE"
    Set_OS "winxp"
    POL_Wine_WaitExit "$PLUGIN_NAME_SHOCKWAVE"
fi

# Disables plugin container (that makes Firefox crash on pages that already used flash/shockwave)
#echo "pref("dom.ipc.plugins.enabled", false);" > "$WINEPREFIX/drive_c/$PROGRAMFILES/Mozilla Firefox/defaults/pref/firefox.js"

POL_System_TmpDelete

POL_Shortcut "firefox.exe" "$TITLE"

POL_SetupWindow_Close

exit

Replies

SuperPlumus Sunday 3 May 2015 at 0:36
SuperPlumus Anonymous
Admin

Warning

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

Message

Update download mirror (It was stuck on version 31.0).

Differences

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # CHANGELOG
-# [SuperPlumus] (2011-11-27 08:24)
+# [SuperPlumus] (2011-11-27 08-24)
 #   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
 #   Correction link + md5 for Java
 # [SuperPlumus] (2012-02-24 05-20)
@@ -24,9 +24,11 @@
 #   Change Wine version 1.4 -> 1.6
 # [Ground0] (2014-07-25)
 #   Change Wine version 1.6 -> 1.7.22
+# [SuperPlumus] (2015-05-02 23-55)
+#   Update download url mirror
 
 # Date : (2011-06-13 17-29)
-# Last revision : (2014-07-25)
+# Last revision : (2015-05-02)
 # Wine version used : 1.7.22
 # Distribution used to test : OpenSUSE 13.1
 # Firefox Version used to test : 31.0
@@ -149,12 +151,13 @@
 
     # Detection de la derniere version
     cd "$POL_System_TmpDir"
-    wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
+    #wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
+    wget "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
     FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html)"
     [ "$FIREFOX_FILE" = "" ] && POL_Debug_Fatal "Firefox version : detection failure. bug"
 
     # Pas de MD5, car le script detecte la derniere version automatiquement
-    POL_Download "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
+    POL_Download "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
     INSTALLER="$POL_System_TmpDir/$FIREFOX_FILE"
 elif [ "$INSTALL_METHOD" = "LOCAL" ]
 then
@@ -207,4 +210,4 @@
 
 POL_SetupWindow_Close
 
-exit
\ No newline at end of file
+exit

New source code

#!/bin/bash

# CHANGELOG
# [SuperPlumus] (2011-11-27 08-24)
#   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
#   Correction link + md5 for Java
# [SuperPlumus] (2012-02-24 05-20)
#   Remove cheking md5 for Flash Player and Shockwave Player (Bug 673)
# [SuperPlumus] (2012-04-06 19-40)
#   Change Wine version 1.3.26 -> 1.4
#   Remove optionnal install Java
# [SuperPlumus] (2012-04-11 09-32)
#   Add support $POL_SELECTED_FILE
# [Quentin PÂRIS] (2012-05-12 23-05)
#   Improving theme
# [SuperPlumus] (2013-05-09 17-27)
#   Re-add support Shockwave Player (precedently disabled for bad url)
#   Clean code
#   Remove disable plugin-container (dom.ipc.plugins.enabled = false)
#   Shockwave Player : Set OS win2k to prevent crash on Shockwave Player installation, set winxp at the end of the Shockwave Player installation
# [SuperPlumus] (2013-09-30 08-41)
#   Update gettext messages
# [petch] (2013-10-13 17-41)
#   Change Wine version 1.4 -> 1.6
# [Ground0] (2014-07-25)
#   Change Wine version 1.6 -> 1.7.22
# [SuperPlumus] (2015-05-02 23-55)
#   Update download url mirror

# Date : (2011-06-13 17-29)
# Last revision : (2015-05-02)
# Wine version used : 1.7.22
# Distribution used to test : OpenSUSE 13.1
# Firefox Version used to test : 31.0
# Author : SuperPlumus

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Mozilla Firefox"
PREFIX="MozillaFirefox"
WORKING_WINE_VERSION="1.7.22"

PLUGIN_NAME_FLASH="Flash Player"
PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

PLUGIN_FILE_SHOCKWAVE="Shockwave_Installer_Full.exe"
PLUGIN_URL_SHOCKWAVE="http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/$PLUGIN_FILE_SHOCKWAVE"

# Fonction pour simplifier l'utilisation de POL_SetupWindow_checkbox_list
is_checked ()
{
    if [ "$(echo "$CHECKS" | grep -o "$1")" != "" ]; then
        return 0
    else
        return 1
    fi
}

POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 856
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"


POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test

POL_System_TmpCreate "$PREFIX"

[ -z "$POL_SELECTED_FILE" ] && POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

if [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    # Language version
    POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"

    case "$APP_ANSWER" in
        "Afrikaans") FIREFOX_LANG="af" ;;
        "Albanian") FIREFOX_LANG="sq" ;;
        "Arabic") FIREFOX_LANG="ar" ;;
        "Asturian") FIREFOX_LANG="ast" ;;
        "Basque") FIREFOX_LANG="eu" ;;
        "Belarusian") FIREFOX_LANG="be" ;;
        "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
        "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
        "Breton") FIREFOX_LANG="br" ;;
        "Bulgarian") FIREFOX_LANG="bg" ;;
        "Catalan") FIREFOX_LANG="ca" ;;
        "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
        "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
        "Croatian") FIREFOX_LANG="hr" ;;
        "Czech") FIREFOX_LANG="cs" ;;
        "Danish") FIREFOX_LANG="da" ;;
        "Dutch") FIREFOX_LANG="nl" ;;
        "English (British)") FIREFOX_LANG="en-GB" ;;
        "English (South African)") FIREFOX_LANG="en-ZA" ;;
        "English (US)") FIREFOX_LANG="en-US" ;;
        "Esperanto") FIREFOX_LANG="eo" ;;
        "Estonian") FIREFOX_LANG="et" ;;
        "Finnish") FIREFOX_LANG="fi" ;;
        "French") FIREFOX_LANG="fr" ;;
        "Frisian") FIREFOX_LANG="fy-NL" ;;
        "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
        "Galician") FIREFOX_LANG="gl" ;;
        "German") FIREFOX_LANG="de" ;;
        "Greek") FIREFOX_LANG="el" ;;
        "Gujarati") FIREFOX_LANG="gu-IN" ;;
        "Hebrew") FIREFOX_LANG="he" ;;
        "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
        "Hungarian") FIREFOX_LANG="hu" ;;
        "Icelandic") FIREFOX_LANG="is" ;;
        "Indonesian") FIREFOX_LANG="id" ;;
        "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
        "Italian") FIREFOX_LANG="it" ;;
        "Japanese") FIREFOX_LANG="ja" ;;
        "Kannada") FIREFOX_LANG="kn" ;;
        "Korean") FIREFOX_LANG="ko" ;;
        "Latvian") FIREFOX_LANG="lv" ;;
        "Lithuanian") FIREFOX_LANG="lt" ;;
        "Macedonian") FIREFOX_LANG="mk" ;;
        "Malayalam") FIREFOX_LANG="ml" ;;
        "Marathi") FIREFOX_LANG="mr" ;;
        "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
        "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
        "Persian") FIREFOX_LANG="fa" ;;
        "Polish") FIREFOX_LANG="pl" ;;
        "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
        "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
        "Punjabi") FIREFOX_LANG="pa-IN" ;;
        "Romanian") FIREFOX_LANG="ro" ;;
        "Romansh") FIREFOX_LANG="rm" ;;
        "Russian") FIREFOX_LANG="ru" ;;
        "Sinhala") FIREFOX_LANG="si" ;;
        "Slovak") FIREFOX_LANG="sk" ;;
        "Slovenian") FIREFOX_LANG="sl" ;;
        "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
        "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
        "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
        "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
        "Swedish") FIREFOX_LANG="sv-SE" ;;
        "Telugu") FIREFOX_LANG="te" ;;
        "Thai") FIREFOX_LANG="th" ;;
        "Turkish") FIREFOX_LANG="tr" ;;
        "Ukrainian") FIREFOX_LANG="uk" ;;
        "Vietnamese") FIREFOX_LANG="vi" ;;
        "Welsh") FIREFOX_LANG="cy" ;;
        *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
    esac

    # Detection de la derniere version
    cd "$POL_System_TmpDir"
    #wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
    wget "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
    FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html)"
    [ "$FIREFOX_FILE" = "" ] && POL_Debug_Fatal "Firefox version : detection failure. bug"

    # Pas de MD5, car le script detecte la derniere version automatiquement
    POL_Download "http://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
    INSTALLER="$POL_System_TmpDir/$FIREFOX_FILE"
elif [ "$INSTALL_METHOD" = "LOCAL" ]
then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    INSTALLER="$APP_ANSWER"
fi

if [ -n "$POL_SELECTED_FILE" ]
then
    INSTALLER="$POL_SELECTED_FILE"
fi

AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
CHECKS="$APP_ANSWER"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_Install_LunaTheme

POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"

cd "$POL_System_TmpDir"

# Flash Player
if is_checked "$PLUGIN_NAME_FLASH"; then
    POL_Call POL_Install_flashplayer
fi

# Shockwave Player
if is_checked "$PLUGIN_NAME_SHOCKWAVE"; then
    POL_Download "$PLUGIN_URL_SHOCKWAVE" ""
    POL_Wine_WaitBefore "$PLUGIN_NAME_SHOCKWAVE"
    Set_OS "win2k"
    POL_Wine "$PLUGIN_FILE_SHOCKWAVE"
    Set_OS "winxp"
    POL_Wine_WaitExit "$PLUGIN_NAME_SHOCKWAVE"
fi

# Disables plugin container (that makes Firefox crash on pages that already used flash/shockwave)
#echo "pref("dom.ipc.plugins.enabled", false);" > "$WINEPREFIX/drive_c/$PROGRAMFILES/Mozilla Firefox/defaults/pref/firefox.js"

POL_System_TmpDelete

POL_Shortcut "firefox.exe" "$TITLE"

POL_SetupWindow_Close

exit

Replies

Edited by SuperPlumus

petch Saturday 2 May 2015 at 10:56
petch
Developer

Message

Current mirror is stuck at Firefox 31.0.

Firefox self-update works though, so it later updates to the latest available version (currently 37.0.2)

Replies

petch Saturday 2 May 2015 at 10:42
petch
Developer

Warning

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

Message

Add POL_SetupWindow_SetID support

Differences

@@ -57,6 +57,7 @@
 
 POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
 POL_SetupWindow_Init
+POL_SetupWindow_SetID 856
 POL_Debug_Init
 
 POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"

New source code

#!/bin/bash

# CHANGELOG
# [SuperPlumus] (2011-11-27 08:24)
#   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
#   Correction link + md5 for Java
# [SuperPlumus] (2012-02-24 05-20)
#   Remove cheking md5 for Flash Player and Shockwave Player (Bug 673)
# [SuperPlumus] (2012-04-06 19-40)
#   Change Wine version 1.3.26 -> 1.4
#   Remove optionnal install Java
# [SuperPlumus] (2012-04-11 09-32)
#   Add support $POL_SELECTED_FILE
# [Quentin PÂRIS] (2012-05-12 23-05)
#   Improving theme
# [SuperPlumus] (2013-05-09 17-27)
#   Re-add support Shockwave Player (precedently disabled for bad url)
#   Clean code
#   Remove disable plugin-container (dom.ipc.plugins.enabled = false)
#   Shockwave Player : Set OS win2k to prevent crash on Shockwave Player installation, set winxp at the end of the Shockwave Player installation
# [SuperPlumus] (2013-09-30 08-41)
#   Update gettext messages
# [petch] (2013-10-13 17-41)
#   Change Wine version 1.4 -> 1.6
# [Ground0] (2014-07-25)
#   Change Wine version 1.6 -> 1.7.22

# Date : (2011-06-13 17-29)
# Last revision : (2014-07-25)
# Wine version used : 1.7.22
# Distribution used to test : OpenSUSE 13.1
# Firefox Version used to test : 31.0
# Author : SuperPlumus

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Mozilla Firefox"
PREFIX="MozillaFirefox"
WORKING_WINE_VERSION="1.7.22"

PLUGIN_NAME_FLASH="Flash Player"
PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

PLUGIN_FILE_SHOCKWAVE="Shockwave_Installer_Full.exe"
PLUGIN_URL_SHOCKWAVE="http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/$PLUGIN_FILE_SHOCKWAVE"

# Fonction pour simplifier l'utilisation de POL_SetupWindow_checkbox_list
is_checked ()
{
    if [ "$(echo "$CHECKS" | grep -o "$1")" != "" ]; then
        return 0
    else
        return 1
    fi
}

POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 856
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"


POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test

POL_System_TmpCreate "$PREFIX"

[ -z "$POL_SELECTED_FILE" ] && POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

if [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    # Language version
    POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"

    case "$APP_ANSWER" in
        "Afrikaans") FIREFOX_LANG="af" ;;
        "Albanian") FIREFOX_LANG="sq" ;;
        "Arabic") FIREFOX_LANG="ar" ;;
        "Asturian") FIREFOX_LANG="ast" ;;
        "Basque") FIREFOX_LANG="eu" ;;
        "Belarusian") FIREFOX_LANG="be" ;;
        "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
        "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
        "Breton") FIREFOX_LANG="br" ;;
        "Bulgarian") FIREFOX_LANG="bg" ;;
        "Catalan") FIREFOX_LANG="ca" ;;
        "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
        "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
        "Croatian") FIREFOX_LANG="hr" ;;
        "Czech") FIREFOX_LANG="cs" ;;
        "Danish") FIREFOX_LANG="da" ;;
        "Dutch") FIREFOX_LANG="nl" ;;
        "English (British)") FIREFOX_LANG="en-GB" ;;
        "English (South African)") FIREFOX_LANG="en-ZA" ;;
        "English (US)") FIREFOX_LANG="en-US" ;;
        "Esperanto") FIREFOX_LANG="eo" ;;
        "Estonian") FIREFOX_LANG="et" ;;
        "Finnish") FIREFOX_LANG="fi" ;;
        "French") FIREFOX_LANG="fr" ;;
        "Frisian") FIREFOX_LANG="fy-NL" ;;
        "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
        "Galician") FIREFOX_LANG="gl" ;;
        "German") FIREFOX_LANG="de" ;;
        "Greek") FIREFOX_LANG="el" ;;
        "Gujarati") FIREFOX_LANG="gu-IN" ;;
        "Hebrew") FIREFOX_LANG="he" ;;
        "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
        "Hungarian") FIREFOX_LANG="hu" ;;
        "Icelandic") FIREFOX_LANG="is" ;;
        "Indonesian") FIREFOX_LANG="id" ;;
        "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
        "Italian") FIREFOX_LANG="it" ;;
        "Japanese") FIREFOX_LANG="ja" ;;
        "Kannada") FIREFOX_LANG="kn" ;;
        "Korean") FIREFOX_LANG="ko" ;;
        "Latvian") FIREFOX_LANG="lv" ;;
        "Lithuanian") FIREFOX_LANG="lt" ;;
        "Macedonian") FIREFOX_LANG="mk" ;;
        "Malayalam") FIREFOX_LANG="ml" ;;
        "Marathi") FIREFOX_LANG="mr" ;;
        "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
        "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
        "Persian") FIREFOX_LANG="fa" ;;
        "Polish") FIREFOX_LANG="pl" ;;
        "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
        "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
        "Punjabi") FIREFOX_LANG="pa-IN" ;;
        "Romanian") FIREFOX_LANG="ro" ;;
        "Romansh") FIREFOX_LANG="rm" ;;
        "Russian") FIREFOX_LANG="ru" ;;
        "Sinhala") FIREFOX_LANG="si" ;;
        "Slovak") FIREFOX_LANG="sk" ;;
        "Slovenian") FIREFOX_LANG="sl" ;;
        "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
        "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
        "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
        "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
        "Swedish") FIREFOX_LANG="sv-SE" ;;
        "Telugu") FIREFOX_LANG="te" ;;
        "Thai") FIREFOX_LANG="th" ;;
        "Turkish") FIREFOX_LANG="tr" ;;
        "Ukrainian") FIREFOX_LANG="uk" ;;
        "Vietnamese") FIREFOX_LANG="vi" ;;
        "Welsh") FIREFOX_LANG="cy" ;;
        *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
    esac

    # Detection de la derniere version
    cd "$POL_System_TmpDir"
    wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
    FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html)"
    [ "$FIREFOX_FILE" = "" ] && POL_Debug_Fatal "Firefox version : detection failure. bug"

    # Pas de MD5, car le script detecte la derniere version automatiquement
    POL_Download "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
    INSTALLER="$POL_System_TmpDir/$FIREFOX_FILE"
elif [ "$INSTALL_METHOD" = "LOCAL" ]
then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    INSTALLER="$APP_ANSWER"
fi

if [ -n "$POL_SELECTED_FILE" ]
then
    INSTALLER="$POL_SELECTED_FILE"
fi

AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
CHECKS="$APP_ANSWER"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_Install_LunaTheme

POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"

cd "$POL_System_TmpDir"

# Flash Player
if is_checked "$PLUGIN_NAME_FLASH"; then
    POL_Call POL_Install_flashplayer
fi

# Shockwave Player
if is_checked "$PLUGIN_NAME_SHOCKWAVE"; then
    POL_Download "$PLUGIN_URL_SHOCKWAVE" ""
    POL_Wine_WaitBefore "$PLUGIN_NAME_SHOCKWAVE"
    Set_OS "win2k"
    POL_Wine "$PLUGIN_FILE_SHOCKWAVE"
    Set_OS "winxp"
    POL_Wine_WaitExit "$PLUGIN_NAME_SHOCKWAVE"
fi

# Disables plugin container (that makes Firefox crash on pages that already used flash/shockwave)
#echo "pref("dom.ipc.plugins.enabled", false);" > "$WINEPREFIX/drive_c/$PROGRAMFILES/Mozilla Firefox/defaults/pref/firefox.js"

POL_System_TmpDelete

POL_Shortcut "firefox.exe" "$TITLE"

POL_SetupWindow_Close

exit

Replies

nachopavon Thursday 30 April 2015 at 12:43
nachopavon Anonymous

Message

I get this error: Error in POL_Wine_InstallVersion
Incapaz de encontrar la versión: 1.7.22

Replies

Thursday 30 April 2015 at 19:05
Looks like some communication issue with the web server...
Is it reproducible?
petch Sunday 22 March 2015 at 16:46
petch
Developer

Warning

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

Message

Create the virtual drive and start the installation as late as possible in the script, in accordance with #1027

Differences

@@ -62,17 +62,12 @@
 POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"
 
 
-POL_Wine_SelectPrefix "$PREFIX"
-POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
-
 POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test
 
 POL_System_TmpCreate "$PREFIX"
 
 [ -z "$POL_SELECTED_FILE" ] && POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
 
-POL_Call POL_Install_LunaTheme
-
 if [ "$INSTALL_METHOD" = "DOWNLOAD" ]
 then
     # Language version
@@ -159,25 +154,17 @@
 
     # Pas de MD5, car le script detecte la derniere version automatiquement
     POL_Download "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
-    POL_Wine_WaitBefore "$TITLE"
-    POL_Wine "$FIREFOX_FILE"
-    POL_Wine_WaitExit "$TITLE"
-fi
-
-if [ "$INSTALL_METHOD" = "LOCAL" ]
+    INSTALLER="$POL_System_TmpDir/$FIREFOX_FILE"
+elif [ "$INSTALL_METHOD" = "LOCAL" ]
 then
     cd "$HOME"
     POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
-    POL_Wine_WaitBefore "$TITLE"
-    POL_Wine "$APP_ANSWER"
-    POL_Wine_WaitExit "$TITLE"
+    INSTALLER="$APP_ANSWER"
 fi
 
 if [ -n "$POL_SELECTED_FILE" ]
 then
-    POL_Wine_WaitBefore "$TITLE"
-    POL_Wine "$POL_SELECTED_FILE"
-    POL_Wine_WaitExit "$TITLE"
+    INSTALLER="$POL_SELECTED_FILE"
 fi
 
 AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"
@@ -185,6 +172,14 @@
 POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
 CHECKS="$APP_ANSWER"
 
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+
+POL_Call POL_Install_LunaTheme
+
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine "$INSTALLER"
+
 cd "$POL_System_TmpDir"
 
 # Flash Player

New source code

#!/bin/bash

# CHANGELOG
# [SuperPlumus] (2011-11-27 08:24)
#   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
#   Correction link + md5 for Java
# [SuperPlumus] (2012-02-24 05-20)
#   Remove cheking md5 for Flash Player and Shockwave Player (Bug 673)
# [SuperPlumus] (2012-04-06 19-40)
#   Change Wine version 1.3.26 -> 1.4
#   Remove optionnal install Java
# [SuperPlumus] (2012-04-11 09-32)
#   Add support $POL_SELECTED_FILE
# [Quentin PÂRIS] (2012-05-12 23-05)
#   Improving theme
# [SuperPlumus] (2013-05-09 17-27)
#   Re-add support Shockwave Player (precedently disabled for bad url)
#   Clean code
#   Remove disable plugin-container (dom.ipc.plugins.enabled = false)
#   Shockwave Player : Set OS win2k to prevent crash on Shockwave Player installation, set winxp at the end of the Shockwave Player installation
# [SuperPlumus] (2013-09-30 08-41)
#   Update gettext messages
# [petch] (2013-10-13 17-41)
#   Change Wine version 1.4 -> 1.6
# [Ground0] (2014-07-25)
#   Change Wine version 1.6 -> 1.7.22

# Date : (2011-06-13 17-29)
# Last revision : (2014-07-25)
# Wine version used : 1.7.22
# Distribution used to test : OpenSUSE 13.1
# Firefox Version used to test : 31.0
# Author : SuperPlumus

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Mozilla Firefox"
PREFIX="MozillaFirefox"
WORKING_WINE_VERSION="1.7.22"

PLUGIN_NAME_FLASH="Flash Player"
PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

PLUGIN_FILE_SHOCKWAVE="Shockwave_Installer_Full.exe"
PLUGIN_URL_SHOCKWAVE="http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/$PLUGIN_FILE_SHOCKWAVE"

# Fonction pour simplifier l'utilisation de POL_SetupWindow_checkbox_list
is_checked ()
{
    if [ "$(echo "$CHECKS" | grep -o "$1")" != "" ]; then
        return 0
    else
        return 1
    fi
}

POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"


POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test

POL_System_TmpCreate "$PREFIX"

[ -z "$POL_SELECTED_FILE" ] && POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

if [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    # Language version
    POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"

    case "$APP_ANSWER" in
        "Afrikaans") FIREFOX_LANG="af" ;;
        "Albanian") FIREFOX_LANG="sq" ;;
        "Arabic") FIREFOX_LANG="ar" ;;
        "Asturian") FIREFOX_LANG="ast" ;;
        "Basque") FIREFOX_LANG="eu" ;;
        "Belarusian") FIREFOX_LANG="be" ;;
        "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
        "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
        "Breton") FIREFOX_LANG="br" ;;
        "Bulgarian") FIREFOX_LANG="bg" ;;
        "Catalan") FIREFOX_LANG="ca" ;;
        "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
        "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
        "Croatian") FIREFOX_LANG="hr" ;;
        "Czech") FIREFOX_LANG="cs" ;;
        "Danish") FIREFOX_LANG="da" ;;
        "Dutch") FIREFOX_LANG="nl" ;;
        "English (British)") FIREFOX_LANG="en-GB" ;;
        "English (South African)") FIREFOX_LANG="en-ZA" ;;
        "English (US)") FIREFOX_LANG="en-US" ;;
        "Esperanto") FIREFOX_LANG="eo" ;;
        "Estonian") FIREFOX_LANG="et" ;;
        "Finnish") FIREFOX_LANG="fi" ;;
        "French") FIREFOX_LANG="fr" ;;
        "Frisian") FIREFOX_LANG="fy-NL" ;;
        "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
        "Galician") FIREFOX_LANG="gl" ;;
        "German") FIREFOX_LANG="de" ;;
        "Greek") FIREFOX_LANG="el" ;;
        "Gujarati") FIREFOX_LANG="gu-IN" ;;
        "Hebrew") FIREFOX_LANG="he" ;;
        "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
        "Hungarian") FIREFOX_LANG="hu" ;;
        "Icelandic") FIREFOX_LANG="is" ;;
        "Indonesian") FIREFOX_LANG="id" ;;
        "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
        "Italian") FIREFOX_LANG="it" ;;
        "Japanese") FIREFOX_LANG="ja" ;;
        "Kannada") FIREFOX_LANG="kn" ;;
        "Korean") FIREFOX_LANG="ko" ;;
        "Latvian") FIREFOX_LANG="lv" ;;
        "Lithuanian") FIREFOX_LANG="lt" ;;
        "Macedonian") FIREFOX_LANG="mk" ;;
        "Malayalam") FIREFOX_LANG="ml" ;;
        "Marathi") FIREFOX_LANG="mr" ;;
        "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
        "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
        "Persian") FIREFOX_LANG="fa" ;;
        "Polish") FIREFOX_LANG="pl" ;;
        "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
        "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
        "Punjabi") FIREFOX_LANG="pa-IN" ;;
        "Romanian") FIREFOX_LANG="ro" ;;
        "Romansh") FIREFOX_LANG="rm" ;;
        "Russian") FIREFOX_LANG="ru" ;;
        "Sinhala") FIREFOX_LANG="si" ;;
        "Slovak") FIREFOX_LANG="sk" ;;
        "Slovenian") FIREFOX_LANG="sl" ;;
        "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
        "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
        "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
        "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
        "Swedish") FIREFOX_LANG="sv-SE" ;;
        "Telugu") FIREFOX_LANG="te" ;;
        "Thai") FIREFOX_LANG="th" ;;
        "Turkish") FIREFOX_LANG="tr" ;;
        "Ukrainian") FIREFOX_LANG="uk" ;;
        "Vietnamese") FIREFOX_LANG="vi" ;;
        "Welsh") FIREFOX_LANG="cy" ;;
        *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
    esac

    # Detection de la derniere version
    cd "$POL_System_TmpDir"
    wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
    FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html)"
    [ "$FIREFOX_FILE" = "" ] && POL_Debug_Fatal "Firefox version : detection failure. bug"

    # Pas de MD5, car le script detecte la derniere version automatiquement
    POL_Download "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
    INSTALLER="$POL_System_TmpDir/$FIREFOX_FILE"
elif [ "$INSTALL_METHOD" = "LOCAL" ]
then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    INSTALLER="$APP_ANSWER"
fi

if [ -n "$POL_SELECTED_FILE" ]
then
    INSTALLER="$POL_SELECTED_FILE"
fi

AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
CHECKS="$APP_ANSWER"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Call POL_Install_LunaTheme

POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"

cd "$POL_System_TmpDir"

# Flash Player
if is_checked "$PLUGIN_NAME_FLASH"; then
    POL_Call POL_Install_flashplayer
fi

# Shockwave Player
if is_checked "$PLUGIN_NAME_SHOCKWAVE"; then
    POL_Download "$PLUGIN_URL_SHOCKWAVE" ""
    POL_Wine_WaitBefore "$PLUGIN_NAME_SHOCKWAVE"
    Set_OS "win2k"
    POL_Wine "$PLUGIN_FILE_SHOCKWAVE"
    Set_OS "winxp"
    POL_Wine_WaitExit "$PLUGIN_NAME_SHOCKWAVE"
fi

# Disables plugin container (that makes Firefox crash on pages that already used flash/shockwave)
#echo "pref("dom.ipc.plugins.enabled", false);" > "$WINEPREFIX/drive_c/$PROGRAMFILES/Mozilla Firefox/defaults/pref/firefox.js"

POL_System_TmpDelete

POL_Shortcut "firefox.exe" "$TITLE"

POL_SetupWindow_Close

exit

Replies

Anonymous
Tuesday 9 February 2016 at 19:05
how do you open this link
Tuesday 9 February 2016 at 23:21
I'm not sure what you'd want to run a version of the script that's almost a year old... But if you want, you must register the URL scheme playonlinux:// with the playonlinux-url_handler script

Edited by petch

Ground0 Friday 25 July 2014 at 9:29
Ground0

Warning

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

Differences

@@ -22,11 +22,14 @@
 #   Update gettext messages
 # [petch] (2013-10-13 17-41)
 #   Change Wine version 1.4 -> 1.6
+# [Ground0] (2014-07-25)
+#   Change Wine version 1.6 -> 1.7.22
 
 # Date : (2011-06-13 17-29)
-# Last revision : (2013-10-13 17-41)
-# Wine version used : 1.6
-# Distribution used to test : Ubuntu 12.04
+# Last revision : (2014-07-25)
+# Wine version used : 1.7.22
+# Distribution used to test : OpenSUSE 13.1
+# Firefox Version used to test : 31.0
 # Author : SuperPlumus
 
 [ "$PLAYONLINUX" = "" ] && exit 0
@@ -34,7 +37,7 @@
 
 TITLE="Mozilla Firefox"
 PREFIX="MozillaFirefox"
-WORKING_WINE_VERSION="1.6"
+WORKING_WINE_VERSION="1.7.22"
 
 PLUGIN_NAME_FLASH="Flash Player"
 PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

New source code

#!/bin/bash

# CHANGELOG
# [SuperPlumus] (2011-11-27 08:24)
#   Correction links + md5 for Flash Player and Shockwave Player (bug 567)
#   Correction link + md5 for Java
# [SuperPlumus] (2012-02-24 05-20)
#   Remove cheking md5 for Flash Player and Shockwave Player (Bug 673)
# [SuperPlumus] (2012-04-06 19-40)
#   Change Wine version 1.3.26 -> 1.4
#   Remove optionnal install Java
# [SuperPlumus] (2012-04-11 09-32)
#   Add support $POL_SELECTED_FILE
# [Quentin PÂRIS] (2012-05-12 23-05)
#   Improving theme
# [SuperPlumus] (2013-05-09 17-27)
#   Re-add support Shockwave Player (precedently disabled for bad url)
#   Clean code
#   Remove disable plugin-container (dom.ipc.plugins.enabled = false)
#   Shockwave Player : Set OS win2k to prevent crash on Shockwave Player installation, set winxp at the end of the Shockwave Player installation
# [SuperPlumus] (2013-09-30 08-41)
#   Update gettext messages
# [petch] (2013-10-13 17-41)
#   Change Wine version 1.4 -> 1.6
# [Ground0] (2014-07-25)
#   Change Wine version 1.6 -> 1.7.22

# Date : (2011-06-13 17-29)
# Last revision : (2014-07-25)
# Wine version used : 1.7.22
# Distribution used to test : OpenSUSE 13.1
# Firefox Version used to test : 31.0
# Author : SuperPlumus

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Mozilla Firefox"
PREFIX="MozillaFirefox"
WORKING_WINE_VERSION="1.7.22"

PLUGIN_NAME_FLASH="Flash Player"
PLUGIN_NAME_SHOCKWAVE="Shockwave Player"

PLUGIN_FILE_SHOCKWAVE="Shockwave_Installer_Full.exe"
PLUGIN_URL_SHOCKWAVE="http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/$PLUGIN_FILE_SHOCKWAVE"

# Fonction pour simplifier l'utilisation de POL_SetupWindow_checkbox_list
is_checked ()
{
    if [ "$(echo "$CHECKS" | grep -o "$1")" != "" ]; then
        return 0
    else
        return 1
    fi
}

POL_GetSetupImages "$SITE/setups/firefox/top.jpg" "$SITE/setups/firefox/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Mozilla" "http://www.mozilla.com" "SuperPlumus" "$PREFIX"


POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

POL_Wine_EnableOSXNativeDock # A new feature for PlayOnMac. Firefox is the first test

POL_System_TmpCreate "$PREFIX"

[ -z "$POL_SELECTED_FILE" ] && POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"

POL_Call POL_Install_LunaTheme

if [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    # Language version
    POL_SetupWindow_menu "$(eval_gettext 'Which language version would you like to install?')" "$TITLE" "Afrikaans~Albanian~Arabic~Asturian~Basque~Belarusian~Bengali (Bangladesh)~Bengali (India)~Breton~Bulgarian~Catalan~Chinese (Simplified)~Chinese (Traditional)~Croatian~Czech~Danish~Dutch~English (British)~English (South African)~English (US)~Esperanto~Estonian~Finnish~French~Frisian~Gaelic (Scotland)~Galician~German~Greek~Gujarati~Hebrew~Hindi (India)~Hungarian~Indonesian~Icelandic~Irish (Ireland)~Italian~Japanese~Kannada~Korean~Latvian~Lithuanian~Macedonian~Malayalam~Marathi~Norwegian (Bokmål)~Norwegian (Nynorsk)~Persian~Polish~Portuguese (Brazilian)~Portuguese (Portugal)~Punjabi~Romanian~Romansh~Russian~Sinhala~Slovak~Slovenian~Spanish (Argentina)~Spanish (Chile)~Spanish (Mexico)~Spanish (Spain)~Swedish~Telugu~Thai~Turkish~Ukrainian~Vietnamese~Welsh" "~"

    case "$APP_ANSWER" in
        "Afrikaans") FIREFOX_LANG="af" ;;
        "Albanian") FIREFOX_LANG="sq" ;;
        "Arabic") FIREFOX_LANG="ar" ;;
        "Asturian") FIREFOX_LANG="ast" ;;
        "Basque") FIREFOX_LANG="eu" ;;
        "Belarusian") FIREFOX_LANG="be" ;;
        "Bengali (Bangladesh)") FIREFOX_LANG="bn-BD" ;;
        "Bengali (India)") FIREFOX_LANG="bn-IN" ;;
        "Breton") FIREFOX_LANG="br" ;;
        "Bulgarian") FIREFOX_LANG="bg" ;;
        "Catalan") FIREFOX_LANG="ca" ;;
        "Chinese (Simplified)") FIREFOX_LANG="zh-CN" ;;
        "Chinese (Traditional)") FIREFOX_LANG="zh-TW" ;;
        "Croatian") FIREFOX_LANG="hr" ;;
        "Czech") FIREFOX_LANG="cs" ;;
        "Danish") FIREFOX_LANG="da" ;;
        "Dutch") FIREFOX_LANG="nl" ;;
        "English (British)") FIREFOX_LANG="en-GB" ;;
        "English (South African)") FIREFOX_LANG="en-ZA" ;;
        "English (US)") FIREFOX_LANG="en-US" ;;
        "Esperanto") FIREFOX_LANG="eo" ;;
        "Estonian") FIREFOX_LANG="et" ;;
        "Finnish") FIREFOX_LANG="fi" ;;
        "French") FIREFOX_LANG="fr" ;;
        "Frisian") FIREFOX_LANG="fy-NL" ;;
        "Gaelic (Scotland)") FIREFOX_LANG="gd" ;;
        "Galician") FIREFOX_LANG="gl" ;;
        "German") FIREFOX_LANG="de" ;;
        "Greek") FIREFOX_LANG="el" ;;
        "Gujarati") FIREFOX_LANG="gu-IN" ;;
        "Hebrew") FIREFOX_LANG="he" ;;
        "Hindi (India)") FIREFOX_LANG="hi-IN" ;;
        "Hungarian") FIREFOX_LANG="hu" ;;
        "Icelandic") FIREFOX_LANG="is" ;;
        "Indonesian") FIREFOX_LANG="id" ;;
        "Irish (Ireland)") FIREFOX_LANG="ga-IE" ;;
        "Italian") FIREFOX_LANG="it" ;;
        "Japanese") FIREFOX_LANG="ja" ;;
        "Kannada") FIREFOX_LANG="kn" ;;
        "Korean") FIREFOX_LANG="ko" ;;
        "Latvian") FIREFOX_LANG="lv" ;;
        "Lithuanian") FIREFOX_LANG="lt" ;;
        "Macedonian") FIREFOX_LANG="mk" ;;
        "Malayalam") FIREFOX_LANG="ml" ;;
        "Marathi") FIREFOX_LANG="mr" ;;
        "Norwegian (Bokmål)") FIREFOX_LANG="nb-NO" ;;
        "Norwegian (Nynorsk)") FIREFOX_LANG="nn-NO" ;;
        "Persian") FIREFOX_LANG="fa" ;;
        "Polish") FIREFOX_LANG="pl" ;;
        "Portuguese (Brazilian)") FIREFOX_LANG="pt-BR" ;;
        "Portuguese (Portugal)") FIREFOX_LANG="pt-PT" ;;
        "Punjabi") FIREFOX_LANG="pa-IN" ;;
        "Romanian") FIREFOX_LANG="ro" ;;
        "Romansh") FIREFOX_LANG="rm" ;;
        "Russian") FIREFOX_LANG="ru" ;;
        "Sinhala") FIREFOX_LANG="si" ;;
        "Slovak") FIREFOX_LANG="sk" ;;
        "Slovenian") FIREFOX_LANG="sl" ;;
        "Spanish (Argentina)") FIREFOX_LANG="es-AR" ;;
        "Spanish (Chile)") FIREFOX_LANG="es-CL" ;;
        "Spanish (Mexico)") FIREFOX_LANG="es-MX" ;;
        "Spanish (Spain)") FIREFOX_LANG="es-ES" ;;
        "Swedish") FIREFOX_LANG="sv-SE" ;;
        "Telugu") FIREFOX_LANG="te" ;;
        "Thai") FIREFOX_LANG="th" ;;
        "Turkish") FIREFOX_LANG="tr" ;;
        "Ukrainian") FIREFOX_LANG="uk" ;;
        "Vietnamese") FIREFOX_LANG="vi" ;;
        "Welsh") FIREFOX_LANG="cy" ;;
        *) POL_Debug_Fatal "$APP_ANSWER : Incorrect value, bug." ;;
    esac

    # Detection de la derniere version
    cd "$POL_System_TmpDir"
    wget "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/" --output-document="FirefoxIndex.html"
    FIREFOX_FILE="$(sed -n 's#.*Firefox%20Setup%20[0-9.]*.exe">\(Firefox Setup [0-9.]*.exe\).*#\1#p' FirefoxIndex.html)"
    [ "$FIREFOX_FILE" = "" ] && POL_Debug_Fatal "Firefox version : detection failure. bug"

    # Pas de MD5, car le script detecte la derniere version automatiquement
    POL_Download "http://mirror3.mirrors.tds.net/pub/mozilla.org/firefox/releases/latest/win32/$FIREFOX_LANG/$FIREFOX_FILE"
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$FIREFOX_FILE"
    POL_Wine_WaitExit "$TITLE"
fi

if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$APP_ANSWER"
    POL_Wine_WaitExit "$TITLE"
fi

if [ -n "$POL_SELECTED_FILE" ]
then
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine "$POL_SELECTED_FILE"
    POL_Wine_WaitExit "$TITLE"
fi

AVAILABLE_PLUGINS="$PLUGIN_NAME_FLASH~$PLUGIN_NAME_SHOCKWAVE"

POL_SetupWindow_checkbox_list "$(eval_gettext 'Check which components do you want to install additionally:')" "$TITLE" "$AVAILABLE_PLUGINS" "~"
CHECKS="$APP_ANSWER"

cd "$POL_System_TmpDir"

# Flash Player
if is_checked "$PLUGIN_NAME_FLASH"; then
    POL_Call POL_Install_flashplayer
fi

# Shockwave Player
if is_checked "$PLUGIN_NAME_SHOCKWAVE"; then
    POL_Download "$PLUGIN_URL_SHOCKWAVE" ""
    POL_Wine_WaitBefore "$PLUGIN_NAME_SHOCKWAVE"
    Set_OS "win2k"
    POL_Wine "$PLUGIN_FILE_SHOCKWAVE"
    Set_OS "winxp"
    POL_Wine_WaitExit "$PLUGIN_NAME_SHOCKWAVE"
fi

# Disables plugin container (that makes Firefox crash on pages that already used flash/shockwave)
#echo "pref("dom.ipc.plugins.enabled", false);" > "$WINEPREFIX/drive_c/$PROGRAMFILES/Mozilla Firefox/defaults/pref/firefox.js"

POL_System_TmpDelete

POL_Shortcut "firefox.exe" "$TITLE"

POL_SetupWindow_Close

exit

Replies

Anonymous
Monday 18 August 2014 at 2:06
I get md5sum error when downloading additional package for flash player at end of installation, will this update fix that? Otherwise works great!