home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / sharew / exoten / icon / amiga.icn < prev    next >
Encoding:
Text File  |  1990-03-18  |  1.6 KB  |  71 lines

  1. #
  2. # %W% %G%
  3. # OS-specific code for Amiga Idol
  4. #
  5. global lnkopt,cd,md,env,sysok
  6.  
  7. procedure mysystem(s)
  8.   if \loud then write(s)
  9.   return system(s)
  10. end
  11.  
  12. procedure filename(s)
  13.   s[9:0] := ""
  14.   return s
  15. end
  16. procedure writesublink(s)
  17.   writelink(env||"/"||s)
  18. end
  19. procedure envpath(filename)
  20.   return env||"/"||filename
  21. end
  22. #
  23. # Installation.
  24. # Uses hierarchical filesystem on some systems (see initialize)
  25. #
  26. procedure install(args)
  27.   write("Installing idol environment in ",env)
  28.   if env ~== "" then mysystem(md||env)
  29.   fout := envopen("i_object.icn","w")
  30.   write(fout,"record idol_object(__state,__methods)")
  31.   close(fout)
  32.   fout := &null
  33.   cdicont(["i_object"])
  34. end
  35.  
  36. procedure makeexe(args,i)
  37.   exe := args[i]
  38.   if icont(lnkopt||exe) = \sysok then {
  39.       mysystem("delete "||exe||".icn")
  40.       if \exec then {
  41.     write("Executing:")
  42.     exe := "iconx "||exe
  43.     every i := exec+1 to *args do exe ||:= " "||args[i]
  44.     mysystem(exe)
  45.       }
  46.   }
  47. end
  48. #
  49. # system-dependent compilation of idolfile.icn
  50. #   (in the idol subdirectory, if there is one)
  51. #
  52. procedure cdicont(idolfiles)
  53.   if comp = -2 then return  # -t --> don't call icont at all
  54.   args := " -c"
  55.   rms  := ""
  56.   every ifile := !idolfiles do args ||:= " " || ifile
  57.   every ifile := !idolfiles do rms  ||:= " " || ifile || ".icn"
  58.  
  59.   mysystem("cd idolcode.env")
  60.   if icont(args) = \sysok
  61.   then every ifile := !idolfiles do mysystem("delete "||ifile||".icn")
  62.   mysystem("cd /")
  63. end
  64. procedure sysinitialize()
  65.   lnkopt := " -Sr500 -SF30 -Si1000 "
  66.   cd := "cd "
  67.   md := "makedir "
  68.   env := "idolcode.env"
  69.   sysok := 0
  70. end
  71.