Bug 106931 - LibreOffice 5.3 installer doesn't honor UI_LANGS property
Summary: LibreOffice 5.3 installer doesn't honor UI_LANGS property
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords: needsDevAdvice
: 108646 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-03 18:28 UTC by Eugene Kin
Modified: 2017-10-02 05:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the test installer (74.11 KB, image/png)
2017-07-24 06:42 UTC, Gabor Kelemen
Details
Screenshot of the test installer and the script used to launch it. (176.61 KB, image/png)
2017-07-28 11:08 UTC, Gabor Kelemen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kin 2017-04-03 18:28:01 UTC
msiexec /i %1 /quiet /norestart /log "%LOG%" ^
UI_LANGS=en_US,ru REGISTER_ALL_MSO_TYPES=1 ISCHECKFORPRODUCTUPDATES=0 RebootYesNo=No QUICKSTART=0 ADDLOCAL=ALL ^
REMOVE=gm_o_Onlineupdate,gm_o_Quickstart,gm_o_Activexcontrol,^
gm_r_ex_Dictionary_Af,gm_r_ex_Dictionary_An,gm_r_ex_Dictionary_Ar,gm_r_ex_Dictionary_Be,gm_r_ex_Dictionary_Bg,^
gm_r_ex_Dictionary_Bn,gm_r_ex_Dictionary_Br,gm_r_ex_Dictionary_Bs,gm_r_ex_Dictionary_Ca,^
gm_r_ex_Dictionary_Cs,gm_r_ex_Dictionary_Da,gm_r_ex_Dictionary_De,gm_r_ex_Dictionary_El,gm_r_ex_Dictionary_Es,^
gm_r_ex_Dictionary_Et,gm_r_ex_Dictionary_Fr,gm_r_ex_Dictionary_Gd,gm_r_ex_Dictionary_Gl,gm_r_ex_Dictionary_Gu,^
gm_r_ex_Dictionary_He,gm_r_ex_Dictionary_Hi,gm_r_ex_Dictionary_Hr,gm_r_ex_Dictionary_Hu,gm_r_ex_Dictionary_Is,^
gm_r_ex_Dictionary_It,gm_r_ex_Dictionary_Lo,gm_r_ex_Dictionary_Lt,gm_r_ex_Dictionary_Lv,gm_r_ex_Dictionary_Ne,^
gm_r_ex_Dictionary_Nl,gm_r_ex_Dictionary_No,gm_r_ex_Dictionary_Oc,gm_r_ex_Dictionary_Pl,gm_r_ex_Dictionary_Pt_Br,^
gm_r_ex_Dictionary_Pt_Pt,gm_r_ex_Dictionary_Ro,gm_r_ex_Dictionary_Si,gm_r_ex_Dictionary_Sk,gm_r_ex_Dictionary_Sl,^
gm_r_ex_Dictionary_Sr,gm_r_ex_Dictionary_Sv,gm_r_ex_Dictionary_Te,gm_r_ex_Dictionary_Th,gm_r_ex_Dictionary_Uk,^
gm_r_ex_Dictionary_Vi,gm_r_ex_Dictionary_Zu

This script works perfect with LibO 5.2
But ALL languages are installed with 5.3 branch
Tested with 5.3.0.3, 5.3.1.1, 5.3.2.2
Comment 1 Buovjaga 2017-04-12 18:15:36 UTC
See this: https://lists.freedesktop.org/archives/libreoffice/2017-April/077536.html

Closing.
Comment 2 Buovjaga 2017-06-28 11:43:42 UTC
*** Bug 108646 has been marked as a duplicate of this bug. ***
Comment 3 Gabor Kelemen 2017-06-28 11:59:42 UTC
Reopening.

UI_LANGS used to work in 5.2. 
That is, it installed the UI languages and spelling dictionaries only for the given languages.

It is possible to list all dictionaries to remove but that's just an inconvenient workaround that does not affect UI languages.
Comment 4 Buovjaga 2017-06-28 12:43:34 UTC
Ok, I pinged Jürgen F. on -dev, but he was unable to comment. Let's set to NEW and see what happens.
Comment 5 Juergen Funk (CIB) 2017-06-28 14:05:56 UTC
Hi,

