The forum

[Script] Microsoft Teams

Author Replies
Dadu042 Wednesday 27 March 2019 at 14:26
Dadu042

This script currently (2019-03-27) does not work : installation fail.  I post it hoping that someone can improve it.

Currently (march 2019) MS Teams is known as incompatible with Linux. 

 

Useful to read :

Microsoft Teams On Linux, What’s the Story? (2018)

https://www.codeweavers.com/compatibility/crossover/forum/microsoft-teams

Native Linux client? (2016)

https://appdb.winehq.org (test reports)

 

#!/bin/bash
# Date : (2019-03-27 13-34)
# Last revision : (2019-03-27 13-34)
# Wine version used : 4.4
# Distribution used to test : Ubuntu 18.04 x64
# Script licence : GPL3
# Program licence : Retail
# Playonlinux : 4.3.4
#
# Script inspired from https://www.playonlinux.com/en/app-2665-Microsoft_Office_2013.html
#
# Team files downloaded from: https://products.office.com/fr-fr/microsoft-teams/
# Tested (fail) : Teams_windows.exe downloaded on 2019-03-27 (md5sum: 00d09964f9b75470589f355975e5ca18)
# Not tested : Teams_windows_x64.exe downloaded on 2019-03-27 (md5sum: 15323dbb2ed6387147b71c3868fbe38d)

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
PREFIX="ms_teams_2019"
WINEVERSION="4.4"
TITLE="Microsoft Teams (32 bits for Windows 7+)"
  
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/Office/top.jpg" "http://files.playonlinux.com/resources/setups/Office/left.png" "$TITLE"
  
POL_SetupWindow_Init

POL_SetupWindow_presentation "$TITLE" "Microsoft" "http://www.microsoft.com" "Dadu042" "$PREFIX"

POL_RequiredVersion 4.0 || POL_Debug_Fatal "$TITLE won't work with $APPLICATION_TITLE $VERSION\nPlease update"

# Disabled until Team installation work with POL.
# if [ "$POL_OS" = "Linux" ]; then
#         wbinfo -V || POL_Debug_Fatal "Please install winbind before installing $TITLE"
# fi

POL_Debug_Init
POL_System_SetArch "x86"

# Ok but meet 'Admin bug'
POL_Call POL_Install_mono210

# Ok but meet 'Admin bug'
# POL_Call POL_Install_dotnet40

# Installation never end :
# POL_Call POL_Install_dotnet461

# The error message that I name the 'Admin bug' (32b, Wine 4.0 and 4.4):
# "Installation has failed.
# Please re-run this installer as a normal user instead of "Run as Administrator". <Close>
# This is a known issue on Wine: https://bugs.winehq.org/show_bug.cgi?id=40613

POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
SetupIs="$APP_ANSWER"
  
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"
 
Set_OS "win7"
 
if [ "$POL_OS" = "Mac" ]; then
    # Samba support
    POL_Call POL_GetTool_samba3
    source "$POL_USER_ROOT/tools/samba3/init"
fi

  
POL_Wine_WaitBefore "$TITLE"
[ "$CDROM" ] && cd "$CDROM"
  
if [ ! "$(file $SetupIs | grep 'x86-64')" = "" ]; then
    POL_Debug_Fatal "$(eval_gettext "The 64bits version is not compatible! Sorry")";
fi
POL_Wine "$SetupIs"
POL_Wine_WaitExit "$TITLE"
  
# See http://forum.winehq.org/viewtopic.php?f=8&t=23126&p=95555#p95555
POL_Wine_OverrideDLL "native,builtin" "riched20"
  
# Fix a (office 2013) crash when loading a file
# POL_Call POL_Install_msxml6
  
POL_Shortcut "Teams.exe" "Microsoft Teams" "" "" "Network;InstantMessaging;" # No category for collaborative work?

if [ "$POL_OS" = "Mac" ]; then
    POL_Shortcut_InsertBeforeWine "Microsoft Teams" "source \"$POL_USER_ROOT/tools/samba3/init\""
fi
  
POL_SetupWindow_message "$(eval_gettext '$TITLE has been installed successfully\n\nIf an installation Windows prevent your programs from running, you must remove and reinstall $TITLE')" "$TITLE"
POL_SetupWindow_Close
exit

Edited by Dadu042

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