Author Topic: Accelerated Installs  (Read 8705 times)

Wendy Krieger

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Accelerated Installs
« on: October 08, 2021, 01:46:28 pm »
The current project is Accelerated Installs.

The idea is to reduce the time from a clean install of the OS to full working order.  While one can use something like Ghost or pre-installed zip files, I desired to have a fair bit of flexibility in this.  A lot of this is cross-platform, the ideas from one source copied to another.  Some of this stuff dates back to 1992.

The bulk of programs are either copied pre-installed, or pre-registered.  This means, for example, inserting the registry keys in before installing the program.  PMView, Larsen CMD, File Commander/2 work like that.  Strategically placing parts of the INI file work for GSView, Smartsuite 1.73.  4OS2, EFComm and OS2CMD already have their reg keys in the install.

Lotus Smartsuite 1,73

The slipstream was successful, so it installs on one run.  There is a version 1.60 + update on the eCS 1.0 disk.

Graham Utilities. 2.10

This involves a service pack, but the install can be streamlined somewhat.  The idea is to modify the eCS 1.0 install version to handle this without having to reboot.

TinyEdit and QEdit. 

These look for supplemental files in a hard-coded directory or the current directory.  Without the hard-code, T and T2 will try to open Thelp in the current directory.  Reconfigured to use c:\use\thelp.  Likewise Q dos and os2 look for spell-check in a hard-code directory.

Cmd2exe and Bat2com

These are variously OS/2 and DOS programs that produce a loader for programs, so that you don't have to modify config.sys or autoexec,bat and keep the program off-path.  Bat2com from Foley Hitec "Turbobat", which seems to work under HPFS.  (the pc-mag one doesn't). 

4OS2, Tcmdos2, Pmview, filejet, jetcmd, volkov commander, boxer, and lucide all work under this.  jetcmd and filejet can have their environment variables set in the loader.  boxer is DOS, OS/2, TKO and EZ versions.  FC/2 can be off-path, as long as you load it from an on-path file (eg fcw),

There is a Windows proggie of this name (Jim Lawless, 'com2exe'), but it allows includes of other files on top of just a batch compiler.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Accelerated Installs
« Reply #1 on: October 08, 2021, 03:35:35 pm »
Hi Wendy. Welcome to the forum.

What are you using to slipstream software to the eCS installer? We used to have UpdCD. Are you using it?, by hand? or created something else?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1073
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: Accelerated Installs
« Reply #2 on: October 08, 2021, 03:45:41 pm »
All of Blonde Guy computers have their software installed in this way. I wrote Suntan Special to do the job. I have over 700 objects I can install.

http://www.blondeguy.com/suntan6.html
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5098
  • Karma: +117/-1
    • View Profile
Re: Accelerated Installs
« Reply #3 on: October 09, 2021, 12:32:54 am »
For a loader, I just use a cmd file to set all the environment variables, usually a minimum of PATH and BEGINLIBPATH and maybe LIBPATHSTRICT as well as any other needed ones with things like compilers needing quite a few environment variables. Then you can put the cmd files in the PATH, create a program object or remember where they are.

Wendy Krieger

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: Accelerated Installs
« Reply #4 on: October 09, 2021, 09:57:34 am »
Most of the installs are handled by rexx scripts or batch files after the files are copied.

Service packs are integrated if the install consists of loose files.  Nothing is done to packages, either pack2 or wpi. 

There is some 'copy over' stuff.  For example, \os2\mdos\basica.com is copied over with a functional one.  Qbasic.exe is updated to the final IBM release of this.  The ones in 5.02 and the update are later than the OS/2 one, which is the first of the non-linked versions.

When you modify the DOS path from c:\os2;c:\os2\mdos;... to c:\os2\mdos;c:\os2;  you can install the DOS E Editor in there and use it under OS/2.  As with OS/2 PPC, you can have rexx.exe in there.  The 7.00 version does not like OS/2, but the 7.01 (2000) version is quite fine under OS/2.

For a DOS/OS2 history see http://www.os2fan2.com/files/pcdos.pdf

os2fan2.com is my website.  The two big files there (polygloss and metgloss), are maintained in a markup language that is written in REXX.

Wendy Krieger

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: Accelerated Installs
« Reply #5 on: October 09, 2021, 12:47:12 pm »
This is the sort of utility i use in AI's,  It's a distribution of keys before or after the progs are installed.

This is the output batch.

