home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 March / PCO3_97.ISO / filesbbs / os2 / lartb307.arj / INSTALL.CMD < prev    next >
Encoding:
Text File  |  1996-12-24  |  5.8 KB  |  195 lines

  1. /*
  2.  * WORKLab System Solutions, Krebber, 1996
  3.  *
  4.  * installation & setup of LOGOART
  5.  *
  6.  * usage:   install [<drive>] [<target_directory>]
  7.  *
  8.  * The installation procedure does the following :
  9.  *  1) copies all source files in the installation disk to the
  10.  *     indicated target-directory
  11.  *  2) generates the target-directory if not already there (if
  12.  *     already there files with same names will be replaced..)
  13.  *  3) creates WPS folder and objects for sample art-files and
  14.  *     executable.
  15.  *
  16.  *  ===> to install to the current directory enter
  17.  *  ===>    install . .
  18.  *
  19.  *  NOTE: this procedure does no modifications to the config.sys.
  20.  *        The user.ini file is updated to hold information about
  21.  *        "art"-type files.
  22.  *
  23.  *        Also notice that the installation disk must be named "LOGOART".
  24.  *       
  25.  *        If you have downloaded LARTB30.ZIP from a mailbox, then
  26.  *        please unzip the file *once* and copy the files to a diskette before
  27.  *        proceeding with the installation.
  28.  *
  29.  */
  30.  
  31. version     = "LARTB30"
  32. version_short = " B30"
  33. bin_pack    = "ARTB307.ZIP"
  34. clip_pack   = "CLIPART.ZIP"
  35. bitmap_pack   = "BITMAP.ZIP"
  36.  
  37. hyellow  ='A'
  38. hwhite   ='A'
  39. nline    = "0D0A"x                                        /* new line */
  40.  
  41. /*----------------------------------------------------------------------*/
  42. /* start of code                                                        */
  43. /*----------------------------------------------------------------------*/
  44.  
  45. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  46. call sysloadfuncs
  47.  
  48. say nline hyellow
  49. say "LOGOART Installation (V."||version||")"nline
  50. parse arg source target
  51. say hwhite
  52. call notes
  53.  
  54. if source = "-h" then call usage;
  55.  
  56. /*----------------------------------------------------------------------*/
  57. /* resolve source and target                                            */
  58. /*----------------------------------------------------------------------*/
  59. if source= "" then do
  60.    source = "A:"
  61.    target = "C:\"||version;
  62. end  
  63. if target = "" then target = "C:\"||version;  
  64. if source="." then source = directory();
  65. if target="." then target = directory();
  66.  
  67. say "Installing from ["||source ||"] to ["||target||"]."
  68. say "Target will be created if needed. Continue ? (Y/N)";
  69. pull cont
  70. if cont \= 'Y' then call abort;
  71.  
  72. /*----------------------------------------------------------------------*/
  73. /* create target directory and copy files                               */
  74. /*----------------------------------------------------------------------*/
  75.  
  76. /* check source */
  77. if source="a:" | source="b:" then do
  78. name = right(SysDriveInfo(source), 15)
  79. say name
  80.    if strip(name, B, " ") \="LOGOART" then do
  81.       say "drive not ready or not LOGOART Installation-Disk in drive".
  82.       call abort;
  83.    end
  84. end
  85.  
  86. /* check target and copy files */
  87. "@echo off"
  88. if target \= source then do
  89.    rc = SysMkDir(target);
  90.    if rc > 0 & rc \=5 then do
  91.       say "could not create" target;
  92.       call abort;
  93.    end  /* Do */
  94.  
  95.    if rc = 5 then do
  96.       say target "already exists. Overwrite files ? (Y/N)";
  97.       pull cont;
  98.       if cont \= 'Y' then call abort;
  99.    end /* do */
  100.  
  101.    say "copying files ..";
  102.    "copy " source||"\*" target;
  103. end
  104. source=source||"\"
  105.  
  106. /* make directory for cliparts */
  107. call directory target 
  108. rc = SysMkDir("CLIPART");
  109. rc = SysMkDir("BITMAP");
  110.  
  111. "move" clip_pack "clipart"
  112. "move" bitmap_pack "bitmap"
  113. "@echo on"
  114.  
  115. say "unzip in progress..";
  116. /* BIN */
  117. "unzip" bin_pack
  118. "del" bin_pack
  119. /* CLIPART */
  120. call directory target||"\clipart" 
  121. "..\unzip" clip_pack
  122. "del" clip_pack
  123. /* BITMAP */
  124. call directory target||"\bitmap" 
  125. "..\unzip" bitmap_pack
  126. "del" bitmap_pack
  127.  
  128. call directory target 
  129.  
  130. /* make WPS objects */
  131. call makefldr version_short no_wait
  132.  
  133. /*----------------------------------------------------------------------*/
  134. /* create program objects on WPS-Desktop                                 */
  135. /*----------------------------------------------------------------------*/
  136.  
  137. say hyellow
  138. say "*** LOGOART installation ended. ***";
  139. say hwhite
  140. exit;
  141.  
  142.  
  143. notes:
  144. n.0=""
  145. n.1="The installation procedure does the following :"
  146. n.2=" 1) copies all source files in the installation disk to the"
  147. n.3="    indicated target-directory"
  148. n.4=" 2) generates the target-directory if not already there (if"
  149. n.5="    already there files with same names will be replaced..)"
  150. n.6=" 3) creates WPS folder and objects for sample art-files and"
  151. n.7="    executable."
  152. n.8=""
  153. n.9=" NOTE: this procedure does not modify the config.sys."
  154. n.10="       The user.ini file is updated to hold information about"
  155. n.11="       "art"-type files."
  156. n.12=""
  157. n.13="       If you have downloaded LARTB307 from a mailbox, then"
  158. n.14="       please unzip it *once* and copy the files to a diskette before"
  159. n.15="       proceeding with the installation."
  160. n.16="       Also notice that the installation disk must be named "LOGOART"."
  161. n.17=""
  162. n.18="===> to install to the current directory enter"
  163. n.19="===>    install . ."
  164. n.20=""
  165. n.21="Press enter to continue"
  166.  
  167. do i=0 to 21
  168.    say n.i;
  169. end 
  170. pull
  171. return;
  172.  
  173. /*----------------------------------------------------------------------*/
  174. /* abort                                                                */
  175. /*----------------------------------------------------------------------*/
  176. abort:
  177. say hyellow
  178. say "*** LOGOART installation aborted. ***"
  179. say hwhite
  180.  
  181. /*----------------------------------------------------------------------*/
  182. /* usage                                                                */
  183. /*----------------------------------------------------------------------*/
  184. usage:
  185. u.0 = ""
  186. u.1 = "usage:  install [<source-drive>] [<target_path>]";
  187. u.2 = "";
  188. u.3 = "The installation disk must be named 'LOGOART' ";
  189.  
  190. do i=0 to 3
  191.    say u.i;
  192. end /* do */
  193. exit;
  194.  
  195.