programs icon indicating copy to clipboard operation
programs copied to clipboard

[Feature Request] Microsoft Office

Open AsciiWolf opened this issue 3 years ago • 35 comments

Microsoft Office is still the best office suite out there, but sadly lacks a native Linux support. However, it should work quite well in Wine nowadays, at least the 365 version. Please, consider adding a community installer for this.

AsciiWolf avatar Feb 14 '22 13:02 AsciiWolf

Seems like there is no public link for trial/demo/activable. We will implement local executable selection for this.

mirkobrombin avatar Feb 14 '22 14:02 mirkobrombin

Oops, the offline installer download page apparently requires login with Microsoft account. I did not know that, sorry.

AsciiWolf avatar Feb 14 '22 19:02 AsciiWolf

I've found these links from official Microsoft website:

! Package Link
Office 365 Home Premium https://officecdn.microsoft.com/db/492350F6-3A01-4F97-B9C0-C7C6DDF67D60/media/it-IT/O365HomePremRetail.img
Office 365 Business https://officecdn.microsoft.com/db/492350F6-3A01-4F97-B9C0-C7C6DDF67D60/media/it-IT/O365BusinessRetail.img
Office 365 Professional Plus https://officecdn.microsoft.com/db/492350F6-3A01-4F97-B9C0-C7C6DDF67D60/media/it-IT/O365ProPlusRetail.img
Office 2021 Home and Student https://officecdn.microsoft.com/db/492350F6-3A01-4F97-B9C0-C7C6DDF67D60/media/it-IT/HomeStudent2021Retail.img
Office 2021 Home and Business https://officecdn.microsoft.com/db/492350F6-3A01-4F97-B9C0-C7C6DDF67D60/media/it-IT/HomeBusiness2021Retail.img
Office 2021 Professional https://officecdn.microsoft.com/db/492350F6-3A01-4F97-B9C0-C7C6DDF67D60/media/it-IT/Professional2021Retail.img
Office 2021 Professional Plus https://officecdn.microsoft.com/db/492350F6-3A01-4F97-B9C0-C7C6DDF67D60/media/it-IT/ProPlus2021Retail.img

mirkobrombin avatar Feb 14 '22 19:02 mirkobrombin

Nice! Just make sure to replace it-IT with the correct locale. The rest of the link seems to be the same for all locales. :-)

AsciiWolf avatar Feb 14 '22 19:02 AsciiWolf

Nice! Just make sure to replace it-IT with the correct locale. The rest of the link seems to be the same for all locales. :-)

Nice, btw I have no time to build an installer. I'll wait for other maintainers.

mirkobrombin avatar Feb 14 '22 19:02 mirkobrombin

I've found these links from official Microsoft website

Were you also able to find the "OfficeSetup.exe" installer links? It probably is on the same cdn server (just in a different directory). I have tried searching for it, but no luck.

AsciiWolf avatar Feb 16 '22 14:02 AsciiWolf

I've found these links from official Microsoft website

Were you also able to find the "OfficeSetup.exe" installer links? It probably is on the same cdn server (just in a different directory). I have tried searching for it, but no luck.

It seems that unfortunately that is not available but it is inside the dmg files I’ve linked 😄

mirkobrombin avatar Feb 16 '22 14:02 mirkobrombin

There are some problem with this. At the moment office works only with crossover, a partially fork of wine made by it's major sponsor. I'm trying to see if it would be possible create a script to compile this fork (it is foss, but the rest of the program is not) to use it with office... I'm too seeing if it is possible to upload the runner to bottles

tiziodcaio avatar Apr 16 '22 16:04 tiziodcaio

We already have wine-cx fork, named vaniglia-cx

mirkobrombin avatar Apr 16 '22 17:04 mirkobrombin

Oh ok ^^

tiziodcaio avatar Apr 16 '22 18:04 tiziodcaio

Hi all, any progress here ? :)

RoiArthurB avatar Aug 18 '22 08:08 RoiArthurB

According to crossover the dependencies needed are:

  • allfonts
  • mono
  • msls31
  • msxml6
  • msftedit
  • riched20 (I think it installs with msftedit)
  • some kind of html engine (crossover has "CrossOver HTML engine") -> maybe gecko?
  • some kind of math font (crossover has "Asana-Math Font")

Also you need:

  • gdiplus
  • Windows 7 (installer tries to run an unimplemented function on Windows 10)

1nikolas avatar Aug 18 '22 11:08 1nikolas

Hi, thanks for your indication. I just tried to installed it from the Setup.exe from img @mirkobrombin linked previously.

I Installed pretty much everything you pointed at (except the math font not available in bottles) :

Screenshot from 2022-08-18 22-21-54

And it failed first with W7 as the installer detected it and requires W10, so I switched to this version and failed with this log :

22:16:19 (INFO) Launching an executable… 
22:16:19 (INFO) Setting Key: [Latest_Executables] to [[{'name': 'Setup.exe', 'file': '/home/roiarthurb/.local/share/bottles/bottles/Offices/drive_c/users/roiarthurb/Downloads/Setup.exe', 'args': ''}, {'name': 'Setup.exe', 'file': '/home/roiarthurb/.local/share/bottles/bottles/Offices/drive_c/users/roiarthurb/Downloads/Setup.exe', 'args': ''}]] for bottle: [Offices]… 
22:16:23 (INFO) Using Bottles runtime 
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).

