Building ZXing for Android part 2 – Subversion!

Well, that was fast!  I decided to give Subversion a whirl with the ZXing codebase before signing off for the night… and I apparently chose well when I selected TortoiseSVN as my Subversion client for Windows!

It went very smoothly! Here’s the details:

  • Create a folder to work in (e.g., “D:\zxing-test”)
  • Right-click in/on the folder and select “SVN Checkout…”
    – Edit the “Checkout Directory” accordingly
    – I used the info at the ZXing SVN page to get the required URL (http://zxing.googlecode.com/svn/trunk/).  Note that the “zxing-read-only” part caused problems here (it’s not valid syntax for this client). You cannot commit changes without being a member of the group so leave it off when using TortoiseSVN.
    – I did a fully recursive code pull the first time.
    – I selected the HEAD revision of the version tree.
  • Time passes as you download quite a helluva lot of code!  Broadband helps…
  • For this experiment the last commit version turned out to be revision 1217.  I’m not sure how they manage their changes but it’s always possible you could be unlucky and get a revision level that’ll lead to a broken build.  (Fortunately, tonight’s my lucky night!)  You can specify this when you start the SVN interaction above, or you can “revert” to this version (or any other) later if you prefer.
  • Prep and build it!
    – Edit build.properties as I described in my last post.
    – Build the source tree (be sure to set MY_PROJ_ROOT correctly to point to the SVN-derived tree!)  Use the debug target as before (I’ve yet to try the release one though I suspect the lack of signing will cause problems).

And again, voilà!  You’ve got a new build! (I notice the first “clean” build step no longer throws a small error as it did before… it didn’t affect things but it was nice to see that it got fixed).

I loaded the build onto my Droid and installed it (there was no need to uninstall the older version 3.0 I was testing with earlier – I don’t bother with that unless it complains or otherwise fails to install).  On execution the about box shows this is version 3.2 beta 1 (versus the version 3.0 I built earlier and version 3.1 which was the most current in the Android App Market)!  If I’m going to fiddle around, it’s nice to know I’m fiddling with the latest and greatest! 🙂

That concludes my coding evening.  Thanks for visiting!

Note: Other projects use Git… I installed TortoiseGit as well but haven’t had a chance to play with it yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.