Monday, October 24, 2011

"Upgrading?"

IMHO upgrading Linux should be called something more aptly named like: "I plan to burn my machine to cinders, and rebuild it from the ashes." (Phoenix-ing). Anything else is just a misnomer. In fact "upgrading" should be taken out of our ones technical vocabulary, and should be called "filthy lies". The only time it's ok, is when a vendor controls both the horizontal and vertical integration paths (Like apple), where they can control the variables to some degree. 

Friday, May 28, 2010

Total cost of ownership

So within the last couple of years I've become far more shrewd then anything else.  As I get older I've realized that with the tons of advertising and wiz-bang gadgets out there most folks don't really realize how/why they are getting schooled, and their money is going to huge companies.  So in this post I will outline a good example of total cost of ownership of a smartphone.

So you want to buy a smart phone, ok, it has a lot of nice advantages and I can understand why.  So lets take a look at 2 popular phones: iPhone, & Nexus One.

For all intents and purposes lets say the phones are ~= w/respect to features.  I honestly believe with froyo the nexus one wins, but lets just say they are equal.

So here is where we play the numbers game.  No matter what plan you have when you buy an iPhone (lower bound $99) you will tack on $30 data plan ~ 2 years, then after that point to maintain the smart phone capabilities you will need to add $15 data plan.

Here is where the next one wins, *if you're clever*.  With Android 2.2-froyo the Nexus One ($599) comes with Skype, which means you have the potential to do VOIP and bump down your overall plan. (You can do this with the iPhone as well but saving won't kick in until you change your plan in the 3rd year).  You will need to add the data plan which is $15.  A very conservative WAG on the savings in my case is ~ -$8.70 a month.  So hmm let's wip out the spreadsheet and take a look...

Total cost of ownership

Year iPhone-Worst Case iPhone – Best Case Nexus One
1 459 459 494.6
2 819 819 390.2
3 1179
714.6
285.8
4 1539
610.2
181.4
5 1899
505.8
77


Obviously the numbers would very based upon your current plan, but if you are shrewd you can have your cake and eat it too. 

Cheers,
Tim







Monday, February 1, 2010

WiX and CPack Integration

CMake and it's compliment CPack provide a very useful tool(s) for cross platform building and packaging of C & C++ applications.  For some time now CPack has been lacking support for WiX which allows users to create a standard .msi package.  This is very useful for those who wish to deploy in enterprise environments, as there are some key advantages over other methods.   Below is an outline of what steps I had to follow to add WiX support to CPack-2.8.0.  This will likely hit 90% user cases, for the last 10%, I pass the baton to you.

Patching CPack-2.8.0
1. Obtain the patch here & apply
2. Rebuild and install cmake (follow the online instructions)

or

use a diff tool to overlay *this on your windows cmake directory

So how does it work? 
There was no clean/fast way for me to create an XML generator, so I decided to leverage the tools which come with WiX and rely on the fact that CPack stages the install prior to compression.  The tool which is pivotal to the whole process is heat, which will generate an xml file based on the contents of the staged directory.  The key to making it automated is the fact that heat can take a .xsl file as input which then can transform the auto-generated goop into something useful for creating your installer.  You can find a simple example here

You will need to replace YOUR_ with something useful based on the context, but that should be straight forwards.  Once that is done you can make a couple simple changes to your CMakeLists.txt files and add the following:


set (CPACK_GENERATOR "WIX")

set (CPACK_WIX_XSL ${YOUR_PACKAGE_SOURCE_DIR}/win.xsl)


now you can run your PACKAGE target and it will create a .msi based on your .xsl.

For more information on customizing your installer please see the WiX documentation.