(bottles:207602): Gtk-WARNING **: 22:16:25.866: Attempting to add a widget with type HdyActionRow to a container of type HdyPreferencesGroup, but the widget is already inside a container of type GtkListBox, please remove the widget from its existing container first.
0118:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0118:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0124:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"
0124:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"
014c:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Networking.Connectivity.NetworkInformation"
0114:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Security.Authentication.OnlineId.OnlineIdSystemAuthenticator"
0160:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
0160:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0180:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"
0180:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"
0198:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Networking.Connectivity.NetworkInformation"
0114:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"
0114:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"
0114:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"

RoiArthurB avatar Aug 18 '22 15:08 RoiArthurB

I was trying to get it working before but I gave up for now. Didn't get it to install but I did get it to run the setup (the one from office.com) using Windows 7. But then the installer kept getting stuck at 50% so something else is missing.. The reason you can't install this on W7 is probably because the online setup from office.com is downloading an older version compatible with W7 and the latest one isn't supported

1nikolas avatar Aug 18 '22 15:08 1nikolas

Surprising how this tutorial seemed to did easily succeed it... https://ruados.github.io/articles/2021-05/office365-wine

RoiArthurB avatar Aug 18 '22 15:08 RoiArthurB

I think it has to do that they use 32bit wine which is more stable (or used to be at least)

1nikolas avatar Aug 18 '22 16:08 1nikolas

I tried it all on 32bits without any success... 😅😅

RoiArthurB avatar Aug 18 '22 16:08 RoiArthurB

I was trying to get it working before but I gave up for now. Didn't get it to install but I did get it to run the setup (the one from office.com) using Windows 7. But then the installer kept getting stuck at 50% so something else is missing.. The reason you can't install this on W7 is probably because the online setup from office.com is downloading an older version compatible with W7 and the latest one isn't supported

I tried this one also and had the same Issue stucking at ca. 50% and don't move further. As other mentioned you find in the internet some articles that say it works but it didn't worked for me, maybe they are just to old and something broke since then.

616b2f avatar Aug 19 '22 06:08 616b2f

Thank you for merging my issue with this one. Now, what is the next step please ? I see no news in the forum and neither on my issue nor this one. Is there a progress or idea for solving this ? do you need more test from our side to help you ?

prog-amateur2 avatar Sep 28 '22 14:09 prog-amateur2

I could progress further after using sys-wine-7.0.1 as the executor and downloading the following dependencies in the parameters (I am not sure if some of them where necessary) :

  • arial32
  • times32
  • courie32
  • msftedit
  • riched20
  • vburun6
  • andale32
  • arialb32
  • comic32
  • georgi32
  • impact32
  • tahoma32
  • trebuc32
  • verdan32
  • webdin32
  • allfonts
  • unifont
  • vcredist2015
  • msxml4
  • mono
  • msls31
  • mscaptcha
  • lavfilters741
  • gdiplus
  • dotnetcoredesktop3
  • dsdmo
  • dotnet40
  • dotnet48
  • art2k7min

Now with all the above, I can go further in the installation (compared to the black screen in the past), however the below window pop up appears : Capture d’écran du 2023-01-15 18-03-24

For your information, this is still with an official Windows Office 2016 setup.exe program (coming from the iso file).

Question :

  1. Do you know the reason of this error code (for example "no internet connection" preventing the installation, etc.) ? Based on Microsoft's website, error code 30175-4 can be due to Firewall/antivirus. So they shall be disabled before the installation.
  2. Do you know how to workaround in order to go further (is there an option in bottles about disabling firewall/Windows Defender, etc.) ?

Thank you.

prog-amateur2 avatar Jan 15 '23 17:01 prog-amateur2

There aren't any implementation of firewall or windows defender on wine thought

tiziodcaio avatar Jan 15 '23 22:01 tiziodcaio

I think it has to do that they use 32bit wine which is more stable (or used to be at least)

Wine on bottles AFAIK it's packaged without 32 bit libs, and its dependencies too are 64 bit only, so the funcionalities that aren't implemented with 32-on-64 they might not work I think... But hopefully we are going in the right direction...

tiziodcaio avatar Jan 15 '23 23:01 tiziodcaio

Looking around, I found someone who was able to run Office on Wine, however, it required the following commands:

WINEARCH=win32 WINEPREFIX=$HOME/.wine32_off16 wine winecfg -v win7
WINEARCH=win32 WINEPREFIX=$HOME/.wine32_off16 winetricks riched20 gdiplus msxml6 mspatcha riched30 dotnet20 dotnet40 mfc100 corefonts -q
WINEARCH=win32 WINEPREFIX=$HOME/.wine32_off16 winecfg
WINEARCH=win32 WINEPREFIX=$HOME/.wine32_off16 wine ~/Downloads/Office_2016-32/setup.exe & sleep 3 && cpulimit -l 10 -p $(pgrep -i setup.exe)

