The forum

[Script] dotnet35

Author Replies
xplicit Friday 10 January 2014 at 22:39
xplicitAnonymous

Here the modification of dotnet35 installation script. Current version does not allow to install dotnet35 on the wine with version higher than 1.5.21. That's due to bug
http://code.google.com/p/winetricks/issues/detail?id=311

I've used the same solution was used for winetricks - for higher version of wine install native msxml3 package.

http://code.google.com/p/winetricks/source/diff?spec=svn1013&r=1013&format=side&path=/trunk/src/winetricks

So the code change just the following: istead of failure after version checking we install msxml3 package.

By the way I found an issue that current msxml3 installer does not install msxml3.dll correctly. "POL_Wine msiexec /i msxml3.msi /q" command creates zero-byte msxml3.dll in system32 directory. As a workaround I removed "/q" option and after that msxml3 installed correctly.

I tested dotnet35 installation on the following version of wine: 1.5.21, 1.5.28, 1.6, 1.7.6. You can check script for other versions.

Here are the test case for dotnet35 package:
1. Start installation of dotnet35
2. Check that no errors occured during installation
3. Check that c:/windows/Microsoft.Net/Framework/v3.5 directory exists
4. Run c:/windows/Microsoft.Net/Framework/v3.5/msbuild.exe from command line. It should run without crashes or exceptions and print to console: "MSBUILD: error MSB1003: Specify a project or solution file."

Test-case for msxml3
1. Start installation of msxml3
2. Check that file c:/windows/system32/msxml3.dll is not zero-length

You'll probably should also check msxml4 and other msxml packages for zero-length msxml?.dll - I did not check them.

#!/bin/bash
# PlayOnLinux Function
# Date : (2011-03-17 21:00)
# Last revision : (2013-04-12 21:00)
# Author : GNU_Raziel
# Only For : http://www.playonmac.com
 
# Checking wine arch
if [ "$POL_ARCH" == "amd64" ]; then
        POL_Debug_Fatal "$(eval_gettext 'This package does not work on a 64-bit installation')"
fi
 
# Remove wine-mono if present
POL_Wine uninstaller --remove '{E45D8920-A758-4088-B6C6-31DBB276992E}' || true
 
# Install dotnet30sp1 if needed
if [ ! -e "$WINEPREFIX/drive_c/windows/system32/XpsFilt.dll" ]; then
        POL_Call POL_Install_dotnet30sp1
fi

# Workaround the bug http://code.google.com/p/winetricks/issues/detail?id=311
if ! (VersionLower $(POL_Config_PrefixRead VERSION) 1.5.21); then
        POL_Call POL_Install_msxml3
fi
 
# Ignore errors message
if VersionLower $(POL_Config_PrefixRead VERSION) 1.4.2; then
        POL_SetupWindow_message "$(eval_gettext 'If you see error messages during DotNet 3.5 installation, you can ignore them without issues')" "$TITLE"
fi
 
# Setting OS check Fix
Set_OS "winxp" "sp3"
cat << EOF > "dotnet35_fix.reg"
[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion]
"ProductName"="Microsoft Windows XP"
"CSDVersion"="Service Pack 3"
"CurrentVersion"="5.3"
"CurrentBuildNumber"="2600"
[HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Windows]
"CSDVersion"=dword:00000300
EOF
POL_Wine regedit "dotnet35_fix.reg"
 
mkdir -p "$POL_USER_ROOT/ressources/dotnet35"
cd "$POL_USER_ROOT/ressources/dotnet35"
# Downloading dotnet35
POL_Download_Resource "http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe" "d1b341c1bc8b96e4898450c9881b1425" "dotnet35"
 
# Setting Fix 1
POL_Wine --ignore-errors reg delete "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5"
WINEDLLOVERRIDES="ngen.exe,regsvcs.exe,mscorsvw.exe=b"
export WINEDLLOVERRIDES
wineserver -k
 
# Installing dotnet35
cabextract -d "$WINEPREFIX/drive_c/windows/temp/" -L -F '*' dotnetfx35.exe
cd "$WINEPREFIX/drive_c/windows/temp/wcu/dotnetframework/dotnetfx35/x86/"
cabextract -d . -L -F '*' netfx35_x86.exe
POL_Wine_WaitBefore ".NET Framework 3.5"
POL_Wine --ignore-errors msiexec /i vs_setup.msi ADDEPLOY=1
POL_Wine_WaitExit ".NET Framework 3.5"
unset WINEDLLOVERRIDES
wineserver -k
rm -rf "$WINEPREFIX"/drive_c/windows/temp/*


#!/bin/bash
# PlayOnLinux Function
# Date : (2009-11-19 21-50)
# Last revision : (2013-01-22 16:00)
# Author : Berillions, Tinou
# Updated by : GNU_Raziel
# Only For : http://www.playonmac.com
 
# [Quentin PÂRIS] (2012-04-29 13:02)
#   Fixing bug #820
# [petch] (2013-01-22 16:00)
#   Fixing bug #1787
 
FORCE_MODE=$1
 
POL_Download_Resource "http://repository.playonlinux.com/divers/msxml3.msi" "7049c6531837341363fe69d068d001b0" "msxml3"
 
# Check if msxml3 is already installed
CHECK_MSXML3=`find $WINEPREFIX -name "msxml3r.dll"`
if [ "$CHECK_MSXML3" = "" -o "$FORCE_MODE" = "--force" ]; then
        # Installing msxml3
        if [ "$POL_ARCH" = "amd64" ]; then
                rm "$WINEPREFIX/drive_c/windows/syswow64/msxml3.dll"
                rm "$WINEPREFIX/drive_c/windows/system32/msxml3.dll"
        else
                rm "$WINEPREFIX/drive_c/windows/system32/msxml3.dll"
        fi
        cd "$POL_USER_ROOT/ressources/msxml3/"
        #removed /q argument due to issue with zero-length msxml3.dll installation
        POL_Wine msiexec /i msxml3.msi
        POL_Wine_WaitExit "msxml3"
 
        # Overriding dll
        POL_Wine_OverrideDLL "native,builtin" "msxml3"
fi






Edited by xplicit

petch Saturday 11 January 2014 at 0:47
petch
Developer

POL_Install_msxml3 seems to be fixed by setting the dll override before installation (rather than after)
POL_Install_dotnet35 updated with your code

Thanks!

Edited by petch