Code: [Select]
@echo off
echo key for Zippy
copy zippy.key c:\programs\zippy

The second !loop command says which letters to process.  These can be anything, but because we only wanted to move the zippy.key to its proper place, we used only 'r' here.

Code: [Select]
extproc regina.exe rxloop.rex

$set
P=c:\programs
S=c:\os2
L=c:\lotusw4
W=c:\os2\mdos\winos2
$end

$data $nkp
r,Zippy    ,zippy.key,$P\zippy
g,GSview   ,gvpm.ini,$S,
g,Dragtext ,drgtxt39.ini,$P\drgtxt39
g,Amipro   ,amiuser3.ini,$S
g,Lotus SS ,suit.ri,$L
$end

$new distkey.cmd
@echo off
$loop *
echo key for $n
copy $k $p
$loop r
$end

This is RxLoop.  We run it under Regina. rather than SAA, because the former is ANSI complient, and can be run as an application.  You see it's woven from zloop.cmd.  Looking at this shows the specs as implemented for the program, and the bits and pieces of proggie in random order.  At some point, we pull the bits together and make rxloop.rex,

Code: [Select]
/* Woven from zloop.cmd by Wendy Krieger on 20041206 at 22:45:27 */
/*~ Rexx Looping Utility */
numeric digits 30
parse arg infile .
tokens = '$1234567890abcdefghijklmnopqrstuvwxyz'
outfile = ''; print = 0;
call stream infile, 'c', 'open read'
do while lines(infile) ; output = 1; incard = linein(infile)
if left(incard,1) = '$' then call cmdline
if output then call printline; end
call stream infile, 'c', 'close'
exit
cmdline: ; output = 0; parse var incard cmdx tail
select
  when cmdx = '$rem' then output=0
  when cmdx = '$data' then call datacmd
  when cmdx = '$new' then call newcmd
  when cmdx = '$end' then call endcmd
  when cmdx = '$set' then call setcmd
  when cmdx = '$var' then call setvar
  when cmdx = '$loop' then call loopcmd
  when cmdx = '$.' then call lit
  otherwise; output = 1; end
return
lit: ; incard = tail; output = 1; return
printline: ; select;
  when print = 0 then nop
  when print = 1 then call dataact
  when print = 2 then call newact
  when print = 3 then call loopact
  when print = 4 then call setact
  otherwise; nop; end
return
datacmd: ; print = 1; rows = 0;  parse var tail t0 . ;
if left(t0,1)='$' then tokens = t0 ; return
dataact: ; rows = rows + 1; data.rows = incard; return
newcmd: ; print = 2; parse var tail nfile . ; select;
 when nfile = '' then nop;
 when nfile = '*' then nop;
 otherwise;
 call stream outfile, 'c', 'close'; outfile = nfile
 say 'writing' outfile
 call stream outfile, 'c', 'open write replace' ; end
return
newact: ; call lineout outfile, incard; return
setcmd: ; print = 4; kchar = ''; sets. = '$' ; return
setact: ; parse var incard 1 t0 2 t2 3 incard (t2) . ;
if pos(t0, kchar) = 0 then kchar = kchar || t0; t1 = pos(t0, kchar)
sets.t1 = incard; return
setvar: ; thiscard = tail; incard = ''
do forever; parse var thiscard t1 '$' thiscard; incard = incard || t1
parse var thiscard 1 mk 2 thiscard; fld = pos(mk,kchar);
select ; when mk = '' then nop
  when fld > 0 then incard = incard  || sets.fld ;
  otherwise;  incard = incard || '$' || mk ; end
if thiscard = '' then leave ; end
call lineout outfile, incard; return
loopact: ; srcs = srcs + 1; text.srcs = incard ; return
loopcmd: ; select;
  when print = 2 then call loopstart
  when print = 3 then call loopend
  otherwise; nop; end; return
loopstart: ; srcs = 0; print = 3; return
loopend: ; print = 2; parse var tail flags .
do row=1 to rows; rowdata = data.row;
if pos(left(rowdata, 1), flags) = 0 then iterate
parse var rowdata 1 . 2 div 3 rowdata ; incard = ''
fld = 0; field. = '' ; t0 = 0; field.t0 = '$' ;
do forever; fld = fld + 1; parse var rowdata t0 (div) rowdata
field.fld = t0 ; if rowdata = '' then leave; end
do src = 1 to srcs ;   thiscard = text.src ; incard = ''
do forever; parse var thiscard t1 '$' thiscard; incard = incard || t1
parse var thiscard 1 mk 2 thiscard; fld = pos(mk,tokens)-1;
select ; when mk = '' then nop
  when fld > -1 then incard = incard  || field.fld ;
  otherwise;  incard = incard || '$' || mk ; end
