POL_Install_dotnet45

Informations

Creator Message
Ronin DUSETTE
Admin

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 451292
Wine: System

Feedbacks

Description

This function installs .NET 4.5. Please note that it does not work on 64-bit Virtual Drives. 

Source code

#!/usr/bin/env playonlinux-bash
# Date : (2015-06-4 12-30)
# Distribution used to test : Arch Linux, Cinnamon - 64-bit
# Author : RoninDusette
# Licence : GPLv3
# PlayOnLinux: 4.2.8
#
# Function to install .NET 4.5 through PlayOnLinux/PlayOnMac
#

# Checking wine arch
if [ "$POL_ARCH" == "amd64" ]; then
        POL_Debug_Fatal "$(eval_gettext 'This package does not work on a 64-bit installation')"
fi

local INSTALLER="dotnetfx45_full_x86_x64.exe"
local INSTALLER_MD5="d02dc8b69a702a47c083278938c4d2f1"
local INSTALLER_URL="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"

# Removing mono
POL_Call POL_Remove_winemono

# Removing some leftover stuff that conflict with the installation
POL_Wine --ignore-errors reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
rm "$WINEPREFIX/drive_c/windows/system32/mscoree.dll"

# Dependencies, overrides, and Windows version settings
POL_Call POL_Install_dotnet35
POL_Call POL_Install_dotnet40
Set_OS "win7"
POL_Wine_OverrideDLL "builtin" "fusion"

# Creating Temp directory
POL_Download_Resource "$INSTALLER_URL" "$INSTALLER_MD5" "dotnet45"

# Installing .NET 4.5
POL_Wine_WaitBefore ".NET Framework 4.5"
cd "$POL_USER_ROOT/ressources/dotnet45"
POL_Wine --ignore-errors "$INSTALLER" /q /c:"install.exe /q"

# More overrides
POL_Wine_OverrideDLL "builtin" "fusion"
Set_OS "win2003"

Contributions

Filters:

Contribute
Member Message
realsuamor Friday 25 August 2017 at 11:09
realsuamor Anonymous

Message

Issues for this script have been reported within the ticket #5572.

The originial ticket is about a download issue (workaround exists). The script does not install, however on 3.5 part due to a registry issue causing some kind of loop...

Workaround:

1) Make sure you are running on Windows-7 (unfortunately the default is still Windows XP) using winecfg

2) Make sure you have dotnet40 script succesfully run (you need to workaround the download problem, copy dotnet30 manually into your playonlinux ressources folder)

3) Download 4.5.1 (not the one from this script) installer. Offline Installer URL can be found on wine page:

https://appdb.winehq.org/objectManager.php?sClass=version&iId=25478

4) Install manually running a .exe for your wanted virtual drive (PlayOnLinux configuration tab misc).

Replies

petch Saturday 15 August 2015 at 13:15
petch
Developer

Information

This update has been approved by the team.

Message

explicitly test for 64bit (redundant as called scripts also test, but sort of documenting the incompatibility - and better crash early)
set variables as local to avoid collisions with calling script

do not set $TITLE (does not make sense in a "function" script)
download installer as resource so it's cached (and also avoid collisions with calling script's $POL_System_TmpDir)

 

Differences

@@ -8,13 +8,14 @@
 # Function to install .NET 4.5 through PlayOnLinux/PlayOnMac
 #
 
-TITLE=".NET 4.5"
-FUNCTION_NAME="dotnet45"
-INSTALLER="dotnetfx45_full_x86_x64.exe"
-INSTALLER_MD5="d02dc8b69a702a47c083278938c4d2f1"
-INSTALLER_URL="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"
-
-POL_Debug_Message "Installing $TITLE..."
+# Checking wine arch
+if [ "$POL_ARCH" == "amd64" ]; then
+        POL_Debug_Fatal "$(eval_gettext 'This package does not work on a 64-bit installation')"
+fi
+
+local INSTALLER="dotnetfx45_full_x86_x64.exe"
+local INSTALLER_MD5="d02dc8b69a702a47c083278938c4d2f1"
+local INSTALLER_URL="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"
 
 # Removing mono
 POL_Call POL_Remove_winemono
@@ -30,13 +31,12 @@
 POL_Wine_OverrideDLL "builtin" "fusion"
 
 # Creating Temp directory
-POL_System_TmpCreate "$FUNCTION_NAME"
-cd "$POL_System_TmpDir"
-POL_Download "$INSTALLER_URL" "$INSTALLER_MD5"
+POL_Download_Resource "$INSTALLER_URL" "$INSTALLER_MD5" "dotnet45"
 
 # Installing .NET 4.5
