[REBOL] Re: newbie Q: Where to put extensions ?
From: al::bri::xtra::co::nz at: 28-Sep-2001 8:18
Jason asked:
> What is the recommended way to make my own rebol script tools available by
default?
I don't know about official or recommended, but here's what I'm doing.
First, I've got both Rebol/Core and Rebol/View, so they're stored like:
%/C/Rebol/Core/Rebol.exe + other rebol/core files.
%/C/Rebol/View/Rebol.exe + other rebol/view files.
Beside them, I have another directory:
%/C/Rebol/Values/
where all my extensions are stored, with a filename corresponding to the
the Rebol function name. For example, my 'pop function is inside a file
named %Pop.r and stored at:
%/C/Rebol/Values/Pop.r
For example:
>> cd %/c/rebol/values
== %/c/rebol/values/
>> probe read %. none
[%Greek.r %Common Dir.r %Dice.r %Weekday.r %Associate.r %Pop.r
%Patches.r %HTML.r %eText.r %Push.r %ML.r %WML.r %URI.r %Map.r
%Arguments.r %Transpose.r %Accumulate.r %CLS.r %Iota.r %Printer.r
%Script.r %Source.r %Values.r %Clone.r %Delete-Dir.r %Roman.r
%Round.r %Celcius.r %Fahrenheit.r %Fun.r %Month.r
%Common Parse Values.r]
== none
Inside the directory, I have %Values.r which contains:
Rebol [
Name: 'Values
Title: "Values"
File: %Values.r
Author: "Andrew Martin"
eMail: [Al--Bri--xtra--co--nz]
Date: 27/Sep/2001
Purpose: "Loads Values into Rebol."
]
use [Patches][
Patches: %Patches.r
if exists? Patches [do Patches]
foreach File exclude sort read %. reduce [Patches
Rebol/Script/Header/File][
if find/last File %.r [do File]
]
]
And inside each %User.r, I have the following line:
do %/C/Rebol/Values/Values.r
The end result of the above, is that the %Patches.r script is DO-ne, then
every .r file is done (except for the %Values.r and %Patches.r files).
I hope that helps!
Andrew Martin
ICQ: 26227169 http://zen.scripterz.org