Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

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