home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / linkmaster-src-1.0.4.tar.gz / linkmaster-src-1.0.4.tar / linkmaster-1.0.4 / hack / readme.txt < prev    next >
Text File  |  2000-09-05  |  3KB  |  63 lines

  1. This is the readme.txt file for the Sample Hack package.
  2. Placed into the public domain by Roger Chaplin <foursquaredev@att.net>
  3.  
  4. This package is intended to demonstrate the creation of a HackMaster hack for
  5. Palm Computing(R) platform handhelds, using the free GNU GCC/prctools
  6. development tools.
  7.  
  8. The package includes the following files:
  9.     hackapi.html
  10.     code03e8.c
  11.     code07d0.c
  12.     myhack.h
  13.     hackuidef.h
  14.     myhack.prc
  15.     makefile
  16.  
  17. Before you can hope to understand any of the source code, you need to read and
  18. comprehend "How To Write a Hack" by Edward Keyes. I have included a copy in
  19. the Sample Hack package; it is the hackapi.html file.
  20.  
  21. Although the code in this package is intended purely as an example, it will
  22. compile and do something reasonably useful: disable turning on or off the
  23. backlight. The sample illustrates the use of app preferences for sharing data
  24. among code resources, and the use of a HackMaster preferences panel.
  25.  
  26. A little bit of my philosophy of design has crept into the code in this
  27. sample. This is most apparent in the way preferences are handled. First, I
  28. continue to use the old V1.0 app preferences routines, as that is one of the
  29. many things necessary to enable my apps to run on Pilot 1000s and 5000s.
  30. Second, I don't ever create app preferences or databases in the OS trap patch
  31. code; instead, I test for the presence of apps/databases and create them if
  32. necessary in the hack's preference panel. OS trap patch code is time critical;
  33. the preferences panel is not. A result of this design choice is that until the
  34. user opens the preferences panel, the hack is essentially a no-op, even if
  35. it's been enabled using the checkbox. Of course, there is nothing forcing you
  36. to do it the same way; you just need to be aware that *this* code works that
  37. way.
  38.  
  39. The odd names for the C source files derive from the way the makefile is
  40. written. From each C source file it creates a code resource having the same
  41. name, but with extension .bin rather than .c. This greatly simplifies writing
  42. make dependencies and rules, and facilitates adding or removing code resources
  43. by simply adding or removing their names from the HACKSRC definition in the
  44. makefile.
  45.  
  46. This sample does not intend to teach the use of make; there are plenty of
  47. other places where you can learn that. If you know make well, you should not
  48. be too hard pressed to figure out what I've done (after all, I'm no make
  49. guru). If the makefile makes no sense to you (pardon the pun), then rest
  50. assured that you can create any hack you want by simply modifying the lines
  51. above the one that says
  52.  
  53.     # You shouldn't have to change anything below this line
  54.  
  55. The makefile is written so that if you issue the simple command `make' it will
  56. build the debug version, suitable for installing on Poser and debugging with
  57. GDB. If you use `make release' it will build with debug symbols disabled and
  58. full optimization enabled. If you want to rebuild everything, then do a
  59. `make clean' first.
  60.  
  61. Happy hacking!
  62.  
  63.