2 Replies Latest reply on Mar 20, 2014 10:25 PM by Kutir Mobility

    CAB file compression

    Gerbrand Stap

      If you want to build a setup (CAB) for Windows Mobile, you'll end up with a file of at least 22MB if you include the Motorola browser ("extensions: [motorola_browser]" in the build.yml). And when your application becomes more elaborate, this easily exceeds 30MB. This is quite large for a humble Windows Mobile device, but this size can be reduced using cab file compression.


      This is not used by default, and the only way this can be done at this moment is by editing the build script for Windows Mobile:

      1. Open the file "\MotorolaRhoMobileSuite4.0.0\ruby\lib\ruby\gems\1.9.1\gems\rhodes-4.0.0\platform\wm\build\wm.rake"
      2. Look for the section:
        args = [$appname + ".inf"]
        puts Jake.run($cabwiz, args)
        unless $? == 0
          puts "Error running cabwiz"
          exit 1
      3. Change the first line to: args = [$appname + ".inf", "/compress"]


      Now the "/compress" argument will be passed to the cabwiz tool and the resulting CAB will be about a third in size compared to the uncompressed version.


      Compression is supported on Windows Mobile 5 and up, so there should be no compatibility issues. I tested this on a Motorola MC65 device and it worked and the installation wasn't any slower.


      xhf648, USER03261: Could this be done by default in a future release of RhoMobile Suite?