install.com 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. $! INSTALL.COM -- Installs the files in a given directory tree
  2. $!
  3. $! Author: Richard Levitte <richard@levitte.org>
  4. $! Time of creation: 22-MAY-1998 10:13
  5. $!
  6. $! P1 root of the directory tree
  7. $!
  8. $ IF P1 .EQS. ""
  9. $ THEN
  10. $ WRITE SYS$OUTPUT "First argument missing."
  11. $ WRITE SYS$OUTPUT -
  12. "It should be the directory where you want things installed."
  13. $ EXIT
  14. $ ENDIF
  15. $
  16. $ IF (F$GETSYI("CPU").LT.128)
  17. $ THEN
  18. $ ARCH := VAX
  19. $ ELSE
  20. $ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
  21. $ IF (ARCH .EQS. "") THEN ARCH = "UNK"
  22. $ ENDIF
  23. $
  24. $ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
  25. $ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
  26. $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
  27. - "[000000." - "][" - "[" - "]"
  28. $ ROOT = ROOT_DEV + "[" + ROOT_DIR
  29. $
  30. $ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
  31. $ DEFINE/NOLOG WRK_SSLXLIB WRK_SSLROOT:['ARCH'_LIB]
  32. $ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
  33. $ DEFINE/NOLOG WRK_SSLXEXE WRK_SSLROOT:['ARCH'_EXE]
  34. $
  35. $ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
  36. CREATE/DIR/LOG WRK_SSLROOT:[000000]
  37. $ IF F$PARSE("WRK_SSLXLIB:") .EQS. "" THEN -
  38. CREATE/DIR/LOG WRK_SSLXLIB:
  39. $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
  40. CREATE/DIR/LOG WRK_SSLINCLUDE:
  41. $ IF F$PARSE("WRK_SSLXEXE:") .EQS. "" THEN -
  42. CREATE/DIR/LOG WRK_SSLXEXE:
  43. $
  44. $ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
  45. $ E_EXE := ssl_task
  46. $ LIBS := LIBSSL,LIBSSL32
  47. $
  48. $ XEXE_DIR := [-.'ARCH'.EXE.SSL]
  49. $
  50. $ COPY 'EXHEADER' WRK_SSLINCLUDE:/LOG
  51. $ SET FILE/PROT=WORLD:RE WRK_SSLINCLUDE:'EXHEADER'
  52. $
  53. $ I = 0
  54. $ LOOP_EXE:
  55. $ E = F$EDIT(F$ELEMENT(I, ",", E_EXE),"TRIM")
  56. $ I = I + 1
  57. $ IF E .EQS. "," THEN GOTO LOOP_EXE_END
  58. $ SET NOON
  59. $ IF F$SEARCH(XEXE_DIR+E+".EXE") .NES. ""
  60. $ THEN
  61. $ COPY 'XEXE_DIR''E'.EXE WRK_SSLXEXE:'E'.EXE/log
  62. $ SET FILE/PROT=W:RE WRK_SSLXEXE:'E'.EXE
  63. $ ENDIF
  64. $ SET ON
  65. $ GOTO LOOP_EXE
  66. $ LOOP_EXE_END:
  67. $
  68. $ I = 0
  69. $ LOOP_LIB:
  70. $ E = F$EDIT(F$ELEMENT(I, ",", LIBS),"TRIM")
  71. $ I = I + 1
  72. $ IF E .EQS. "," THEN GOTO LOOP_LIB_END
  73. $ SET NOON
  74. $! Object library.
  75. $ IF F$SEARCH(XEXE_DIR+E+".OLB") .NES. ""
  76. $ THEN
  77. $ COPY 'XEXE_DIR''E'.OLB WRK_SSLXLIB:'E'.OLB/log
  78. $ SET FILE/PROT=W:RE WRK_SSLXLIB:'E'.OLB
  79. $ ENDIF
  80. $! Shareable image.
  81. $ IF F$SEARCH(XEXE_DIR+E+".EXE") .NES. ""
  82. $ THEN
  83. $ COPY 'XEXE_DIR''E'.EXE WRK_SSLXLIB:'E'.EXE/log
  84. $ SET FILE/PROT=W:RE WRK_SSLXLIB:'E'.EXE
  85. $ ENDIF
  86. $ SET ON
  87. $ GOTO LOOP_LIB
  88. $ LOOP_LIB_END:
  89. $
  90. $ EXIT