My solution, after a couple hour's digging and reading and experimenting, appears at the end, after my original quoted message.

On at Wed, 19 Mar 2008 23:46:32 -0400, Murray Eisenberg wrote:

The J602 installer for Windows offers three choices none of which is what I want: I want to install for all users, but NOT in c:\Program Files. The best I could do was to install as a single user and to select the program installation directory I wanted, D:\Language\j602\bin\j.exe.

But I do NOT want to keep any user files in

C:\[user]\j602-user

but rather inside the the single Juser directory that I want to specify, just like I always have before (with recent releases) by means of suitable configuration files include a profile.ijs -- see below.

I note that the installer did create C:\[user]\j602-user but except for 4 empty subdirectories, that directory is completely empty.

The J program shortcut I use has target

D:\Language\j602\bin\j.exe -jprofile d:\language\Juser\config6\myprofile.ijs

and starts in the installation directory, d:\language\j602.

The myprofile.ijs referred to above includes:

   NB. create SYSTEMFOLDERS
   NB. the entry for binary is added in boot.ijs
   sep=. PATHSEP_j_
   prf=. PROFILE {.~ PROFILE i: sep
   add=. 'd:\language\Jaddons'
   sys=. prf,sep,'system'
   tmp=. 2!:5'JHOME'
   usr=. 'd:\language\Juser'
   cfg=. 'd:\language\Juser\config6'
   hlp=. sys,sep,'extras',sep,'help'
   hom=. (0&e. { ;&prf) 2!:5 'JHOME'
   ids=. ;: 'profile system addons temp user config help home'
   SYSTEMFOLDERS_j_=: ids ,. prf;sys;add;tmp;usr;cfg;hlp;hom

And the version of startup.ijs in that same d:\language\Juser\config6 includes:

   NB. Provide global for environment var JHOME
   HOME_z_=: (2!:5'JHOME'),'\'
   TEMP_j_=: (2!:5'JHOME')

This startup.ijs is what referred to in the entry

   STARTUP=: 'd:\language\Juser\config6\startup.ijs'

in d:\language\Juser\config6\config.ijs.

When I try to start the program using the shortcut as modified, I get error message: "Error and no IDE window for debugging.

What's wrong and how can it be fixed?

SOLUTION

I offer this in the hope that it might save other users a bit of grief in upgrading from J601 to J602 in case they, like me, insist upon a strict separate of the Windows system drive, J program files, and J user files. This is for Windows (XP), but similar methods may work with other platforms.

1. Create Windows environment variables:

   system variable:  JHOME  [path for temporary files]
                     for me, this is e:\JTemp

   user variable:    JUSERPROFILE   [path for the user profile]
                     for me, this is D:\Language\Juser

The idea is: (a) to keep all the user-specific script files of some permanence in a location separate from the J install directory (of course) and yet not in the user's C:\Documents and Settings directory; keep stuff associated with Windows itself on one drive (actually, partition), and stuff related to programs on another drive; and (b) keep temporary files on a separate data drive from where more permanent user script files are kept.

2. Create directories named in those two variables, of course.

3. Create subdirectory config602 of the directory named in JUSERPROFILE.

4. Copy profile.ijs to that config602 directory from ~bin, rename it myprofile.ijs (for example), and modify the myprofile.ijs as follows: change the line

  home=. >(systype-5){(2!:5'HOME');(2!:5'USERPROFILE');'\My Documents'

to:

  home=. >(systype-5){(2!:5'HOME');(2!:5'JUSERPROFILE');'\My Documents'
                                         ^

That's the crucial step, so that (under Windows) it's the Windows user environment variable JUSERPROFILE that gets read rather than the Windows-provided variable USERPROFILE (which points to
c:\Document and Settings\[username]).

For other platforms, that original line in profile.ijs has to be changed accordingly. For example, for Unix, which has systype value 5, it's the variable HOME that would need to be changed.

5. Copy ~bin\profilex_template.ijs to ~\bin\profilex.ijs (as that template file suggests) and edit it to change some folder locations, e.g.:

   NB. user=.   home,userx   NB. profile default - edit to change
   user=.   2!:5'JUSERPROFILE'
   temp=.   2!:5'JHOME'
   config=. user,'\config602'

6. [optional] Create in the config602 subdirectory of the JUSERPROFILE target a file startup.ijs that loads packages you typically use and builds additional shortcuts for script names, e.g.:

   buildpublic_j_ 0 : 0
   ws        ~user\ws
   myutil    ~user\myutil
   )

7. Change the shortcut that starts j.exe so that its target is now something like the following (which should be on one line):

   D:\Language\j602\bin\j.exe -jprofile
       d:\language\Juser\config602\myprofile.ijs

There's one slight annoyance remaining: the file profilex.ijs MUST be kept in ~system\bin, it seems -- at least if one redefines "config" there!

It is alleged that profilex.ijs "is not replaced by installs/updates". Still, it would be nice to be able to keep it someplace else, such as in one's user config directory -- but this seems impossible.



--
Murray Eisenberg                     [EMAIL PROTECTED]
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to