[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: generalized startup.int



Reply to note from  Fri, 01 Nov 2002
15:27:54 -0500

> Forgive the basic question but...what does one do with
> portable.int, run it as a U2 routine on the new machine?

A basic question, but also a reasonable one. Especially since, on
rereading PORTABLE.INT, I see that the instructions are more or less
unintellible. I've rewritten it with what I hope are clearer
instructions; anyone interested should download the file again at
http://users.datarealm.com/ammaze/xfer/portable.zip.

No, it's not a U2 routine. It's a template for a STARTUP.INT that's
designed to make XyWrite "portable". The key is that STARTUP.INT no
longer "hard-codes" the path to the various customization files that
are loaded on startup. Instead, before loading any files, it grabs
the path to EDITOR.EXE from a XyWrite system variable () and
makes that directory the *current directory*. That done, the LOAD
commands can safely omit the path and refer to filenames only (LOAD
MY.KBD instead of LOAD C:\XY4\MY.KBD). This, in turn, makes it
possible to move XyWrite from one machine to another by copying
EDITOR's directory and any subdirectories to the new location,
instead of (horrors!) re-installing every time. The new location
can have any drive letter and directory name you like: startup no
longer depends on a predetermined path to EDITOR.EXE.

For this to work, you've got to rid SETTINGS.DFL of default settings
that refer to paths (because in SETTINGS.DFL, paths have to be hard-
coded and hard-coded paths undermine portability), and set those
defaults in STARTUP.INT instead. You also have to deal with the
PP:# table, the section of SETTINGS.DFL that associates a printer
file with each installed printer. PORTABLE.INT provides
instructions and a canned procedure for doing this (using code I
cribbed from Robert Holmgren). All you, the user, have to do is
edit PORTABLE.INT so that it correctly states the filenames and
settings your setup requires. (You'll also need to comment out the
parts of SETTINGS.DFL that PORTABLE.INT supersedes.) After
debugging, rename PORTABLE.INT to STARTUP.INT, and you're on your
way.

Read the new file and see if it makes sense. If it's still opaque,
zip up your STARTUP.INT and send it to me privately. I'll ship a
"portable" version back to you.

XPLeNCODE v2.0
b-gin [UNTITLED]
;*; PORTABLE.INT -- CLD rev. 11/1/02[cr|lf];*; Template for a
 "pathless" STARTUP.INT, enabling a _portable_[cr|lf];*; XyWr
ite setup that can be moved from one computer to another[cr|l
f];*; simply by copying the program files (including all subd
irectories)[cr|lf];*; to the new disk, thus avoiding a labori
ous re-install[cr|lf];*; ------------------------------------
------------------------------[cr|lf];*;[cr|lf];*; General In
structions:[cr|lf];*; 1) Back up your current STARTUP.INT![cr
|lf];*; 2) Edit this file as necessary (see specific instruct
ions below).[cr|lf];*; 3) RUN PORTABLE.INT (this file) to deb
ug.[cr|lf];*; 4) When debugged, save this file as STARTUP.INT
[cr|lf];*;   (XWSTART.INT in XyWin).[cr|lf];*; 5) Quit and{032}
restart XyWrite.[cr|lf];*;[cr|lf];*; Critical Assumption:[cr|
lf];*; _All_ XyWrite program and customization files are loca
ted either[cr|lf];*; in the directory that contains {<}VA$ED{
>}[cr|lf];*; or in a subdirectory of that directory.[cr|lf];*
;[cr|lf];*; -----[cr|lf];*; Do not modify this section (down{032}
to "^^^^^^^^^^").[cr|lf];*; This code switches to the directo
ry with {<}VA$ED{>};[cr|lf];*; the directory name (minus the{032}
final "\") is saved to Save/Get 01.[cr|lf];*; Save/Get 01 is{032}
used below ("{<}PV01{>}") to point to that directory[cr|lf];*
; and its subdirectories[cr|lf]{<}SV01,{>}{<}SX02,{<}VA$ED{>}
{>}{<}SV03,\{>}{<}LBa{>}{<}XS02,03,04,,05{>}{<}IF{<}VA|01{>}>
0{>}{<}SX01,{<}IS01{>}+"\"{>}{<}EI{>}{<}SX01,{<}IS01{>}+{<}IS
04{>}{>}{<}IF{<}IS05{>}{240}"\"{>}{<}SX02,{<}IS05{>}{>}{<}GLa
{>}{<}EI{>}{<}SX02,{<}VA@01:1{>}{>}[BX_]{<}PV02{>}:[Q2_][BX_]
wait[Q2_][BX_]cd {<}PV01{>}[Q2_][BX_]wait[Q2_];*;[cr|lf];*; ^
^^^^^^^^^[cr|lf];*; Logon: Edit username (8 letters max., no{032}
spaces)[cr|lf][BX_]logon username[Q2_];*;[cr|lf];*;[cr|lf];*;
 Do not modify this section (Logon failsafe)[cr|lf]{<}IF{<}ER
{>}{>}{<}SV02,NONAME{>}{<}SX03,"{<}PRLogged on with user
name """+{<}IS02{>}+"""{>}{<}EX{>}{>}[BX_]sa %03,{<}PV02{>}.L
OG[Q2_][BX_]wait[Q2_][BX_]logon {<}PV02{>}[Q2_]{<}EI{>};*;[cr
|lf];*;[cr|lf];*; LOAD commands (edit filenames as necessary;
 omit paths!):[cr|lf];*; Disable (prepend ";*;" to) inapplica
ble commands[cr|lf][BX_]load settings.dfl[Q2_];*; Settings fi
le[cr|lf][BX_]load my.kbd[Q2_][BX_]wait[Q2_];*; Keyboard file
[cr|lf][BX_]ldsgt my.sgt[Q2_];*; Save/Get file[cr|lf][BX_]loa
d xy4.mnu+xy4.dlg[Q2_][BX_]wait[Q2_];*; MeNU and DiaLoG files
[cr|lf][BX_]load xy4.hlp[Q2_][BX_]wait[Q2_];*; HeLP file[cr|l
f];*;[BX_]load xywwweb.u2[Q2_][BX_]wait[Q2_];*; U2 file[cr|lf
][BX_]load dict.hyp[Q2_];*; Hyphenation dictionary[cr|lf][BX_
]load pers.spl[Q2_][BX_]wait[Q2_];*; Personal spelling file[c
r|lf];*;[BX_]load dict.spl[Q2_][BX_]wait[Q2_];*; Spelling dic
tionary (optional)[cr|lf];*;[cr|lf][BX_]dsort d,r[Q2_];*; DIR
ectory Sort order (edit parameters to taste)[cr|lf];*;[cr|lf]
;*; Default paths (moved here from SETTINGS.DFL)[cr|lf];*; Ed
it as necessary (but do not "hard-code" paths,[cr|lf];*;  an
d do not overwrite Save/Get 01!)[cr|lf];*; Examples:[cr|lf];*
; Bad : [BX_]d AOP={<}SX01,{<}VADR{>}{>}{<}PV01{>}[Q2_];*; Ov
erwrites S/G 01![cr|lf];*; Bad : [BX_]d AOP=C:\XY4\TEMP[Q2_];
*; Hard-codes "C:\XY4\TEMP"[cr|lf];*; Good: [BX_]d AOP={<}SX0
2,{<}VADR{>}{>}{<}PV02{>}[Q2_];*;[cr|lf];*; Delete or ;;;;dis
able the corresponding lines in SETTINGS.DFL[cr|lf][BX_]d DR=
{<}PV01{>}\[Q2_];*; Directory for TeMP files[cr|lf][BX_]d AOP
={<}PV01{>}\[Q2_];*; Autosave path[cr|lf][BX_]d AOT=3,15[Q2_]
;*; Autosave time settings[cr|lf][BX_]d GP={<}PV01{>}\[Q2_];*
; Graphics path[cr|lf][BX_]d NL={<}PV01{>}\[Q2_];*; Network l
og files[cr|lf][BX_]d OL={<}PV01{>}\BTFONTS\[Q2_];*; Outline{032}
screen fonts[cr|lf][BX_]d WW={<}PV01{>}\FILTERS\[Q2_];*; Conv
ersion filters[cr|lf][BX_]d XY={<}PV01{>}\BTFONTS\[Q2_];*; Lo
cation of SCRFONTS.BIN[cr|lf];*;[cr|lf];*; Paths Used by XY4{032}
Menu|DiaLoG files[cr|lf];*;  (moved he
re from SETTINGS.DFL)[cr|lf];*; Edit as necessary (but do not
 "hard-code" paths,[cr|lf];*;  and do not overwrite Save/Get
 01!)[cr|lf];*; Delete or ;;;;disable the corresponding lines
 in SETTINGS.DFL[cr|lf][BX_]d/nv SG1900={<}PV01{>}\DOCS\[Q2_]
;*;[cr|lf][BX_]d/nv SG1906={<}PV01{>}\[Q2_];*;[cr|lf][BX_]d/n
v SG1908={<}PV01{>}\[Q2_];*;[cr|lf];*;[cr|lf];*; Printer (PP:
) table (moved here from SETTINGS.DFL)[cr|lf];*; Edit PP: num
ber and edit, add or delete printer filename(s)[cr|lf];*;  a
nd descriptions below[cr|lf];*; Delete or ;;;;disable the cor
responding lines in SETTINGS.DFL[cr|lf];*; Use eXPanded view{032}
to edit this section![cr|lf];*;[cr|lf]{<}SX02,";PR;[cr|lf];[c
r|lf]PP:2[cr|lf]; |_PP: number = the number of printer files
 listed below[cr|lf]; Format is:[cr|lf]; Port{tab}Printer fil
ename{tab}Description[cr|lf]1{tab}"+{<}IS01{>}+"\HPDJ660C.PRN
{tab}HP DeskJet or compatible printer[cr|lf]1{tab}"+{<}IS01{>
}+"\XYWBMAIL.PRN{tab}XyWWWeb Mail Formatter[cr|lf];[cr|lf]"{>
};*;[cr|lf];*; Do not modify the next 2 lines![cr|lf][BX_]exi
st PP.PRN[Q2_]{<}IF@NOT({<}ER{>}){>}[BX_]ernv PP.PRN[Q2_][BX_
]wait[Q2_]{<}EI{>};*;[cr|lf][BX_]sa %02,PP.PRN[Q2_][BX_]wait[
Q2_][BX_]load PP.PRN[Q2_][BX_]wait[Q2_];*;[cr|lf];*;[cr|lf][B
X_]setp 1[Q2_][BX_]wait[Q2_];*;[cr|lf];*;[cr|lf]{<}EX{>}[cr|l
f]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/