make 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. ?tacl routine
  2. #FRAME
  3. SINK [#LOAD /keep 1/ commacs]
  4. SINK [#LOAD /keep 1/ macros]
  5. [#PUSH file prev memory clib OK model unzip lib accel unlicensed licensed
  6. options fileset nocrypt crypt arg^value object^owner object^security
  7. deflate64
  8. ]
  9. #PUSH #DEFAULTS
  10. #SET OK -1
  11. == Customise the following values for your environment
  12. #SET object^owner SUPER.DAVES
  13. #SET object^security "UUUU"
  14. [#LOOP |WHILE| [#MORE] |DO|
  15. [#CASE [#ARGUMENT /VALUE arg^value/
  16. KEYWORD /WORDLIST LARGE SMALL/
  17. KEYWORD /WORDLIST NOWIDE WIDE/
  18. KEYWORD /WORDLIST UNLICENSED/
  19. KEYWORD /WORDLIST NOCRYPT/
  20. KEYWORD /WORDLIST DEFLATE64 NODEFLATE64/
  21. TEMPLATE FILENAME ]
  22. |1| #SET memory [arg^value]
  23. |2| #SET model [arg^value]
  24. |3| #SET unlicensed [arg^value]
  25. |4| #SET nocrypt [arg^value]
  26. |5| #SET deflate64 [arg^value]
  27. |6| #SET fileset [arg^value]
  28. |OTHERWISE|
  29. ]
  30. ]
  31. [#IF [#EMPTYV memory] |THEN| #SET memory LARGE]
  32. [#IF [#EMPTYV model] |THEN| #SET model NOWIDE]
  33. [#IF [#EMPTYV deflate64] |THEN| #SET deflate64 DEFLATE64]
  34. [#IF model '=' "WIDE"
  35. |THEN| #SETV clib model
  36. |ELSE| #SETV clib memory
  37. ]
  38. [#IF model '=' "WIDE"
  39. |THEN|
  40. #SET unzip UNZIPW
  41. |ELSE|
  42. #SET unzip UNZIPL
  43. ]
  44. #SET lib [unzip]B
  45. #SET accel UNZIP
  46. #SET options [options], [model]
  47. [#IF unlicensed '=' "UNLICENSED"
  48. |THEN|
  49. #SET unzip [unzip]U
  50. #SET accel [accel]U
  51. #SET lib [lib]U
  52. |ELSE|
  53. #SET licensed LICENSED
  54. #SET options [options], define [licensed]
  55. ]
  56. [#IF nocrypt '=' "NOCRYPT"
  57. |THEN|
  58. |ELSE|
  59. #SET crypt USE_CRYPT
  60. #SET options [options], define [crypt]
  61. ]
  62. [#IF deflate64 '=' "NODEFLATE64"
  63. |THEN|
  64. #SET options [options], define NO_DEFLATE64
  65. ]
  66. [#IF [#EMPTYV fileset] |THEN| #SET fileset *C]
  67. #OUTPUT Files to compile: [fileset]
  68. #OUTPUT Pointer Model : [model]
  69. #OUTPUT Memory Model : [memory]
  70. #OUTPUT C Library : [clib]
  71. #OUTPUT Axcel Object : [accel]
  72. #OUTPUT Run Object : [unzip]
  73. #OUTPUT Library Object : [lib]
  74. #OUTPUT Compile Options : [options]
  75. #OUTPUT
  76. #SET file [#FILENAMES /MAXIMUM 1/ [fileset]]
  77. [#LOOP |while| NOT [#EMPTYV file]
  78. |DO|
  79. #SETV prev file
  80. CC [file] $T.#UNZIP [options]
  81. [#IF [tacl^completioncode] > 1 |THEN| #set OK 0 ]
  82. #SET file [#FILENAMES /MAXIMUM 1, PREVIOUS [prev]/ [fileset]]
  83. ]
  84. [#IF OK |THEN|
  85. BBUNZIPLIB
  86. [#IF [tacl^completioncode] > 0 |THEN| #SET OK 0]
  87. ]
  88. #PUSH #PROCESSFILESECURITY
  89. VOLUME ,"NUNU"
  90. [#IF OK |THEN|
  91. BBUNZIP [unzip] [clib]
  92. [#IF [tacl^completioncode] > 0 |THEN| #SET OK 0]
  93. ]
  94. [#IF OK |THEN|
  95. secure^file [accel] [object^security] [object^owner]
  96. accel^file [unzip] [accel]
  97. [#IF [tacl^completioncode] > 0 |THEN| #SET OK 0]
  98. ]
  99. [#IF OK
  100. |THEN| #OUTPUT Successfully produced Accelerated Object [accel]
  101. secure^file [accel] [object^security] [object^owner]
  102. [#IF [#INTERACTIVE] |THEN|
  103. [#IF licensed '=' "LICENSED" |THEN|
  104. #OUTPUT [accel] will not run without being LICENSED
  105. [#IF [#FILEINFO /LICENSED/ [accel]]
  106. |THEN|
  107. #OUTPUT [accel] already LICENSED
  108. |ELSE|
  109. [#IF [#MATCH Y* [#INPUT [accel] License [accel] ?]] |THEN|
  110. fup^license [accel]
  111. ]
  112. ]
  113. ]
  114. ]
  115. |ELSE| #OUTPUT Failed to produce Accelerated Object [accel]
  116. ]
  117. #OUTPUT Finished
  118. #UNFRAME