https://bz.apache.org/ooo/show_bug.cgi?id=127966

--- Comment #10 from ronyf <[email protected]> ---
Hi Jim,

yes, unfortunately, the problem on MacOS is still there with 4.1.8. 

Here a run of the ooRexx deafult macro script running as a macro off swriter
which queries the current directory and shows some environment variables (look
for "current directory=[/]" which gets inserted into the swriter document:

--- cut ---
Hello world [2020-12-06T14:19:58.743492], this is ooRexx (cf.
<http://www.RexxLA.org>) speaking !
Infrastructure employed: [ooRexx 5.0.0 r12113 (28 Sep 2020) / BSF 641.20201022
/ Java 1.8.0_251, 64-bit / Darwin 18.7.0]. 
Operating system: [Darwin 18.7.0] 
current directory=[/]. 
current user=[rony]. 
current settings of environment variable
PATH=[.:.:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin]. 
... and now parsing the individual paths: 
      [.] 
      [.] 
      [/usr/bin] 
      [/bin] 
      [/usr/sbin] 
      [/sbin] 
      [/usr/local/bin] 
--- cut ---

In order to duplicate on MacOSX first a brief background: 

- ooRexx is an opensource object-oriented version of the IBM Rexx scripting
language (actually ooRexx is based on the opensourced IBM product)

- BSF4ooRexx is Java bridge for ooRexx using Apache BSF (and can also be used
via javax.script/JSR-223)

- BSF4ooRexx comes with support for AOO and installs ooRexx as a macro language
within AOO; there is also support for using AOO via the command line (you need
to run the AOO-ooRexx scripts after installation in a new session such that the
necessary change in the environment takes effect)

---

Now in your case if you have multiple versions of AOO installed on your Mac,
then the installer will consult "bsf4oorexx/install/setupOOo.rex" in the
routine "getOOoHomeDirMacOSX" at line # 1050 and use the following locations in
the following order to locate "soffice": 

- "/Applications/OpenOffice.app/Contents/MacOS"
- "/Applications/OpenOffice.org.app/Contents/MacOS"
- "/Applications/LibreOffice.app/Contents/MacOS" 

So you could manually change/add the location of AOO on your machine for which
you want ooRexx to be installed for. 

---

Here is what you would need to do on MacOSX:

1) get the BSF4ooRexx installation package for MacOSX which includes ooRexx
already: <https://sourceforge.net/projects/bsf4oorexx/files/beta/20200928/>:
either click at the link on the very top, if browsing from a Mac or search the
file "b4r_641_500_64Bit_macosx-20201022-r12113.zip", download, unzip and
install

2) make sure AOO has been totally closed in between, start swriter, go into the
menu "Tools -> Macros -> Organize Macros" and you should have an entry
"ooRexx..." at the bottom, choose it:

- - select "My Macros" and click "Create..." accept the name "Library 1"
- - select "Library1" and click "Create ..." accept the name "Macro1.rxo"
- - select "Macro1.rxo" and click "Edit ..." such that the default macro
program gets loaded (it is quite flexible=complicated as that macro can be run
against all AOO modules, but also stand-alone from the command line: that macro
will query the current directory and write it with the other information into
the swriter document) and click "Run" at the bottom of the dialog containing
the code

---

If you have any questions, please do not hesitate to ask them!

---rony

P.S.: If I recall correctly in the past you were able to fix that for a 4.2
version.

P.P.S.: If you are interested in comparing that script e.g. on AOO on Linux,
then you would need to get the following parts:

- ooRexx 5.0 (the latest beta, which is faster and stabler than the old GA
version) from <https://sourceforge.net/projects/oorexx/files/oorexx/5.0.0beta/>
and install it (please note: the bitness of ooRexx must match the bitness of
your installed Java)

- BSF4ooRexx from
<https://sourceforge.net/projects/bsf4oorexx/files/beta/20200928/>, if browsing
from Linux use the download link at the very top or download the file
"BSF4ooRexx_install_v641-20201124-beta.zip", unzip, go into
"bsf4oorexx/install/linux" and run "install.sh"

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to