1 rizwank 1.1 #!/bin/sh
2 # Generate test archives using cabarc.exe (Windows Cabinet SDK/bin)
3 # This is run just once, and generates the file cabinet_files.h,
4 # which is then checked into CVS forever.
5 # It is here just in case we want to add more test files later.
6 # Copyright 2005 Dan Kegel; LGPL
7
8 #set -ex
9
10 # First, get cabinet SDK
11 # You might need to download it by hand from ttp://support.microsoft.com/?id=310618
12 test -f cabsdk.exe || wget -c http://download.microsoft.com/download/platformsdk/cab/2.0/w98nt42kmexp/en-us/cabsdk.exe
13
14 # unpack it (handily, it's a zip file)
15 mkdir cabsdk
16 cd cabsdk
17 unzip ../cabsdk.exe
18 cd ..
19 chmod 744 cabsdk/BIN/CABARC.EXE
20
21 # Simple archive, just one 42 byte file
22 rizwank 1.1 echo 'So long, and thanks for all the fish.....' > simple.txt
23 wine cabsdk/BIN/CABARC.EXE N simple.cab simple.txt
24
25 # More complicated archive, with two files
26 cp ../../../README README
27 cp ../../../COPYING.LIB lgpl.txt
28 wine cabsdk/BIN/CABARC.EXE N complex.cab README lgpl.txt
29
30 # Blow away cabinet SDK
31 rm -rf cabsdk
32
33 # Pack source files and archives into hex arrays
34 perl ../../../tools/chexify.pl simple.txt README lgpl.txt simple.cab complex.cab > data.h
|