Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install on OSX ? #3

Open
ghost opened this issue Oct 13, 2017 · 2 comments
Open

How to install on OSX ? #3

ghost opened this issue Oct 13, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2017

x-MacBook-Pro:cmd apple$ go get -u github.com/dveselov/go-libreofficekit/...
# github.com/dveselov/go-libreofficekit
In file included from ../../../../../dveselov/go-libreofficekit/libreofficekit.go:6:
../../../../../dveselov/go-libreofficekit/lokbridge.h:2:10: fatal error: 'LibreOfficeKit/LibreOfficeKitInit.h' file not found
#include "LibreOfficeKit/LibreOfficeKitInit.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.


@acaloiaro
Copy link
Contributor

acaloiaro commented Nov 27, 2017

LibreOfficeKit is currently unavailable for OSX. One approach you might take is to create a stubbed platform-specific source file to develop the majority of your project on OS X (e.g. my_lok_integration_darwin.go). This way, most of your development can be done on OS X. When you're ready to write an actual my_lok_integration, switch over to a Linux Virtual Box VM, Docker, your preferred method, and create my_lok_integration_linux.go.

Go is smart enough to only compile the source file that is applicable to the current platform. Hope this helps. Cheers.

P.S. For those who only need file conversion from Libre — create a _darwin.go variety that calls soffice directly (for your development convenience):

exec.Command("soffice", "--headless","--convert-to", format, outFilePath, "--outdir", "/tmp")

You can then create a _linux.go implementation using go-libreofficekit for "production".

@schmitch
Copy link

schmitch commented Jul 3, 2018

well basically libreofficekit are just some headers.
however throwing them at Mac will fail with Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants