---Oleg Kobchenko wrote:
> > From: "Sherlock, Ric"
> >
> > It will be nice when addons are properly added to the PM
> > Library list (see
> > Library Request on wiki for one idea of how).
> > In the meantime I add addons that I use frequently to the
> > PM Library list as follows:
> >
> > * Edit ~config/startup.ijs (Edit|Configure|Startup|Open)
> > * Add desired addons to PUBLIC_j_ like this:
> >
> > buildpublic_j_ 0 : 0
> > tara           ~addons/tables/tara/tara
> > zip            ~addons/arc/zip/zfiles
> > ziptrees       ~addons/arc/ziptrees/ziptrees
> > csv            ~addons/tables/csv/csv
> > )
> >
> > * Finished.
> >
> > Because of the syntax that PM uses when it includes an
> > entry from the PM Library list in your project,
> >
> > script_z_ '~addons/general/dirutils/dirutils.ijs'
> > script_z_ '~addons/arc/zip/zfiles.ijs'
> >
> > there will be no problem running the built script on other
> > user's machines who
> > haven't made the same config change as you (as long as they
> > have the addon installed).
> >
> > Another bonus is that you can then refer to these addons in
> > the session as you
> > would other defined library scripts. Eg.
> > load 'tara'
> > open 'zip'
> >
> > Note-To-Self: other users may/will not have the same addons
> > defined as me -
> > something to keep in mind when I post to the forum! In that
> > situation it is safer to use the full JAL format. Eg.
> > load 'tables/tara'
> > open 'arc/zip/zfiles'
>
> Yes it absolutely true that it is better to use canonical way
> to load addons
>   load 'tables/tara'
>
> All other ways are non-portable and not recommended.

Just to be clear, I was not suggesting the use of the "load 'tara'" format in 
scripts, I agree that in that case it is safer to use "load 'tables/tara'". 
However for interactive use in the session, there is nothing wrong with the 
simpler format. It seems to me that there is no advantage to the user of having 
to remember both the category and the name of the addon in order to reference 
it - but we have had this discussion before! :-).

> To get the main forlder for addon:
>
>   jpath'~addons/tables/tara'
> D:\stuff\j602\addons\tables\tara
>
> We will need to discuss how to integrate addons in
> Project Manager (PM).
>
> One aspect of PM build process: combining external libraries
> into one file, AFAIK, would probably be better to replace with
> the approach of "referencing" standard base and addon library.
> So instead of a one file, to create a target folder structure
> with external libraries in their place. And only internal scripts
> would be then combined into one file. Maybe there is already such
> build "mode" in PM, I don't know. But such approach seems to
> be very optimal and portable. Code is not repeated and result
> can easily be incorporated into existing J installations, providing
> version compatibility.

If I understand you correctly, then yes this is already possible in the current 
PM. You can decide whether the project source and/or the project libraries 
should be included or required (referenced) in the final built script.  The 
syntax PM uses for referencing was what I was referring to above. If you select 
a Library script to be used in your Project using the Library tab and specify 
in the Project|Build Options dialog to "require" (the default) rather than 
include library scripts, then the syntax the PM uses to reference the library 
script is:

script_z_ '~addons/tables/tara/tara.ijs'

This syntax and functionality is portable and has the benefits you describe.

One thing that I saw as an advantage of my Library Request on the wiki was that 
you would be able to independently choose to include vs require, project 
scripts, addon scripts and base library scripts (see mockup of Build Options 
dialog).

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to