You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by John D'Orazio <jo...@cappellaniauniroma3.org> on 2020/11/08 21:34:41 UTC

Writer add-on with system dependencies

I now have a dilemma, and I figure this is the best place to ask. I have
succeeded in getting the *Chrome Embedded Framework* to work correctly in
my Writer add-on, both in Windows and on Linux.

In Linux however, if the Chrome browser hasn't already been installed, a
number of system dependencies are required in order for the Chrome Embedded
Framework to function properly inside of Java Swing.
This means that in order to install the add-on in OpenOffice writer, these
system dependencies must be met first. I've been working over how to go
about doing this, probably the best path to take would be a shell script
that takes care of setting up the environment correctly. However, in order
to launch a shell script from Java at runtime, that attempts to install
system dependencies, either I would have to create a prompt asking the user
to type in their system password in order to allow the Java runtime to
launch a process with  *sudo apt-get install* , or I would have to ask the
end user to go to the command line and launch the shell script themselves
before using the Writer add-on.

When creating a similar add-on for Microsoft Word, I was able to create an
executable package installer which takes care of all system dependencies,
and which requires elevated privileges in order to install.
I'm not sure what the best approach here would be, because this can also
define the philosophy behind the software that the add-on is being
installed in. There's room to doubt whether asking a user for their
password from within a Writer add-on is good practice, even if explaining
why it is needed. Asking a user to go to the terminal and launch a shell
script before installing or being able to fully use the add-on could be
considered a bit daunting for some end users.

Specifically the system dependencies that need to be met, at least as far
as I could gather in my tests so far, are:

sudo apt-get install gconf-service libasound2 libatk1.0-0
libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1
libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0
libgbm-dev libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0
libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1
libxcursor-dev libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2
libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation
libappindicator1 libnss3 lsb-release xdg-utils


Any suggestions on how to go about ensuring system dependencies are met,
without introducing any dubious practices for add-ons, or daunting tasks
for end users? And might I hint here again at the possibility, if the
Chrome Embedded Framework were to be integrated into OpenOffice itself,
then system dependencies would be taken care of upon installation of
OpenOffice, and Java add-ons would be able to simply add the necessary jar
files without worrying about system dependencies or environment variables
or linking native libraries. Thoughts?
-- 
John