-POL_Wine_WaitBefore "$TITLE"
-POL_Wine --ignore-errors $INSTALLER /q /c:"install.exe /q"
+POL_Wine_WaitBefore ".NET Framework 4.5"
+cd "$POL_USER_ROOT/ressources/dotnet45"
+POL_Wine --ignore-errors "$INSTALLER" /q /c:"install.exe /q"
 
 # More overrides
 POL_Wine_OverrideDLL "builtin" "fusion"

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2015-06-4 12-30)
# Distribution used to test : Arch Linux, Cinnamon - 64-bit
# Author : RoninDusette
# Licence : GPLv3
# PlayOnLinux: 4.2.8
#
# Function to install .NET 4.5 through PlayOnLinux/PlayOnMac
#

# Checking wine arch
if [ "$POL_ARCH" == "amd64" ]; then
        POL_Debug_Fatal "$(eval_gettext 'This package does not work on a 64-bit installation')"
fi

local INSTALLER="dotnetfx45_full_x86_x64.exe"
local INSTALLER_MD5="d02dc8b69a702a47c083278938c4d2f1"
local INSTALLER_URL="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"

# Removing mono
POL_Call POL_Remove_winemono

# Removing some leftover stuff that conflict with the installation
POL_Wine --ignore-errors reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
rm "$WINEPREFIX/drive_c/windows/system32/mscoree.dll"

# Dependencies, overrides, and Windows version settings
POL_Call POL_Install_dotnet35
POL_Call POL_Install_dotnet40
Set_OS "win7"
POL_Wine_OverrideDLL "builtin" "fusion"

# Creating Temp directory
POL_Download_Resource "$INSTALLER_URL" "$INSTALLER_MD5" "dotnet45"

# Installing .NET 4.5
POL_Wine_WaitBefore ".NET Framework 4.5"
cd "$POL_USER_ROOT/ressources/dotnet45"
POL_Wine --ignore-errors "$INSTALLER" /q /c:"install.exe /q"

# More overrides
POL_Wine_OverrideDLL "builtin" "fusion"
Set_OS "win2003"

Replies

Edited by petch

Ronin DUSETTE Friday 5 June 2015 at 19:18
Ronin DUSETTE
Admin

Warning

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

Message

Switched to newer shell declaration

Differences

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env playonlinux-bash
 # Date : (2015-06-4 12-30)
 # Distribution used to test : Arch Linux, Cinnamon - 64-bit
 # Author : RoninDusette

New source code

#!/usr/bin/env playonlinux-bash
# Date : (2015-06-4 12-30)
# Distribution used to test : Arch Linux, Cinnamon - 64-bit
# Author : RoninDusette
# Licence : GPLv3
# PlayOnLinux: 4.2.8
#
# Function to install .NET 4.5 through PlayOnLinux/PlayOnMac
#

TITLE=".NET 4.5"
FUNCTION_NAME="dotnet45"
INSTALLER="dotnetfx45_full_x86_x64.exe"
INSTALLER_MD5="d02dc8b69a702a47c083278938c4d2f1"
INSTALLER_URL="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"

POL_Debug_Message "Installing $TITLE..."

# Removing mono
POL_Call POL_Remove_winemono

# Removing some leftover stuff that conflict with the installation
POL_Wine --ignore-errors reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
rm "$WINEPREFIX/drive_c/windows/system32/mscoree.dll"

# Dependencies, overrides, and Windows version settings
POL_Call POL_Install_dotnet35
POL_Call POL_Install_dotnet40
Set_OS "win7"
POL_Wine_OverrideDLL "builtin" "fusion"

# Creating Temp directory
POL_System_TmpCreate "$FUNCTION_NAME"
cd "$POL_System_TmpDir"
POL_Download "$INSTALLER_URL" "$INSTALLER_MD5"

# Installing .NET 4.5
POL_Wine_WaitBefore "$TITLE"
POL_Wine --ignore-errors $INSTALLER /q /c:"install.exe /q"

# More overrides
POL_Wine_OverrideDLL "builtin" "fusion"
Set_OS "win2003"

Replies

Friday 5 June 2015 at 19:48
Yeah; that works fine. Will make sure that I use this one for future scripts (I will likely update my other ones to reflect this change, as well.).
Anonymous
Sunday 28 June 2015 at 0:11
how did you download this pol? I don't see any download possibility...
Sunday 28 June 2015 at 0:14
It is in the "Install Components" tab.
Ronin DUSETTE Friday 5 June 2015 at 4:44
Ronin DUSETTE
Admin

Warning

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

Message

Wow. I am dumb. I forgot the shell declaration at the top. :\

Quick question; should even the functions have the 

#!/usr/bin/env playonlinux-bash

declaration instead? 

Differences

@@ -1,3 +1,4 @@
+#!/bin/bash
 # Date : (2015-06-4 12-30)
 # Distribution used to test : Arch Linux, Cinnamon - 64-bit
 # Author : RoninDusette

New source code

#!/bin/bash
# Date : (2015-06-4 12-30)
# Distribution used to test : Arch Linux, Cinnamon - 64-bit
# Author : RoninDusette
# Licence : GPLv3
# PlayOnLinux: 4.2.8
#
# Function to install .NET 4.5 through PlayOnLinux/PlayOnMac
#