if thiscard = '' then leave ; end ; thiscard = incard; incard = ''
do forever; parse var thiscard t1 '$' thiscard; incard = incard || t1
parse var thiscard 1 mk 2 thiscard; fld = pos(mk,kchar);
select ; when mk = '' then nop
  when fld > 0 then incard = incard  || sets.fld ;
  otherwise;  incard = incard || '$' || mk ; end
if thiscard = '' then leave ; end
call lineout outfile, incard; end
end; return
endcmd: ; print = 0; parse var tail ; if tail = 'all' then do
  call stream infile, 'c', 'close'
  call stream outfile, 'c', 'close'
  say 'bye'; exit; end
return
endact: nop; return
« Last Edit: October 09, 2021, 12:51:50 pm by Wendy Krieger »

roberto

  • Hero Member
  • *****
  • Posts: 824
  • Karma: +3/-6
    • View Profile
Re: Accelerated Installs
« Reply #6 on: October 09, 2021, 08:00:10 pm »

Wendy Krieger

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: Accelerated Installs
« Reply #7 on: October 10, 2021, 09:26:41 am »
The same url will now work,  Files distributed through forums go into files directory, not the root directory.

Thanks.

Wendy Krieger

  • Newbie
  • *
  • Posts: 45
  • Karma: +6/-0
    • View Profile
Re: Accelerated Installs
« Reply #8 on: November 02, 2021, 02:19:51 pm »
And just when you thought it was safe.  I wrote this sort of code to rename the long file names (which do not go well with vga resolution screen), but version is used to create groups on an OS/2 copy to disk thing.  The created object would be <YF_rexxid>.

The 'help' is a MINDEX style object (like glossary). When you right-click on an object, there would be a help option, which would open the appropriate page in xlink.hlp.  This could be used to launch various things like help files etc for extended reading, but would allow you to answer 'what's this' rather quickly.  This is the 1998 version of it.

Code: [Select]
/* NewApps2.REXX  ver 2.0 */
parse arg options
call rxfuncadd "SysLoadFuncs", "rexxutil", "SysLoadFuncs" ; call SysLoadFuncs
call mkfolders  'YK'    /* The param is the lead */
call appnames
call makeicon
exit

appnames:
call locdir  'char  ,  g:\exe\char'
call locdir  'pm    ,  g:\exe\pm'
call locdir  'tweak ,  g:\exe\tweak'
call locdir  'sc2000,  g:\games\sc2000'
call locdir  'gear,    e:\os2\gear'
call locdir  'galciv,  g:\games\galciv'
call locdir  'desc,    g:\describe'
call locdir  'adobe,   e:\acrobat3\reados2'

icons = 'g:\exe\icon'
call def 'rexxid,   help ,flag, title  , folder,  exename'
call add 'ZTREE,     x1001,   , ZTree  , char  , ztbold.cmd'
call add 'WIN95,     ?0000,   , Win95  ,  pm    , win95.exe'
call add 'UNITNB,    ?0000,   , UnitNb,   pm    , unitnb.exe'
call add 'TCOS2,     ?0000,   , Tcos2  ,  char  , tcmdos2.exe'
call out 'SC2000,    ?0000,   , SC2000 ,  sc2000, sc2000.exe'
call add 'PMCAMERA,  ?0000,   , PMCamera, pm   , pmcamera.exe'
call add 'PMCALC,    ?0000,s  , PMCalc ,  pm   , pmcalc.exe'
call add 'WARPCAB,   x1004,   , PMCab  ,  pm   , warpcab.exe'
call add 'OPTIMISE,  ?0000,   , Optimise, tweak , optimize.exe'
call add 'LIST2,     ?0000,   , List   ,  char  , list2.exe'
call add 'INDEX,     ?0000,i  , Lindex ,  /index, MTABLES'
call add 'JARGON,    ?0000,i  , Jargon ,  /view , int299.inf+1vol299.inf+2vol299.inf+app299.inf'
call add 'GFC,       ?0000,   , Gfc    ,  char  , gfc.exe'
call add 'GEAR     , ?0000,   , Gear   ,  gear  , gearos2.exe'
call out 'GALCIV,    ?0000,   , GalCiv ,  galciv, galciv.exe'
call add 'FILEBAR  , ?0000,   , FileBar,  pm    , filebar.exe'
call add 'EDIT2,     ?0000,   , Edit   ,  char  , edit.exe'
call add 'DOSINFO,   ?0000,si , DOS7   ,  /view;f:\dos70 , doscmd.inf+doserror.inf'
call add 'DLGEDIT,   ?0000,   , DlgEdit,  char  , dlgedit.exe'
call add 'DJLITE,    x1002,   , DjLite ,  char  , djlite.exe'
call add 'FILEGRAF,  x1005,   , DiskGraf, pm    , fgpm.exe'
call out 'DESCRIBE,  ?0000,   , Desc   ,  desc  , describe.exe'
call add 'DMASTER  , x1003,   , DMaster,  pm    , dmaster.exe'
call add 'BLACKBOX,  ?0000,   , Blackbox, tweak , blackbox.exe'
call add 'ACROREAD,  ?0000,   , Acrobat,  adobe , acroread.exe'
return


