create blog

go home go home
  1. about
  2. code
  3. wiki
  4. blog

Archive for the ‘Barcode’ Category

Auto-Configuring, the Build, and the Barcode

Tuesday, March 17th, 2009

Last night, I wrote about how I could not easily add the barcode functionality to the build because it was not guaranteed that the library would be on every computer compiling it.

I did two main things:

  1. Added ENABLE() and HAVE() macros. Inspired by WebKit’s, here. This allows enabling and disabling the capabilities through a configuration header file (now located in config/config.h).
  2. Added a simple generate-config script. I know there are existing tools for this — I think GNU’s Autoconf does it — but I didn’t have time to learn something new, and I also didn’t want to invest in such complexity for a system which would not work in Windows. The Windows script is a command file; the Mac one is a shell script.

I like how the scripts have no prerequisites on Mac and Windows. Unfortunately, I will probably have to rewrite them later in a consolidated form, so that I only have on script; at this point, it will likely cease to have no prerequisites.

So, how do compile with support for the barcode? On Mac, you have to put the libUSPS4CB.dylib in /usr/local/lib/. On Windows, you have to put in in your WINDOWS folder. And that’s it.

Script & the USPS Intelligent Mail Barcode

Monday, March 16th, 2009

We need a way to integrate the new USPS Intelligent Mail Barcode nicely into our existing workflow. The software we use for most of our composition seems to have some… disagreements (or something)… with it at times, even though it officially supports it.

Other people using the same software recommend using the USPS’s library. That’s fine and all, but we don’t want to write a C program for each job — writing in C or C++ can be quite time consuming. And it requires compiling, creating projects, etc. In short, a lot of hassle.

While this may not be the course we end up following, I decided, tonight, that although I was half-asleep, I’d attempt to add scripting support for USPS’s library. At around 10:00, I downloaded the software from USPS. Now, roughly fifty minutes later, I have managed to write a script that uses the USPS barcode.

(more…)