/Mac/scripts/genallsuites.py

http://unladen-swallow.googlecode.com/ · Python · 52 lines · 42 code · 6 blank · 4 comment · 0 complexity · d02d2e98a2b5d03f350f598f7529c656 MD5 · raw file

  1. # Generate all the standard scripting suite packages.
  2. # Note that this module needs *serious* hand-crafting because of all the
  3. # absolute paths. It is, however, a great leap forward compared to the time
  4. # when this information was only stored in Jack's brain:-)
  5. import sys
  6. import os
  7. import gensuitemodule
  8. verbose=sys.stdout
  9. DSTDIR="/Users/jack/src/python/Lib/plat-mac/lib-scriptpackages"
  10. OS9DISK="/Volumes/Moes"
  11. APPLESCRIPT=OS9DISK + "/Systeemmap/Extensies/AppleScript"
  12. SYSTEMEVENTS="/System/Library/CoreServices/System Events.app"
  13. CODEWARRIOR=OS9DISK + "/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.6"
  14. EXPLORER="/Applications/Internet Explorer.app"
  15. FINDER="/System/Library/CoreServices/Finder.app"
  16. NETSCAPE=OS9DISK + "/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2"
  17. TERMINAL="/Applications/Utilities/Terminal.app"
  18. gensuitemodule.processfile_fromresource(APPLESCRIPT,
  19. output=os.path.join(DSTDIR, 'StdSuites'),
  20. basepkgname='_builtinSuites',
  21. edit_modnames=[], verbose=verbose)
  22. gensuitemodule.processfile(SYSTEMEVENTS,
  23. output=os.path.join(DSTDIR, 'SystemEvents'),
  24. basepkgname='StdSuites',
  25. edit_modnames=[('Disk_2d_Folder_2d_File_Suite', 'Disk_Folder_File_Suite')],
  26. verbose=verbose)
  27. gensuitemodule.processfile(CODEWARRIOR,
  28. output=os.path.join(DSTDIR, 'CodeWarrior'),
  29. basepkgname='StdSuites',
  30. edit_modnames=[], verbose=verbose)
  31. gensuitemodule.processfile(EXPLORER,
  32. output=os.path.join(DSTDIR, 'Explorer'),
  33. basepkgname='StdSuites',
  34. edit_modnames=[], verbose=verbose)
  35. gensuitemodule.processfile(FINDER,
  36. output=os.path.join(DSTDIR, 'Finder'),
  37. basepkgname='StdSuites',
  38. edit_modnames=[], verbose=verbose)
  39. gensuitemodule.processfile(NETSCAPE,
  40. output=os.path.join(DSTDIR, 'Netscape'),
  41. basepkgname='StdSuites',
  42. edit_modnames=[('WorldWideWeb_suite_2c__as_d', 'WorldWideWeb_suite')], verbose=verbose)
  43. gensuitemodule.processfile(TERMINAL,
  44. output=os.path.join(DSTDIR, 'Terminal'),
  45. basepkgname='StdSuites',
  46. edit_modnames=[], verbose=verbose)