mkfolders:
parse arg lead
boot=sysbootdrive()
myapp='<'lead'APPS>'
Setup ="BACKGROUND=(none),,,C,8 152 255;OBJECTID="myapp
Call SysCreateObject 'WPFolder','Applets', "<WP_DESKTOP>", Setup ,'u'
return

makeicon:
do nx = 1 to objnr
call getvars objs.nx
setup=defdirs(kfo, kex)
setup=setup || defhelp(khp)
setup=setup || defflags(kfl)
setup=setup || "OBJECTID=<"lead || krx">"
call SysCreateObject objclass, knm, myapp, setup, 'u'
/* say objclass',' knm',' myapp',' setup ', u'  */
end
return

locdir:
parse arg t1
parse var t1 t1 ',' t2
t1 = strip(t1); t2 = strip(t2)
cdir.t1 = t2
return


def:
parse arg s1
objnr = 0
items = 0
objs. = ''
do while s1 \= ''
items = items + 1
parse var s1 s2','s1
  s2 = strip(s2)
  select /* here is where we define available objects */
     when s2 = 'rexxid'  then jrx = items
     when s2 = 'help'    then jhp = items
     when s2 = 'flag'    then jfl = items
     when s2 = 'title'   then jnm = items
     when s2 = 'folder'  then jfo = items
     when s2 = 'exename' then jex = items
     otherwise
       nop
    end
  end
return

out:
parse arg .
return

add:
parse arg objstring
objnr = objnr + 1
objs.objnr = objstring
return

getvars:
parse arg t1
ix. = ''
iy = 0
do while t1 \= ''
  iy = iy + 1
  parse var t1 t2','t1
  ix.iy = strip(t2)
  end
krx = ix.jrx /* rexxid */
khp = ix.jhp /* help */
kfl = ix.jfl /* flag */
knm = ix.jnm /* title */
kfo = ix.jfo /* folder */
kex = ix.jex /* exename */
return

defhelp:
parse arg 1 t1 2 t2
t0 = ''
select
  when t1 = 'x' then t0 = 'XLINK.HLP'
  when t1 = '?' then t0 = ''
  otherwise
    nop
    end
if t0 \= '' then do
  t2 = strip(0 + t2)
  t0 = 'HELPLIBRARY='t0';HELPPANEL='t2';'
  end
return t0

defdirs:
parse arg ifo, iex
parse var ifo ifo';'ifodat
objclass = 'WPProgram'
select
  when ifo = '/view' then do
     if ifodat \= '' then directory = strip(ifodat)
     t0 = 'EXENAME='boot'\OS2\VIEW.EXE;PARAMETERS='iex';'
     end
  when ifo = '/index' then do
     t0 = 'INDEX='iex';'
     objclass = 'Mindex'
     end
  otherwise
  if when cdir.ifo \= '' then do
     directory = cdir.ifo
     t0 = 'EXENAME='directory'\'iex';'
     end
     end
return t0

defflags:
parse arg t1
t0 = ''
do while t1 \= ''
parse var t1 1 t2 2 t1
select
  when t2 = 'i' then t0=t0'ICONFILE='icons'\'krx'.ico;'
  when t2 = 's' then t0=t0'STARTUPDIR='directory';'
  otherwise
    nop
    end
end
return t0