He also explains that to resolve black screens, you need the following libraries:

Before installation, winetricks and cpulimit were installed. This last was for solving installation error on quick processors. For removing black windows problems, 32 bits version of libxcomposite libxinerama are necessary:

  • For Arch, install : lib32-libxcomposite lib32-libxinerama
  • For Debian based, install: libxcomposite:i386 libxinerama:i386

Question

  1. How to run such commands on Bottles?
  2. Can we download these 32 bits libraries via Bottles? (I have the flatpak version)

This could be a very interesting track to follow to overcome our problem.

Thank you!

prog-amateur2 avatar Jan 16 '23 20:01 prog-amateur2

How to run such commands on Bottles?

Most can be done through the gui

Can we download these 32 bits libraries via Bottles? (I have the flatpak version)

Problem is, bottles doesn't support 32bit wine. You can install a 32bit wine version using a custom runner but all the libraries are for 64bit. So they need to fix that first before discussing about an install script (which would automate all this)

1nikolas avatar Jan 16 '23 20:01 1nikolas

Wine 8.0 released!

tiziodcaio avatar Jan 29 '23 23:01 tiziodcaio

Wine 8.0 released!

Hello, I saw it : does it mean Bottles could support 32bits wine and 32bits libraries ? thank you very much !

prog-amateur2 avatar Jan 31 '23 23:01 prog-amateur2

Wine 8.0 released!

Hello, I saw it : does it mean Bottles could support 32bits wine and 32bits libraries ? thank you very much !

This is not related to the wine version. They can do it whenever they want, they just haven't done it yet

1nikolas avatar Jan 31 '23 23:01 1nikolas

+1 for this request Microsoft Office is the one and only Windows program that I really have to use. It's partially supported by Wine, PlayonLinux and Crossover so it should be possible to get an installer for Bottles hopefully.

I would suggest the following installers/recipes:

  1. Office 2016 Home & Student (i.e. Word/Excel/Powerpoint only), as this is the latest version that reportedly runs well in Wine. This should be relatively "easy", as for example PlayonLinux and Crossover support it.
  2. Office 2021 Home & Student (i.e. Word/Excel/Powerpoint only), as this is the latest one-time purchase version of Office. This might be more difficult as Wine doesn't seem to support it (although it might just lack a report/enough testers, as I don't see how it would be any more difficult than 365 than has some support?)
  3. Office 365 (which would also include Onenote, Outlook and Onedrive) as this is the version that most business use and that every Onedrive subscriber gets "for free". 365 is already partially supported in Wine (at least Word/Excel/Powerpoint) but it's a moving target (rolling release) so it might break after a while unlike e.g. 2021.

eylenburg avatar Feb 16 '23 11:02 eylenburg

Please, less "+1"s and more pull requests :)

jannuary avatar Feb 16 '23 13:02 jannuary

Okay, so I haven't managed to get Office 2016 (Home & Student) to work in Bottles, but I did manage with a custom PlayOnLinux setup (largely based on these steps: https://askubuntu.com/questions/975104/how-do-i-install-ms-office-2016-on-playonlinux). Importing this PlayonLinux drive into Bottles failed for me, so for example the 32-bit Windows 7 in PlayOnLinux became a 64-bit Windows 10 bottle for some reason.

Would anyone be interested in "translating" this into an installer for Bottles?

This is what I did to get Office 2016 to run:

  1. download Office 2016 Home & Student offline installer (~4 GB .img file) from Microsoft Account website
  2. mount or extract .img file
  3. run "dpkg --add-architecture i386" (this was on Ubuntu), then install the packages wine:i386, smbclient, winbind, and playonlinux from repositories
  4. install dotnet45 with winetricks
  5. create virtual drive with 32-bit Windows and Wine 4.15 in PlayOnLinux, install Mono when asked
  6. install the dependencies msxml6 and riched20
  7. in registry, create new key HKEY_CURRENT_User/Software/Wine/Direct2D and add new DWORD Value named max_version_factory with value 0
  8. make sure that the Windows version is set to Windows 7 (was the default setting for me)
  9. run the Setup32.exe found in the Office folder of the .img file
  10. installer runs, with a small tray icon showing the percentage, and will show a short message when installation is finished; note that the installer window won't close on its own so I had to go to Tools -> Close all PlayOnLinux software
  11. copy AppvIsvSubsystems32.dll and C2R32.dll from drive_c/Program Files/Common Files/Microsoft Shared/ClickToRun/ to drive_c/Program Files/Microsoft Office/root/Office16/
  12. create the desktop files for EXCEL.EXE, POWERPNT.EXE and WINWORD.EXE
  13. start one of them, when it asks for an activation key you have to use the one you can find on the Microsoft Account website at the same place where you downloaded the .img file - note that logging in to the Microsoft account from within Office either didn't load or crashed the application, so you won't be able to log in (for Onedrive etc) but Office still says that it's activated
  14. last step would be adding file associations for doc/docs, xls/xlsx, ppt/pptx

eylenburg avatar Mar 29 '23 15:03 eylenburg