Filosoft / vabamorf

Eesti keele morfanalüsaator
Other
24 stars 14 forks source link

Documentation insufficient to get the LibreOffice plugin built #9

Closed Kaljurand closed 10 years ago

Kaljurand commented 10 years ago

The documentation in apps/plugin/libreoffice/readme.txt is insufficient (at least for some platforms) to get the LibreOffice plugin built.

(About myself: Ubuntu 14.04; libreoffice launches LibreOffice; there is something in /usr/lib/libreoffice/, but /usr/lib/openoffice/ does not exist.)

make -f unix/Makefile.cpp succeeds after replacing java-6-openjdk with default-java

make -f unix/Makefile_java does not succeed, resulting in:

unix/Makefile_java:5: /settings/settings.mk: No such file or directory
...

unix/Makefile_java contains the comment:

Run first "source /usr/lib/openoffice/basis3.2/sdk/setsdkenv_unix.sh" (or similar)

Such instructions are better included in the README. However, this path does not exist on my machine, and I didn't find anything similar in /usr/lib/libreoffice/ either. More detailed instructions are needed to get the LibreOffice (OpenOffice?) environment set up.

File names do not match the documentation:

oxt/_build.bat is Windows-specific.

PRR24 commented 10 years ago

Documentation states, that you need to run the java compilation under LibreOffice dev env. How to set up a dev env for LibreOffice depends on platform and describing it is not in a scope for Vabamorf. Luckily, installing LibreOffice SDK is pretty straight forward and explained well in Internet. I think Ubuntu 14.04 has also a dedicated package for it.

You should use as old version of SDK and Java as possible. Vabamorf was built using SDK 3.2 and also using Java 6 is strongly recommended.

File names adjusted.

kristiank commented 10 years ago

There has been huge work made in the Java communities to reach a standard and platform independent versions of Java (Oracle, OpenJDK, Icedtea). I see no point in having to change or degrade a users default java setup.

kristiank commented 10 years ago

The package documentation for libreoffice-sdk for my distribution states: To set the build environment for building against the sdk use /usr/lib64/libreoffice/sdk/setsdkenv_unix.sh.

Probably this is what the comment "or similar" means in unix/Makefile_java.

PRR24 commented 10 years ago

Yes, exactly.

About tool levels. If you use Ubuntu 14.04 with JDK 7 and LO 4.2 SDK, I'm not sure, the compiled package will work on (for example) Ubuntu 10.04 with LO/OOo 3.1. But if you are using it just for yourself, it is probably OK.

kristiank commented 10 years ago

That is probably a question for a package distributor. I think the readme file is for helping a user compile locally.

Kaljurand commented 10 years ago

Thanks for the pointers. I've advanced several steps further but not yet to the working solution.

I've now followed these steps:

sudo apt-get install libreoffice-dev
sudo apt-get install p7zip-full
source /usr/lib/libreoffice/sdk/setsdkenv_unix.sh
make -f unix/Makefile_cpp
cp ooovmlinget.lin oxt/ooovmlinget.lin_x64
make -f unix/Makefile_java
cp *.jar oxt/
cp ../../../dct/et.dct oxt/fslinget.lex
cd oxt/
7za a -tzip -mx9 OOoVMLingET.oxt *.jar ooovmlinget.* fslinget.lex description.xml META-INF/*.xml registration/*.txt

Also:

The result is a package that can be installed (following the Readme.odt in http://www.filosoft.ee/freeware/oofset_4.1.zip) and nicely shows up among the extensions. Unfortunately it does not work, i.e. the language list is empty in the spelling dialog and no spelling is performed. (I did manage to get the plugin from oofset_4.1.zip to work so the problem is not in my LibreOffice.)

My LibreOffice is v4.2.6.3 Build ID 420m0(Build:3).

Btw, shouldn't this be edited to point to https://github.com/Filosoft/vabamorf

<publisher>
    <name xlink:href="http://www.filosoft.ee/index_en.html" lang="en">Filosoft</name>
    <name xlink:href="http://www.filosoft.ee/" lang="et">Filosoft</name>
</publisher>
PRR24 commented 10 years ago

Another doc issue, please keep the name et.dct (ie. script is correct, doc is invalid (adjusted)).

PRR24 commented 10 years ago

Did it work?

Kaljurand commented 10 years ago

Nope :(

On Fri, Oct 10, 2014 at 10:36 AM, PRR24 notifications@github.com wrote:

Did it work?

— Reply to this email directly or view it on GitHub https://github.com/Filosoft/vabamorf/issues/9#issuecomment-58627436.

kristiank commented 10 years ago

I can't help. I run into other Java problems which I don't want to deal with now... I'm out.

Kaljurand commented 10 years ago

The main issue (the plugin not working) was resolved after setting the option

Options -> Language Settings -> Languages -> Default languages for documents -> Western

to "Estonian". This solution might be specific to my setup (of Java, LibreOffice, ...) though. The plugin is reported to work without this particular setting on another Ubuntu 14.04. Thus closing the issue.

libreoffice_vabamorf_working libreoffice_writing_aids libreoffice_default_language