> -----Original Message----- >On Behalf Of Oleg Kobchenko > ... > Argument -jprofile does not specify a new profile, it > suppresses loading of the profile. > So there is only profile--profile.ijs--it can be loaded or > suppressed. Hence noun PROFILE is always the location of profile.ijs.
If this is the case (and after re-reading "Starting J - Tech Details" I can see that this is certainly a valid way of interpreting things), then I'd suggest that the current documentation helped confuse me. E.g. in the profile.ijs file: NB. 2. You can modify this file, for example to change the directory paths. NB. Alternatively, set up your own profile. To do so, make a copy of the NB. file, then change the J startup parameter to point to the new file, NB. e.g. under Windows: NB. c:\j6\j.exe -jprofile c:\jx\myprofile.ijs And NB. 6. In J, PROFILE_z_ is the full profile filename, and ARGV_z_ are the NB. command line args. A profile can redefine PROFILE_z_ and load it. Early on when I was installing J, I was keen to A) install J in "c:\program files\" along with my other programs B) keep my user files in my data area (D:\) C) enable different users on my home computer to be able to play with J but each have their own user area.(c:\documents and Settings\<USERNAME>\My Documents\Jprg\) (I'll ignore this bit below as I didn't worry about that for my work computer) I followed (or at least think I followed) Chris's advice to Devon in the thread below and the info at the end of http://jsoftware.com/help/user/install.htm. http://www.jsoftware.com/pipermail/general/2006-October/027975.html I made a copy of the default profiles.ijs and copied it to d:\jprg\user\config\profile.ijs. (so that upgrading to a new version doesn't write over my custom profile) I edited it so the systemfolders are end up being defined as follows: |addons |c:\program files\j601\addons | |binary |c:\program files\j601 | |config |d:\jprg\user\config | |help |c:\program files\j601\system\extras\help| |home |d:\jprg\user\config | |profile|d:\jprg\user\config | |system |c:\program files\j601\system | |temp |d:\jprg\user\temp | |user |d:\jprg\user | In this case it seemed to make no sense for PROFILE to refer to "C:\Program Files\j601\profile.ijs". And not knowing what PROFILE might get used for by J elsewhere, I therefore set it to be the path to the profile.ijs that is actually loaded. It seems that I needn't have bothered. If PROFILE had been named PROFILEDEFAULT I wouldn't have felt it might be necessary to touch it. I'm sorry if this all sounds pedantic or dense, I'm just trying to unconfuse myself and hopefully help others not get confused in the first place! I'm not suggesting any change of functionality (if you forget the automatic assignment of PROFILE), just highlighting that I got confused by the current implementation. If I can help improve things by writing FAQ page or some such once I feel I've got the facts straight then I'm happy to. > Why would it be necessary to make distinctions below? So it doesn't imply that the SYSTEMFOLDERS are related to the location of the PROFILE (if using a custom profile). Alternatively rename PROFILE to PROFILEDEF or something so that it is clear that we're always talking about the profile.ijs in the folder containing the JFE. I'm also wondering whether, despite the fact I'd have to watch out when upgrading, I'd be better just editing the default profile.ijs, to point to the location of my user folders. > > --- "Sherlock, Ric" <[EMAIL PROTECTED]> wrote: > > > I just wanted to comment features of the default profile.ijs that I > > have found confusing. > > > > In the default profile.ijs, one of the first things done is > to set the > > noun PROFILE_z_ to be the pathname of the default > profile.ijs if it is > > not already defined. My current thinking is that if you > were using a > > custom profile (via -jprofile on the command line) then PROFILE_z_ > > should be set before the line. > > > > if. notdef 'PROFILE' do. PROFILE_z_=: 1!:45'' end. > > > > However later parts of profile.ijs (where the folder portion of > > PROFILE is then used as a proxy for "the base folder of the J > > installation") suggest to me that the idea is that PROFILE should > > always point to the the default profile, whether a custom > profile was > > used or not. If so perhaps a better name would be > PROFILEDEFAULT or PROFDEF or similar. > > > > If in fact the idea is that PROFILE should point to the > profile used > > when J was started, perhaps this would be a useful change > to the first > > part of the script? (In other words if - > > > > NB. ========================================================= > > NB. various global definitions > > 3 : 0 '' > > notdef=. 0: ~: 4!:0 @ < > > if. notdef 'ARGV' do. ARGV_z_=: ,<'undefined' > > elseif. (<'-jprofile') e. ARGV do. > > PROFILE_z_=: (>:ARGV i. <'-jprofile'){:: ARGV end. > > if. notdef 'PROFILE' do. PROFILE_z_=: 1!:45'' end. > > PATHSEP_j_=: '/\'{~6=9!:12'' > > jhostpath_z_=: PATHSEP_j_ & (I. @ (e.&'/\')@] }) '' > > ) > > > > Again assuming that PROFILE should point to the profile used when > > starting the current J session, then it may be more transparent to > > assign the system folders like this: > > > > NB. ========================================================= > > NB. create SYSTEMFOLDERS > > NB. the entry for binary is added in boot.ijs sep=. PATHSEP_j_ > > prf=. PROFILE {.~ PROFILE i: sep > > bin=. (1!:45'') {.~ (1!:45'') i: sep > > add=. bin,sep,'addons' > > sys=. bin,sep,'system' > > tmp=. bin,sep,'temp' > > usr=. bin,sep,'user' > > cfg=. usr,sep,'config' > > hlp=. sys,sep,'extras',sep,'help' > > hom=. (0&e. { ;&prf) 2!:5 'HOME' > > ids=. ;: 'profile system addons temp user config help home' > > SYSTEMFOLDERS_j_=: ids ,. prf;sys;add;tmp;usr;cfg;hlp;hom > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
