hmm, spoke too soon. If I follow your steps I get the following error when trying to open my modified .odt file (with Scripts/java/etc. in the zip's root dir):
General Error. General input/output error. I tried other subdirs but the result was the same. I noticed that the Basic scripts where at the top-most level, under "Basic"->MacroName, etc. So I tried also putting "java" at the top-level (without "Scripts") but the same error message came up. Vieri --- On Wed, 5/15/13, Vieri <[email protected]> wrote: > Thanks to both Brian and Tom. > I didn't know the odt files were compressed files. > > So now I have to re-think my webdav solution because I was > hoping to deploy just one copy of my java macro via HTTP. > This would allow me to publish my java macro updates on a > web server and also publish many odt docs and templates that > use this macro. So I guess I'll need to do a basic macro > within the document which in turn downloads an updated copy > of the Java macro and places it in, say, the user's LO > appdata dir. The trick would be to reload/restart LO so it > can correctly load the newly downloaded macro. > > Anyway, thanks for the odt/zip info. > > Vieri > > --- On Wed, 5/15/13, Brian Barker <[email protected]> > wrote: > > > > I'd like to deploy a compiled Java macro with an > ODT > > document. > > > > > > According to > > > http://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Writing_Macros: > > > > > > "If you want to deploy the macro to a document you > need > > to place it in a Scripts/java directory within the > document > > zip file." > > > > > > What does that mean exactly? > > > > I'm guessing, but I'm pretty sure I know the answer. > > > > Open Document Format files are zip archives; so the > > "document zip file" is the .odt document file itself. > > o Rename the ,odt file to change its extension to > .zip. > > o Double-click to unzip the archive. > > o Create a new folder named Scripts in the same folder > as > > the unzipped material and another named java within > it. > > o Copy your macro into .../java. > > o Select all the files and rezip them into an archive. > > o Rename the archive to change the extension back to > .odt. > > o Double-click to test. > > > > Depending on your operating system and file > associations, > > you may be able to unzip and zip without renaming the > > files. Once you have embedded your macro, you will > not > > need to do anything special when distributing your > document > > file to others. > > > > I trust this helps. > > > > Brian Barker - privately > > > > > > -- > To unsubscribe e-mail to: [email protected] > Problems? > http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette > List archive: http://listarchives.libreoffice.org/global/users/ > All messages sent to this list will be publicly archived and > cannot be deleted > > -- To unsubscribe e-mail to: [email protected] Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
