Hackweek – LibreOffice multilingual MSI installer

I had been thinking about simplifying installing process of LibreOffice under Windows for a long time. During hackweek I had the opportunity to work on this problem and at the end of the week I could produce a proof-of-concept solution.

Currently LibreOffice Windows installer is rather complicated. It starts with the NSIS pre-installer which extracts MSI file, language MST files, readmes, setup.ini and setup.exe to a directory in the user’s file system. Desktop is the default. Then setup.exe starts. It also tries to find out the language to be used, installs the vcredist files, then starts the MSI installer (with a language transform, if necessary). MSI installer does the real installation.

It is not only overcomplicated but there are problems with NSIS:

  • It does not know Unicode. Localized installers cannot be made for many languages.
  • Help packs have localized installers and localized text is displayed correctly only when the system legacy code page setting matches to that language. For example Russian help pack installer displays garbage characters on English system.
  • It extracts files to Desktop (per default). Users are confused, they don’t know, if they can remove those files or not.
  • It has a cryptic bug which caused problems with Chinese installers (garbage characters) fdo#32335

In fact MSI alone is capable to install anything. In a few steps I created a multilingual single MSI installer for LibreOffice 3.4

  1. In solenv/bin/modules/installer/global.pm set $include_cab_in_msi from 0 to 1. This creates one big MSI file with the CAB included.
  2. Instead of installing vcredist_x86.exe separately, the necessary runtime files can be merged into the MSI. We definitely need MSVCRT, I’m not sure about ATL, and we don’t need MFC. So it helps in reducing the size of installer, if we don’t ship DLLs that are not used by LibreOffice. Merge modules should be copied to external/msm90, they can be found at c:\Program Files (x86)\Common Files\Merge Modules\ in every Windows dev environment. Scp2 and installer creator perl scripts can handle merge modules (and after a while I found out how).
  3. The use of embedded language transforms is an undocumented feature of Windows Installer. A language transform is a transform that is located in a substorage of a Windows Installer package that is named after the LangId. The Summary Information Stream (Property: PID_TEMPLATE) includes a list of languages that are supported by the package. Windows Installer automatically selects the language that matches the language preference that is set for the operating system. Basically I followed the instructions on http://www.installsite.org/pages/en/msi/articles/embeddedlang/. The necessary VBScript files are part of Windows SDK, at least Microsoft mentions this in KB articles. I found them elsewhere on the net.

I uploaded the result to http://ftp.fsf.hu/LibreOffice/Multilang-MSI/.
The installer file, libreoffice34.msi starts in the default language of Windows. Any language can be forced, e.g. Hungarian with LCID 1038:
msiexec -i libreoffice34.msi TRANSFORMS=:1038
Note the colon before the number, that denotes internal transform.

TODO:

  • Test a lot, and possibly find out whether this method was not used on purpose before.
  • Implement step 3. as part of the build.
  • Do the same for helppack installers.
  • Clean up the code (remove NSIS, possibly remove ulfconv, etc.)

Lively Alphabet – kifestőkönyv és DTP példa

A LibreOffice évfordulójára megjelent nyílt forrású Lively Alphabet (PDF, 4,7 Mb) állatos kifestő a Writer jegyzethez hasonlóan jó példája a LibreOffice kiadványszerkesztési lehetőségeinek. Bemutatja a LibreOffice SVG vektorgrafikus képformátum-kezelését és megújult betűkészleteit, elsősorban a kifejezetten nagy betűmérethez tervezett, különösen szép Linux Libertine Display betűváltozatot. A GNU GFDL szabad dokumentációs licenc alatt kiadott nagyméretű (47 Mb) ODF forrásdokumentum betöltéséhez és módosításához kapcsoljuk ki az élsimítást az Eszközök » Beállítások » LibreOffice » Nézet lapon. A könyv hozzávalói az egyszerű szöveg és a LibreOffice új betűi mellett a Wikimedia Commonsból, nagyrészt a Pearson Scott Foresman tankönyvkiadó adományából származó és a Wikipédia által digitalizált képek, amelyek az Inkscape rajzprogrammal (vagyis az Inkscape-be integrált Potrace programmal) lettek vektorizálva a jobb felbontás és a szabad méretezhetőség végett.

Lively Alphabet – coloring book and DTP example

Published for the anniversary of LibreOffice, Lively Alphabet (PDF, 4,7 Mb) is a free coloring book, also a demo of SVG vector graphics support and the new typographical features – especially the beautiful new font variant Linux Libertine Display G – of LibreOffice. To load and modify the huge ODF source document (47 Mb, released under the GNU Free Documentation License), it is recommended to check out anti-aliasing in LibreOffice in Tools » Options » LibreOffice » View page).

