home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 7 / HYPERLIB-1993-VOL7-CD2.ISO.7z / HYPERLIB-1993-VOL7-CD2.ISO / ExpandedBook / サンプルの本 / サンプルの本.rsrc / CSTR_1010_sBOOT < prev    next >
Text File  |  1993-08-09  |  3KB  |  92 lines

  1. on installEBResources
  2.   global EBTools
  3.   put getStr("reqVersion") into rV
  4.   put value(last word of the long name of this stack) into mp
  5.   put "" into pn
  6.   put the stacksInUse into inUse
  7.   put mp into p
  8.   set itemdelimiter to ":"
  9.   delete last item of P
  10.   repeat while P<>""
  11.     put path(shortcatalog,"STAK",P&":") into SK
  12.     repeat with n=1 to number(lines of SK)
  13.       put P&":"&line n of SK into pn
  14.       if inUse contains pn then
  15.       else
  16.         if getCStr(pn,"BookType")="Library" then
  17.           put "" into P
  18.           exit repeat
  19.         end if
  20.       end if
  21.       put "" into pn
  22.     end repeat
  23.     delete last item of P
  24.   end repeat
  25.   put pn into EBTools
  26.   delete last item of EBTools
  27.   set itemdelimiter to ","
  28.   if pn="" then
  29.     answer "「ライブラリ」が見つかりません。このブックを使用するためには「ライブラリ」がこのブックが含まれているパスのどこかになければなりません。"
  30.     go home
  31.     exit to hypercard
  32.   end if
  33.   put EBTools&":" into EBTools
  34.   
  35.   set lockmessages to true
  36.   set lockrecent to true
  37.   if  there is a stack pn then
  38.     lock screen
  39.     start using stack pn
  40.     if the result<>"" then
  41.       answer "「"&pn&"」の組み込みに失敗しました。"&return&the result
  42.       go home
  43.       exit to hypercard
  44.     end if
  45.     get getStr("libVersion")
  46.     if it="" or it< rV then
  47.       answer "「"&pn&"」のバージョンが異なります。このブックを使用するためには、「"&pn&"」をアップグレードしてください。"
  48.       go home
  49.       exit to hypercard
  50.     end if
  51.     do getStr("sEBINIT")
  52.     
  53.     put "" into pn
  54.     put getStr("tkFolder") into tkFolder
  55.     put the stacksInUse into inUse
  56.     put EBTools&tkFolder into P
  57.     set itemdelimiter to ":"
  58.     repeat while P<>""
  59.       put path(shortcatalog,"STAK",P&":") into SK
  60.       repeat with n=1 to number(lines of SK)
  61.         put P&":"&line n of SK into pn
  62.         if inUse contains pn then
  63.         else
  64.           if getCStr(pn,"BookType")="TOOLKIT" then
  65.             put "" into P
  66.             exit repeat
  67.           end if
  68.         end if
  69.         put "" into pn
  70.       end repeat
  71.       delete last item of P
  72.     end repeat
  73.     global EBTKTools
  74.     put pn into EBTKTools
  75.     delete last item of EBTKTools
  76.     set itemdelimiter to ","
  77.     if pn<>"" and there is a stack pn then
  78.       start using stack pn
  79.       if the result<>"" then
  80.         answer "「"&pn&"」の組み込みに失敗しました。"&return&the result
  81.         go home
  82.         exit to hypercard
  83.       end if
  84.       put EBTKTools&":" into EBTKTools
  85.       global ebAuthor,ebAuthorStack
  86.       put -1 into ebAuthor
  87.       put pn into ebAuthorStack
  88.       do getStr("TKINIT")
  89.     end if
  90.   end if
  91. end installEBResources