The parameter "UI_LANGS" can i not find in the LO-msi (5.2.8) and not in the msi-spec (https://msdn.microsoft.com/en-us/library/windows/desktop/aa370905(v=vs.85).aspx)
and look to: https://lists.freedesktop.org/archives/libreoffice/2017-April/077529.html

But i think what should work is ADDLOCAL=gm_Langpack_r_it,g_Langpack_r_ru,.. or REMOVE=... (but not tested)

In this relationship exist a patch in 5.3 0a76a41ae7a2ebd53f80f01ea9e2bcff3026d155, this need the ADDLOCAL=.. switch to overroll the CustomAction "SelectLanguage" tdf#100929.
Comment 6 Gabor Kelemen 2017-06-28 14:12:44 UTC
(In reply to Juergen Funk (CIB) from comment #5)
> Hi,
> 
> The parameter "UI_LANGS" can i not find in the LO-msi (5.2.8) 

It is handled here:

http://opengrok.libreoffice.org/xref/core/setup_native/source/win32/customactions/sellang/sellang.cxx#313

There were some changes to that code since 5.2, that might / probably had this unfortunate side effect:

https://cgit.freedesktop.org/libreoffice/core/log/setup_native/source/win32/customactions/sellang/sellang.cxx

I don't have a Windows-based build system, so I can't help narrowing this further down.
Comment 7 Juergen Funk (CIB) 2017-06-29 07:22:48 UTC
Hi Gabor Kelemen,

after the written of my comments, to come to mind i have forget search in the code. And that is the problem in LO 5.3.

In the patch (look to my above comment) disable this CostumAction (SelectLaguage) off when ADDLOCAL is set, and that is the problem.

But i have a solution for that, and made a patch for that.

But my time is very small for do that, the most time is the testing, i would made the patch without testing, then i can made the patch quickly, or asap.
Comment 8 Juergen Funk (CIB) 2017-06-29 07:53:36 UTC
Here is the patch https://gerrit.libreoffice.org/39379, without testing
Comment 9 Juergen Funk (CIB) 2017-07-17 10:43:31 UTC
I have upload the 
LibreOfficeDev_6.0.0.0.alpha0_Win_x86_en-US_de_fr_es_it_pt_qtz.msi 
here http://www8.zippyshare.com/v/Jef2oBjK/file.html

Here the Build-Parameter:
--enable-pch
--disable-ccache
--with-ant-home=apache-ant-1.9.4
--with-junit=junit-4.10.jar
--with-lang=de fr es it pt
--with-package-format=msi

build call
 make build-nocheck

Can anyone test this, when okay can remove the -1 from https://gerrit.libreoffice.org/39379

hope it is okay
Juergen
Comment 10 Gabor Kelemen 2017-07-24 06:42:48 UTC
Created attachment 134807 [details]
Screenshot of the test installer

Hi Juergen

Thanks for the patch, I gave it a try.

Looks like it works mostly, of the three languages set, de and it are selected. But not en-US.
Comment 11 Juergen Funk (CIB) 2017-07-28 06:05:30 UTC
Hi Gabor,

it looks good, for the english the right acronym is "en" you can see here https://opengrok.libreoffice.org/xref/core/setup_native/source/win32/customactions/sellang/sellang.cxx#78

I think my patch work my fix call only the CostumAction "SelectLaguage" and that works now, but the code of the SelectLaguage I have not touch. 

Okay, my patch can be review, thank you for you testing.


Best
Juergen
Comment 12 Gabor Kelemen 2017-07-28 11:07:13 UTC
(In reply to Juergen Funk (CIB) from comment #11)
> Hi Gabor,
> 
> it looks good, for the english the right acronym is "en" you can see here
> https://opengrok.libreoffice.org/xref/core/setup_native/source/win32/
> customactions/sellang/sellang.cxx#78
> 

In this case it was my bad - en_US works in the example file you provided. 
(where did I got en-US? :()

I think it's okay to commit this.
Comment 13 Gabor Kelemen 2017-07-28 11:08:29 UTC
Created attachment 134929 [details]
Screenshot of the test installer and the script used to launch it.

This looks to be fine now!
Comment 14 Commit Notification 2017-08-28 08:28:07 UTC
Juergen Funk committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4b88947e5a56f39e80f8edf85b2b384a4f22bb3

tdf#106931 - LibreOffice 5.3 installer doesn't honor UI_LANGS property

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Xisco Faulí 2017-09-28 07:20:24 UTC
A polite ping to Juergen Funk: is this bug fixed? if so, please close it as RESOLVED FIXED
Comment 16 Juergen Funk (CIB) 2017-10-02 05:20:43 UTC
It is resoved