New fonts, unique features for LibreOffice DTP

Based on the excellent SIL Graphite font technology and Philipp H. Poll’s Libertine Open Fonts project, LibreOffice has got extraordinary DTP capabilities with the extended Graphite version of Linux Libertine and Biolinum font families. Now LibreOffice supports new bold and semibold font variants, true size variants, combining diacritics (a basic requirement for several languages and for different scientific notations, eg. IPA) with correct typography (position, kerning, glyph variants for upper case letters), Italic correction (only in LibO 3.3, yet), new features for Baltic and other languages with diacritics (true small caps for Latvian, Lithuanian, Esperanto etc.), Catalan (improved typography of long l·l), English (optional TeX-like sentence spacing, only in LibO 3.3, yet), Hungarian (Italic gj, gf, gy variants), Serbian (Italic б, г, д, п variants using feature locl), experimental hanging punctuation (see picture) and much more. Release notes and documentation with examples. The development of Linux Libertine G and Biolinum G Graphite fonts was supported by FSF.hu Foundation, Hungary.

Biztonsági hiba javítása (CVE-2011-2713)

A Document Foundation (TDF) ma nyilvánosságra hozta egyes biztonsági hibák részleteit, amelyek a nemrég kiadott LibreOffice 3.4.3-ban lettek kijavítva. Az iparágban szokásos gyakorlat szerint a hibák nyilvánosságra hozásával vártak, hogy a felhasználóknak legyen idejük áttérni a javított verzióra. A LibreOffice kereskedelmi disztribútorai a javított kiadásokat már korábban elkészítették, és felhasználóikhoz eljuttatták.

A RedHat biztonsági szakembere, Huzaifa Sidhpurwala talált egy memóriakezelési hibát a LibreOffice Microsoft Office-dokumentumokat kezelő kódrészletében. A hiba elméletben kihasználható, egy speciálisan összeállított dokumentum segítségével például vírus telepíthető a számítógépre. A sebezhetőség leírása a CVE-2011-2713 szám alatt, „out of bounds property read in binary .doc filter” címmel található meg az adatbázisokban.

A LibreOffice 3.4.3 ezen kívül más potenciális biztonsági réseket is befoltoz. Javult a Windows Metafile (.wmf) és a Windows Enhanced Metafile (.emf) képformátumok betöltésének kódja, miután a fejlesztők kijavították a „fuzz testing” módszerrel felszínre került hibákat. Az általános kódtisztítási munka eredményeként is több hasonló javításra került sor. A biztonsági hibák javítása ebben a kiadásban nagyrészt Caolán McNamara (RedHat) és Marc-André Laverdière (Tata Consultancy Services) érdeme.

Ubuntu Font Family: új betűváltozatok

Az Ubuntu közösség és a mögötte álló Canonical már eddig sokat segített a szabad szoftveres közösségnek. 2010 júliusában jött az első hír arról, hogy az Ubuntu Linux áttervezésével új betűk (betűtípusok) érkeznek az Ubuntuba. Novemberben felröppent az első hír a mono (monospaced – fix szélességű betűk) változat elkészüléséről. Decemberben már – Google támogatással – weboldalakon is használhatóvá váltak az Ubuntu betűi. Idén augusztusban megjelent a condensed (sűrített) változat, most szeptemberben pedig megjelent – önállóan is elérhetővé vált – a monospaced változat. Az új betűk elérhetőek az Ubuntu Font Family (megújult) oldaláról.

Magyar mondatellenőrző a LibreOffice bővítménytárában

Az OpenOffice.org kiegészítők elérhetetlensége miatt (ismételt betöltés után jelentkezik be sokszor csak az oldal) a magyar mondatellenőrző (Lightproof magyar modul) elérhetővé vált a LibreOffice kísérleti bővítménytárában is. További leírás a magyar mondatellenőrző legutóbbi kiadásáról, és a LibreOffice bővítménytáráról.

OASIS szabvány lett az ODF 1.2

OASIS szabvány lett az Open Document Format (ODF) 1.2, adta hírül Rob Weir a blogjában. Az ODF 1.2 újdonságai között említhetjük például a munkalapképleteket szabványosító OpenFormula-t, a RDFa/RDF XML szemantikus metaadatokat és a digitális aláírás támogatását.  A LibreOffice a kezdettől fogva támogatja az ODF 1.2-t.

Az ODF szabvány fejlesztését koordináló testület munkája folytatódik. Az ODF 1.2-t be fogják nyújtani az ISO-hoz is. Továbbá elkezdődhet az ODF 1.3 kidolgozása.