TITLE=".NET 4.5"
FUNCTION_NAME="dotnet45"
INSTALLER="dotnetfx45_full_x86_x64.exe"
INSTALLER_MD5="d02dc8b69a702a47c083278938c4d2f1"
INSTALLER_URL="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"

POL_Debug_Message "Installing $TITLE..."

# Removing mono
POL_Call POL_Remove_winemono

# Removing some leftover stuff that conflict with the installation
POL_Wine --ignore-errors reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
rm "$WINEPREFIX/drive_c/windows/system32/mscoree.dll"

# Dependencies, overrides, and Windows version settings
POL_Call POL_Install_dotnet35
POL_Call POL_Install_dotnet40
Set_OS "win7"
POL_Wine_OverrideDLL "builtin" "fusion"

# Creating Temp directory
POL_System_TmpCreate "$FUNCTION_NAME"
cd "$POL_System_TmpDir"
POL_Download "$INSTALLER_URL" "$INSTALLER_MD5"

# Installing .NET 4.5
POL_Wine_WaitBefore "$TITLE"
POL_Wine --ignore-errors $INSTALLER /q /c:"install.exe /q"

# More overrides
POL_Wine_OverrideDLL "builtin" "fusion"
Set_OS "win2003"

Replies

Ronin DUSETTE Thursday 4 June 2015 at 20:47
Ronin DUSETTE
Admin

Warning

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

Message

Initial commit.

Differences

@@ -0,0 +1,42 @@
+# Date : (2015-06-4 12-30)
+# Distribution used to test : Arch Linux, Cinnamon - 64-bit
+# Author : RoninDusette
+# Licence : GPLv3
+# PlayOnLinux: 4.2.8
+#
+# Function to install .NET 4.5 through PlayOnLinux/PlayOnMac
+#
+
+TITLE=".NET 4.5"
+FUNCTION_NAME="dotnet45"
+INSTALLER="dotnetfx45_full_x86_x64.exe"
+INSTALLER_MD5="d02dc8b69a702a47c083278938c4d2f1"
+INSTALLER_URL="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"
+
+POL_Debug_Message "Installing $TITLE..."
+
+# Removing mono
+POL_Call POL_Remove_winemono
+
+# Removing some leftover stuff that conflict with the installation
+POL_Wine --ignore-errors reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
+rm "$WINEPREFIX/drive_c/windows/system32/mscoree.dll"
+
+# Dependencies, overrides, and Windows version settings
+POL_Call POL_Install_dotnet35
+POL_Call POL_Install_dotnet40
+Set_OS "win7"
+POL_Wine_OverrideDLL "builtin" "fusion"
+
+# Creating Temp directory
+POL_System_TmpCreate "$FUNCTION_NAME"
+cd "$POL_System_TmpDir"
+POL_Download "$INSTALLER_URL" "$INSTALLER_MD5"
+
+# Installing .NET 4.5
+POL_Wine_WaitBefore "$TITLE"
+POL_Wine --ignore-errors $INSTALLER /q /c:"install.exe /q"
+
+# More overrides
+POL_Wine_OverrideDLL "builtin" "fusion"
+Set_OS "win2003"
\ No newline at end of file

New source code

# Date : (2015-06-4 12-30)
# Distribution used to test : Arch Linux, Cinnamon - 64-bit
# Author : RoninDusette
# Licence : GPLv3
# PlayOnLinux: 4.2.8
#
# Function to install .NET 4.5 through PlayOnLinux/PlayOnMac
#

TITLE=".NET 4.5"
FUNCTION_NAME="dotnet45"
INSTALLER="dotnetfx45_full_x86_x64.exe"
INSTALLER_MD5="d02dc8b69a702a47c083278938c4d2f1"
INSTALLER_URL="http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe"

POL_Debug_Message "Installing $TITLE..."

# Removing mono
POL_Call POL_Remove_winemono

# Removing some leftover stuff that conflict with the installation
POL_Wine --ignore-errors reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
rm "$WINEPREFIX/drive_c/windows/system32/mscoree.dll"

# Dependencies, overrides, and Windows version settings
POL_Call POL_Install_dotnet35
POL_Call POL_Install_dotnet40
Set_OS "win7"
POL_Wine_OverrideDLL "builtin" "fusion"

# Creating Temp directory
POL_System_TmpCreate "$FUNCTION_NAME"
cd "$POL_System_TmpDir"
POL_Download "$INSTALLER_URL" "$INSTALLER_MD5"

# Installing .NET 4.5
POL_Wine_WaitBefore "$TITLE"
POL_Wine --ignore-errors $INSTALLER /q /c:"install.exe /q"

# More overrides
POL_Wine_OverrideDLL "builtin" "fusion"
Set_OS "win2003"

Replies