[Libreoffice-bugs] [Bug 122824] Main LibreOffice MSI Package should be compiled with external .cab file to reduce installation size requirements

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Jan 21 17:05:11 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=122824

--- Comment #5 from João Paulo <joaopauloag-freedesktop at yahoo.com.br> ---
Wow, thanks for the info! I didn't know all that. And I agree it's not good to
provide .zip files with split installers nor providing different packages for
different scenarios (it not only creates extra complexity, but also duplicates
the storage space needed to provide each new LibreOffice version).

Anyway, I found a workaround: First make an administrative install folder (the
"/A" option passed to msiexec.exe extracts everything to a folder, including
the **stripped down** .msi file) and then use the administrative install folder
to install LibreOffice.

Unfortunately, the workaround creates some undesired side effects
:
(a) The digital signatures for the .msi file are invalidated (not a problem to
my configured machines and users, but can be for someone else);
(b) More storage space (on the server or on the client machine) is needed to
deploy LibreOffice. It can be a problem, as the administrative install folder
for LibreOffice 6.1.4.2 x64 alone is 1.172.491.255 bytes, against 283.185.152
bytes of the .msi which has a compressed .cab file, and not all installs can be
made through a fast network or any network at all (slow network means it's
better to use the compressed .msi file with embedded .cab file or even a
physical media as a pen-drive or portable HDD);
(c) If there is not enough storage on the server or the setup media or fast
enough network connection to serve the administrative install folder, then it
will be needed more time to complete setup (not a problem if using a portable
HDD as it appears only when installing, which is not frequent -- but is a
problem through a slow network connection).

But then the completed setup uses less space (as the cached .msi file inside
\Windows\Installer folder is the stripped down without the internal .cab file).
The cached .msi file is now just 20.336.640 bytes (or 11.943.936 bytes if NTFS
compression on that folder is enabled), vs. the original size of 283.185.152
bytes (or 274.460.672 bytes if NTFS compression is enabled) after installing
LibreOffice 6.1.4.2 x64.

I adapted my previous install script (I use a .cmd file on every deployment) to
use this new logic and I'll copy (a stripped down version of) it here (I don't
know a better place to publish a workaround):

@Echo Off
SetLocal EnableExtensions EnableDelayedExpansion
PushD "%~dp0"

Set MSI-x86=x86\LibreOffice_6.1.4.2_Win_x86
Set MSI-x64=x64\LibreOffice_6.1.4.2_Win_x64

REM code to install x86 binaries on x86 or x64 processor / in case there is no
x64 setup file to install on a x64 machine, but there is a x86 file

REM %ProgramFiles2% is needed as %ProgramFiles(x86)% don't work when used with
"If ( ) Else" because of the parenthesis.
Set ProgramFiles2=%ProgramFiles%
Set CommonProgramFiles2=%CommonProgramFiles%
If Defined ProgramFiles(x86) Set ProgramFiles2=%ProgramFiles(x86)%
If Defined CommonProgramFiles(x86) Set
CommonProgramFiles2=%CommonProgramFiles(x86)%

If "%Processor_Architecture%" == "AMD64" If Exist "%MSI-x64%.msi" (
  Call :Installer "%MSI-x64%.msi" "%ProgramFiles%"
) Else If Exist "%MSI-x86%.msi" Call :Installer "%MSI-x86%.msi"
"%ProgramFiles2%"
If "%Processor_Architecture%" == "x86" Call :Installer "%MSI-x86%.msi"
"%ProgramFiles%"

GoTo :End

:Installer
  Start "" /Wait MsiExec.exe /A "%~1" TARGETDIR="%Temp%\LibreOffice" /Quiet
