On Mon, Mar 26, 2012 at 1:04 PM, Jacob Nordfalk
<[email protected]> wrote:
>
>
> 2012/3/26 Stephen Tigner <[email protected]>
[snip]
>> Ah, okay, so I'm assuming APERTIUM_PATH is an environment variable?
>
>
> Sorry, it wasnt clear (again - Unhammer, your'e fired as ghost writer :-).
> APERTIUM_PATH would be the path to the 'apertium binary'
> In shell language it would be expressed as
>
> APERTIUM_PATH="$(dirname $0)"
>
> this makes sure that binaries are first searched for in the same directory
> as the 'apertium' command.
>
Ah, okay. That makes more sense then.

On Mon, Mar 26, 2012 at 1:08 PM, Kevin Brubeck Unhammer
<[email protected]> wrote:
> Stephen Tigner <[email protected]>
> writes:
[snip]
>> Ah, okay, so I'm assuming APERTIUM_PATH is an environment variable? If
>> so, that should be fairly easy to implement. Just need to tweak a bit
>> how the UNKNOWN programs are called. I'll try and take a look at it
>> tonight if I have time. n.n
>
> If you install apertium to /usr/local/bin/, the shell script
> /usr/local/bin/apertium will have
> APERTIUM_PATH="/usr/local/bin"
> as the second line.

So basically it just prepends the apertium path to the system path?
Well, I don't really think any modification of the existing Java code
would be needed, then. Because the desired behavior is already the
current behavior, as long as you remove the explicit paths from the
mode file.

This is because it always checks if it can be done internally first,
and then it already depends on the host runtime to run the UNKNOWN
programs, and that of course would reference the system path and any
conventions the system has for finding executables to run. (Like the
convention that the current working directory is always considered
implicitly first on the path in Windows.)

I used the same trick (letting the host runtime handle path searching)
for trying to run cygpath (since I, AFAIK know, I have no way of
knowing where cygwin is installed, or at least not an elegant and
robust way) and javac for run-time compilation of transfer files (for
instance when running on a JRE instead of a JDK, but the JDK is
present on the system and in the system path).

Hopeful that he's not just rambling and needing sleep now,  ;)
-- Stephen

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to