CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Precompiled modules
Pages: [1]

Author Topic: Precompiled modules  (Read 1560 times)

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Precompiled modules
April 11, 2008, 03:57:49 am
I have been working on a way to print a USPS barcode on CiviCRM mailing labels, which I could hopefully share.  There is a design choice to make on which I'd like some input.

1.  The relatively easy way is to incorporate the official USPS released module.  It comes as a precompiled C binary for encoding and a truetype font package.  The font is easy to incorporate into CiviCRM, so that is not an issue.  The precompiled C binary is not open source although it does not appear to have any license associated with it.  It is not difficult to make calls to this binary with exec() in PHP and incorporate that into Civicrm.  They also have a java wrapper which calls the module.  Does this create a license problem for us under the AGPL?  And, it creates a platform dependency for CiviCRM, in that you would have to make sure that the appropriate binary object was installed for linux vs. windows vs. mac vs. whatever.

2.  The hard way is to write the PHP to follow the USPS spec for encoding the data, instead of the binary module, and then use the font to print it.  The spec is a beast and it would be no joke to get it working correctly.  See this document. There is a lot of, divide this string up into 5-bit segments, divide each by 1365, and look up the result in this massive table, while standing on your left foot and holding your mouth just so.   It would be a lot of work and would have to be thoroughly tested.

Thoughts, anyone?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Precompiled modules
April 11, 2008, 12:16:21 pm

I think doing it the first way makes much more sense and seems a lot easier and avoids reinventing a potentially complex wheel :)

With regard to the license, if you document and release your integration code between the USPS C binary and CiviCRM that should definitely keep things in compliance with the license.

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Precompiled modules

This forum was archived on 2017-11-26.