pkg2appimage
pkg2appimage copied to clipboard
How to add another language in Appimage (libreOffice)
I would like to know step-by-step how to add my language to LibreOffice (or another appimage).
Let's say you want a German LibreOffice AppImage. Let's generate a new AppImage from scratch, using the LibreOffice AppImage Recipe and ingredients from download.documentfoundation.org:
- Get the recipe that is used to produce the LibreOffice AppImage:
wget https://github.com/probonopd/AppImages/raw/master/recipes/libreoffice/Recipe
- On http://download.documentfoundation.org/libreoffice/stable/5.3.0/deb/x86_64/ find the langpack for your language, e.g., http://download.documentfoundation.org/libreoffice/stable/5.3.0/deb/x86_64/LibreOffice_5.3.0_Linux_x86-64_deb_langpack_de.tar.gz
- Edit the recipe so that it uses the langpack: In line 21 (= below
wget -c "$OOODOWNLOADLINK"
), addwget -c http://download.documentfoundation.org/libreoffice/stable/5.3.0/deb/x86_64/LibreOffice_5.3.0_Linux_x86-64_deb_langpack_de.tar.gz
- On a debian/ubuntu based system, run
bash -ex Recipe
and watch the AppImage being generated.
Please let me know if you run into any trouble. (Just wrote this down, didn't test.)
@riedzig did this work for you? How did it go?
The script "Recipe" doesn't properly handle multiple ".tar.gz" files. At line #22 in "Recipe" using "tar xfvz .tar.gz" the shell will expand the ".tar.gz" to the matching filenames and then execute the "tar" command with those in place. For example if there are 3 files "LibreOffice_5.3.4_Linux_x86-64_deb.tar.gz", "LibreOffice_5.3.4_Linux_x86-64_deb_helppack_en-GB.tar.gz" and "LibreOffice_5.3.4_Linux_x86-64_deb_langpack_en-GB.tar.gz" then the command that will run will be:
tar xfvz LibreOffice_5.3.4_Linux_x86-64_deb.tar.gz LibreOffice_5.3.4_Linux_x86-64_deb_helppack_en-GB.tar.gz LibreOffice_5.3.4_Linux_x86-64_deb_langpack_en-GB.tar.gz
Which results in an error because the "tar" command is looking for "LibreOffice_5.3.4_Linux_x86-64_deb_helppack_en-GB.tar.gz" and "LibreOffice_5.3.4_Linux_x86-64_deb_langpack_en-GB.tar.gz" in the archive "LibreOffice_5.3.4_Linux_x86-64_deb.tar.gz". Not the desired result.
Instead the line could be either:
for filename in *.tar.gz; tar xzvf $filename; done
or
ls *.tar.gz | xargs -I{} tar xzvf {}
or
find . -name "*.tar.gz" -exec tar xfvz {} \;
The last one is used in the script mentioned on the page Bundling LibreOffice
There are probably other ways to do this but these are the first that come to mind. The first using a command directly in bash and the second using some standard Linux commands chained together with a pipe.
Ah right @conceptrat but that should be easy to change in the script.
Do I submit that as a tested commit?
It would be best to ask the LibreOffice project to provide AppImages. They are currently considering it and it would be very helpful if you could let them know that you'd like to see LibreOffice AppImages with certain (or all) languages.
https://bugs.documentfoundation.org/show_bug.cgi?id=97269 https://bugs.documentfoundation.org/show_bug.cgi?id=108648
I've created an AppImage of the latest stable "fresh" LibreOffice including en-GB (I'm in NZ) using your script. It's working fine. I'll add my +1 to the request over a Document Foundation.
@conceptrat: Are you aware of this: https://github.com/antoniofaccioli/libreoffice-appimage ?
Yup have seen that one and used it. I'm still recommending that the Document Foundation either use the script on here or the one that you've mentioned above to produce an AppImage for LibreOffice that is distributed via there site along with the other downloads.
*" I'm still recommending that the Document Foundation either use the script on here or the one that you've mentioned above to produce an AppImage for LibreOffice [....]"
They are using the one I mentioned...
"[....] that is distributed via there site along with the other downloads."
...to distribute the current LibreOffice-6.0.0.0-x (Alpha, Beta and Nightly) as well as older stable version AppImage builds from here:
- http://libreoffice.soluzioniopen.com/index.php/old-versions/
- http://libreoffice.soluzioniopen.com/index.php/stable-2/
- http://libreoffice.soluzioniopen.com/index.php/pre-releases/
- http://libreoffice.soluzioniopen.com/index.php/daily-version/
It's not "their" site yet, but Antonio is a member of the LO team, and he has their blessing to do this. I guess that The Document Foundation does want to see how well (or not) it works, and how much (or not) the users like it.
So make sure to let them know! :-)