/NoRestart
  If Exist "%Temp%\LibreOffice\%~nx1" (
    Start "" /Wait MsiExec.exe /Package "%Temp%\LibreOffice\%~nx1" /Passive
/NoRestart ADDLOCAL=ALL CREATEDESKTOPLINK=0 QUICKSTART=0
REGISTER_NO_MSO_TYPES=0
REMOVE=gm_o_Pyuno_LibreLogo,gm_o_Quickstart,gm_o_Activexcontrol,gm_Reportbuilder,gm_o_Extensions,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_Pt_Pt,gm_r_ex_Dictionary_Br,gm_r_ex_Dictionary_Bs,gm_r_ex_Dictionary_Ca,gm_r_ex_Dictionary_Bo,gm_r_ex_Dictionary_Cs,gm_r_ex_Dictionary_Da,gm_r_ex_Dictionary_Nl,gm_r_ex_Dictionary_En,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_De,gm_r_ex_Dictionary_He,gm_r_ex_Dictionary_Hi,gm_r_ex_Dictionary_Hu,gm_r_ex_Dictionary_Hr,gm_r_ex_Dictionary_It,gm_r_ex_Dictionary_Is,gm_r_ex_Dictionary_Lt,gm_r_ex_Dictionary_Lo,gm_r_ex_Dictionary_Lv,gm_r_ex_Dictionary_Ne,gm_r_ex_Dictionary_No,gm_r_ex_Dictionary_Oc,gm_r_ex_Dictionary_Pl,gm_r_ex_Dictionary_Ro,gm_r_ex_Dictionary_Ru,gm_r_ex_Dictionary_Si,gm_r_ex_Dictionary_Sq,gm_r_ex_Dictionary_Sr,gm_r_ex_Dictionary_Sk,gm_r_ex_Dictionary_Sl,gm_r_ex_Dictionary_El,gm_r_ex_Dictionary_Es,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,gm_Langpack_r_af,gm_Langpack_r_am,gm_Langpack_r_ar,gm_Langpack_r_as,gm_Langpack_r_ast,gm_Langpack_r_be,gm_Langpack_r_bg,gm_Langpack_r_bn,gm_Langpack_r_bn_IN,gm_Langpack_r_bo,gm_Langpack_r_br,gm_Langpack_r_brx,gm_Langpack_r_bs,gm_Langpack_r_ca,gm_Langpack_r_ca_valencia,gm_Langpack_r_cs,gm_Langpack_r_cy,gm_Langpack_r_da,gm_Langpack_r_de,gm_Langpack_r_dgo,gm_Langpack_r_dz,gm_Langpack_r_el,gm_Langpack_r_en_GB,gm_Langpack_r_en_US,gm_Langpack_r_en_ZA,gm_Langpack_r_eo,gm_Langpack_r_es,gm_Langpack_r_et,gm_Langpack_r_eu,gm_Langpack_r_fa,gm_Langpack_r_fi,gm_Langpack_r_fr,gm_Langpack_r_ga,gm_Langpack_r_gd,gm_Langpack_r_gl,gm_Langpack_r_gu,gm_Langpack_r_gug,gm_Langpack_r_he,gm_Langpack_r_hi,gm_Langpack_r_hr,gm_Langpack_r_hsb,gm_Langpack_r_hu,gm_Langpack_r_id,gm_Langpack_r_is,gm_Langpack_r_it,gm_Langpack_r_ja,gm_Langpack_r_ka,gm_Langpack_r_kk,gm_Langpack_r_km,gm_Langpack_r_kmr_Latn,gm_Langpack_r_kn,gm_Langpack_r_ko,gm_Langpack_r_kok,gm_Langpack_r_ks,gm_Langpack_r_lb,gm_Langpack_r_lb,gm_Langpack_r_lo,gm_Langpack_r_lt,gm_Langpack_r_lv,gm_Langpack_r_mai,gm_Langpack_r_mk,gm_Langpack_r_ml,gm_Langpack_r_mn,gm_Langpack_r_mni,gm_Langpack_r_mr,gm_Langpack_r_my,gm_Langpack_r_nb,gm_Langpack_r_ne,gm_Langpack_r_nl,gm_Langpack_r_nn,gm_Langpack_r_nr,gm_Langpack_r_nso,gm_Langpack_r_oc,gm_Langpack_r_om,gm_Langpack_r_or,gm_Langpack_r_pa_IN,gm_Langpack_r_pl,gm_Langpack_r_pt,gm_Langpack_r_ro,gm_Langpack_r_ru,gm_Langpack_r_rw,gm_Langpack_r_sa_IN,gm_Langpack_r_sat,gm_Langpack_r_sd,gm_Langpack_r_si,gm_Langpack_r_sid,gm_Langpack_r_sk,gm_Langpack_r_sl,gm_Langpack_r_sq,gm_Langpack_r_sr,gm_Langpack_r_sr_Latn,gm_Langpack_r_ss,gm_Langpack_r_st,gm_Langpack_r_sv,gm_Langpack_r_sw_TZ,gm_Langpack_r_ta,gm_Langpack_r_te,gm_Langpack_r_tg,gm_Langpack_r_th,gm_Langpack_r_tn,gm_Langpack_r_tr,gm_Langpack_r_ts,gm_Langpack_r_tt,gm_Langpack_r_ug,gm_Langpack_r_uk,gm_Langpack_r_uz,gm_Langpack_r_ve,gm_Langpack_r_vec,gm_Langpack_r_vi,gm_Langpack_r_xh,gm_Langpack_r_zh_CN,gm_Langpack_r_zh_TW,gm_Langpack_r_zu,gm_Langpack_r_kab,gm_Langpack_r_fy,gm_r_ex_Dictionary_Id
)
  REM Remove temporary installation folder
  If Exist "%Temp%\LibreOffice" (
    RmDir /s /q "%Temp%\LibreOffice"
  )
GoTo :End

:End

EndLocal

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190121/0a81a8b5/attachment.html>


More information about the Libreoffice-bugs mailing list