Adds a scripts directory to the repository.
[HandBrake.git] / macosx / localize.sh
blob41bb6aaf6959aa44bd270ef890ab9d1e57b7ac96
1 #!/bin/sh
2 # This script localize the built application
3 cd macosx/i18n/
4 export LNG=`ls *strings | sed 's/.strings//g' | sed 's/Localizable//g'`
5 cd ../../$1/Contents/Resources
6 for l in $LNG
7 do
8 cp -r English.lproj $l.lproj
9 cp ../../../macosx/i18n/$l.strings $l.lproj/Localizable.strings
10 done
12 echo Generating Info.plist with correct version information
13 cd ..
14 echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
15 <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
16 <plist version=\"1.0\">
17 <dict>
18 <key>CFBundleDevelopmentRegion</key>
19 <string>English</string>
20 <key>CFBundleDisplayName</key>
21 <string>HandBrake</string>
22 <key>CFBundleExecutable</key>
23 <string>HandBrake</string>
24 <key>CFBundleGetInfoString</key>
25 <string>0.9.1</string>
26 <key>CFBundleIconFile</key>
27 <string>HandBrake</string>
28 <key>CFBundleIdentifier</key>
29 <string>org.m0k.handbrake</string>
30 <key>CFBundleInfoDictionaryVersion</key>
31 <string>6.0</string>
32 <key>CFBundleName</key>
33 <string>HandBrake</string>
34 <key>CFBundlePackageType</key>
35 <string>APPL</string>
36 <key>CFBundleShortVersionString</key>
37 <string>$2</string>
38 <key>CFBundleSignature</key>
39 <string>HB##</string>
40 <key>CFBundleVersion</key>
41 <string>$3</string>
42 <key>NSHumanReadableCopyright</key>
43 <string>HandBrake Devs</string>
44 <key>NSMainNibFile</key>
45 <string>MainMenu</string>
46 <key>NSPrincipalClass</key>
47 <string>NSApplication</string>
48 </dict>
49 </plist>" > Info.plist
51 if [ $4 == "DEV" ]; then
52 echo Installing libquicktime Plugins in the $1 Bundle
53 cd Resources
54 mkdir plugins
55 cd plugins
56 cp ../../../../contrib/lib/libquicktime/* .