POL_Install_vcrun2008

Informations

Creator Message
Berillions

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 3127107
Wine: System

Feedbacks

Description

Install VC Runtime 2008 SP1

Source code

#!/bin/bash
# PlayOnLinux Function
# Date : (2010-08-02 21-00)
# Last revision : (2013-01-22 16:47)
# Author : Berillions
# Updated by : GNU_Raziel
# Only For : http://www.playonlinux.com

# [petch] (2013-01-22 16:47)
#   Fixing bug #1787

FORCE_MODE=$1

# Installing x64 version
if [ "$POL_ARCH" = "amd64" ]; then
        if [ "$POL_LANG" = "fr" ]; then
                # Downloading vcrun2008 sp1 x64 FR
                POL_Download_Resource "http://download.microsoft.com/download/b/d/5/bd57058a-d6b4-40d6-9e31-35777dd48820/vcredist_x64.exe" "07d49f9e30cb89c59ad7ee3e8d77f728" "vcrun2008"
        else
                # Downloading vcrun2008 sp1 x64 EN
                POL_Download_Resource "http://download.microsoft.com/download/2/d/6/2d61c766-107b-409d-8fba-c39e61ca08e8/vcredist_x64.exe" "40395c175553cb14d2050888efccdf00" "vcrun2008"
        fi
fi

if [ "$POL_LANG" = "fr" ]; then
        # Downloading vcrun2008 sp1 x86 FR
        POL_Download_Resource "http://download.microsoft.com/download/9/e/d/9edd8390-011b-4c6d-9806-d8dc2b10c0fb/vcredist_x86.exe" "78aef6702218c2525ae5d88d6e45fc1c" "vcrun2008"
else
        # Downloading vcrun2008 sp1 x86 EN
        POL_Download_Resource "http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe" "5689d43c3b201dd3810fa3bba4a6476a" "vcrun2008"
fi

# Check if vcrun2008 is already installed
CHECK_VC2K8=`find $WINEPREFIX -name "msdia90.dll"`
if [ "$CHECK_VC2K8" = "" -o "$FORCE_MODE" == "--force" ]; then
        if [ "$CHECK_VC2K8" != "" ]; then
                POL_SetupWindow_message "$(eval_gettext 'Warning : vcrun2008 seems to be already installed.\nForcing reinstallation.')" "$TITLE"
        fi

        # Fix before install for wine 1.3.37 and older
        POL_AdvisedVersion  4.0.16 || POL_Debug_Error "$(eval_gettext 'VCRun2008 might fail to install because your PlayOnLinux version is too old. Please update.')"
        if VersionLower $(POL_Config_PrefixRead VERSION) 1.3.37; then
                POL_Call POL_Install_msxml3
                ln -s "$WINEPREFIX/drive_c" "$WINEPREFIX/harddiskvolume0"
                rm -f "$WINEPREFIX/dosdevices/c:"
                ln -s "$WINEPREFIX/harddiskvolume0" "$WINEPREFIX/dosdevices/c:"
        fi

        cd "$POL_USER_ROOT/ressources/vcrun2008"

        # Installing vcrun2008 sp1
        if [ "$POL_ARCH" = "amd64" ]; then
                rm "$WINEPREFIX/drive_c/windows/syswow64/msvcp90.dll"
                rm "$WINEPREFIX/drive_c/windows/system32/msvcp90.dll"
                POL_Wine start /unix "vcredist_x64.exe" /q
                POL_Wine_WaitExit "vcrun2008 sp1 x64"
                POL_Wine start /unix "vcredist_x86.exe" /q
                POL_Wine_WaitExit "vcrun2008 sp1 x86"
        else
                rm "$WINEPREFIX/drive_c/windows/system32/msvcp90.dll"
                POL_Wine start /unix "vcredist_x86.exe" /q
                POL_Wine_WaitExit "vcrun2008 sp1 x86"
        fi

        # Overriding dll
        POL_Wine_OverrideDLL "native,builtin" "msvcr90"
fi

Contributions

Filters:

Contribute
Member Message
petch Sunday 26 April 2015 at 16:52
petch
Developer

Message

        if VersionLower $(POL_Config_PrefixRead VERSION) 1.3.37; then

test fails with "System" Wine version

 

 

Replies