Creating a CAB for Windows Mobile with a large number of files

    Faced an unexpected problem recently with CAB generation. CabWiz.exe is used for generation. The packer began to swear at the wrong characters in the directory name "setup.inf contains DirIDs, which are not supported".

    The project for Windows Mobile was compiled and packaged in CAB. In the morning, when the test package was going, everything went off with a bang. There were no changes in the assembly project during the day. In the evening, CAB did not gather. They began to think that, nevertheless, variables with a percent sign were processed somewhere incorrectly, or incorrect paths were inserted into the .inf section of the DestinationDirs.

    After parsing, it turned out that the version that comes with Visual Studio 2008 has several limitations. One of these restrictions: the maximum number of processed files is 262. That is, if the archive contains 262 files, then everything is fine and the output will be the correct CAB. If 263 or more files appear in the project, then the error described above will be issued.

    The solution turned out to be quite simple. The WM 6 SDK has the correct cabwiz.exe, where this problem is fixed.
    1) In total, we now use c: \ Program Files \ Windows Mobile 6 SDK \ Tools \ CabWiz \ Cabwiz.exe
    2) You can c: \ Program Files \ Microsoft Visual Studio 9.0 \ SmartDevices \ SDK \ SDKTools \ CabWiz.exe with a new one sdk (and also replace the CabWiz.ddf file) and then you can safely continue to build CAB directly from the studio.

    By the way, do not forget to use variables (macro variables) for CAB, they greatly simplify life.

    Also popular now: