You see, I build my own installer and silently install the whole C:\J504
(yap ... I'm still 504) directory, register the J.EXE and create the
windows shortcut to J.EXE.

In creating an installer, I found out that the following entries in
C:\j504\user\config\config.ijs must also be modified to point to the
correct location:
STARTUP=: 'c:\j504\user\config\startup.ijs'
USERFOLDERS=: 0 : 0
EOE D:\Projects\SmartEOE\eoe\source
JLIBSRV D:\Projects\EOE\JLibrary\jlibsrv\source
JLIBCLN D:\Projects\EOE\JLibrary\jlibcln\source
System c:\j504\system
Projects c:\j504\user\projects
User c:\j504\user
Classes c:\j504\system\classes
Examples c:\j504\system\examples
Extras c:\j504\system\extras
Help c:\j504\system\extras\help
Main c:\j504\system\main
Packages c:\j504\system\packages
Phrases c:\j504\system\examples\phrases
JLibrary D:\projects\JLibrary\source
JSQLite D:\projects\JSQLite\source
ISTSYS850 D:\Projects\FGA4\ISTSYS850\SOURCE
JCL D:\projects\jxde\jcl\source
JSV D:\projects\jxde\jsv\source
JOLAP D:\projects\JOLAP
JiSQL D:\projects\jxde\jisql\source
eeTrack D:\projects\jxde\eeTrack\source
JLibOld D:\projects\JLibrary_20040419\source
)

With the current zip file only distribution ... updating the directories
would not work. But a small J script can be created that would update
the directories on startup though. ;)

Just my 20 pesos.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Devon McCormick
Sent: Wednesday, August 23, 2006 9:45 AM
To: [email protected]
Subject: [Jbeta] Thoughts on installing J in "C:\Program Files\"

When I first started using version 6.01, I experimented with installing
it
under the standard Windows location for software location "C:\Program
Files\"
in spite of having been told there's still problems with this.  I want
to be

able to do this so J can fit in better with the other children in spite
of
her special abilities.

It mostly worked, with a couple of small tweaks to "xlutil.ijs" in
~system\examples\ole\excel:

1) I changed the "JMACRO" definition to be
JMACROS=: '"',~'"',jpath '~system\examples\ole\excel\jmacros.xls'
because path names with embedded spaces need to be surrounded by
double-quotes.

2) I changed the line, in "xlutil.ijs", from
  if. 0 = 1!:4 :: 0: <JMACROS do.
to
  if. 0 = 1!:4 :: 0: <JMACROS-.'"' do.
because the double-quotes apparently confuse "1!:4 :: 0:"; this
confusion also subverts "fexist".

3) Finally, and it took a fair amount of debugging to figure this
out, I changed the line in "xljmacro" from
   jm=. JMACROS }.~ >: JMACROS i: PATHSEP_j_
to
   jm=. '"'-.~JMACROS }.~ >: JMACROS i: PATHSEP_j_

So, my initial fix causes 2 errors.  Since the double quotes are needed
only for the opening of the spreadsheet, perhaps the change should be
to all instances of "wb open", e.g. change the line in "xlopen" from
   wd 'olemethod xl wb open ',JMACROS
to
   wd 'olemethod xl wb open ','"',JMACROS,'"'

A search for other instances of "wb open" turns up two other sites
in which this change should be made:
xldemo.ijs: xlcmd 'wb open ',DEMOFILE
xlextract.ijs: xlcmd 'wb open ',flnm                NB. Open workbook

A look at these two pieces of code reveals that the latter already
has my fingerprints on it from an earlier fix dealing with this same
problem.  That is, it's already fixed, perhaps in a better fashion,
by a line preceding the above:

   flnm=. quoteIfSp flnm

where

quoteIfSp=: 3 : 0
NB.* quoteIfSp: surround name with '"'s if embedded spaces
ifsp=. '"'#~' ' e. y
flnm=. ifsp,(y-.'"'),ifsp
)

which could be rendered tacitly as
quoteIfSp=: ((]-.&'"') (] , ,) '"' #~ ' ' e. ])

This subfunction would be appropriately placed in "xlutil.ijs" as
this is included by the other two files.  The result might look like
this:

NB.* quoteIfSp: surround name with '"'s if embedded spaces
quoteIfSp=: ((]-.&'"') (] , ,) '"' #~ ' ' e. ])
quoteIfSp_test_=: 3 : 0
   ans=. '"one space"';'NOSPACE';'"Spaces but already quoted"'
   assert. ans-:quoteIfSp&.>'one space';'NOSPACE';'"Spaces but already
quoted"'
)

I've gone ahead and made these changes in my own copy.
Perhaps they can be added to the distribution?

Devon

-- 
Devon McCormick
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to