make-cocoa-headers.sh 1.2 KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # halt on error
  3. set -e
  4. # convert basic cocoa headers
  5. php parser.php -cocoa -root=`pwd`/cocoa-skel/src
  6. # convert webkit headers
  7. php parser.php -all -frameworks=foundation,webkit -root=`pwd`/cocoa-skel/src
  8. # convert coredata headers
  9. php parser.php -all -frameworks=foundation,coredata -root=`pwd`/cocoa-skel/src
  10. # correct some translations the automatic translation cannot handle
  11. patch -p0 < patches/cocoa-coredata-webkit.patch
  12. # empty two headers that exist both in foundation and in appkit, and that
  13. # thereby cause "duplicate identifier" errors
  14. echo > `pwd`/cocoa-skel/src/foundation/NSAttributedString.inc
  15. echo > `pwd`/cocoa-skel/src/foundation/NSAffineTransform.inc
  16. echo
  17. echo The headers have been converted and placed under
  18. echo `pwd`/cocoa-skel/src.
  19. echo If you wish to compile them, execute the following commands:
  20. echo cp ../Makefile cocoa-skel
  21. echo cd cocoa-skel
  22. echo make OPT=\"-O2 -ap\"
  23. echo
  24. echo The compiled files can be installed afterwards using \"make install\"
  25. echo if required. If another compiler binary than the default one has to
  26. echo be used, specify the alternative compiler binary location in the
  27. echo last command by adding FPC=/full/path/to/ppcbinary
  28. echo