summaryrefslogtreecommitdiffstats
path: root/macosx/localize.sh
blob: f58b3645c9ab611a7dc734edbf3e8db619d2bc8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
# This script localize the built application
 cd macosx/i18n/
export LNG=`ls *strings | sed 's/.strings//g' | sed 's/Localizable//g'`
cd ../../$1/Contents/Resources
for l in $LNG 
do
	cp -r English.lproj $l.lproj
	cp ../../../macosx/i18n/$l.strings $l.lproj/Localizable.strings
done

echo Generating Info.plist with correct version information
cd ..
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleDisplayName</key>
        <string>HandBrake</string>
        <key>CFBundleExecutable</key>
        <string>HandBrake</string>
        <key>CFBundleGetInfoString</key>
        <string>0.9.0</string>
        <key>CFBundleIconFile</key>
        <string>HandBrake</string>
        <key>CFBundleIdentifier</key>
        <string>org.m0k.handbrake</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>HandBrake</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
        <string>$2</string>
        <key>CFBundleSignature</key>
        <string>HB##</string>
        <key>CFBundleVersion</key>
        <string>$3</string>
        <key>NSHumanReadableCopyright</key>
        <string>HandBrake Devs</string>
        <key>NSMainNibFile</key>
        <string>MainMenu</string>
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
</dict>
</plist>" > Info.plist

if [ $4 == "DEV" ]; then
echo Installing libquicktime Plugins in the $1 Bundle
cd Resources
mkdir plugins
cd plugins
cp ../../../../contrib/lib/libquicktime/* .
fi