2008-12-29 05:43:17 +01:00
|
|
|
#!/bin/sh
|
2008-12-29 02:13:55 +01:00
|
|
|
|
2008-12-29 05:41:00 +01:00
|
|
|
PKG_DIR=${1}.app
|
|
|
|
SKEL_DIR="packages/osx_bundle"
|
2008-12-29 02:13:55 +01:00
|
|
|
|
2008-12-29 05:41:00 +01:00
|
|
|
if ! test -d packages/osx_bundle; then
|
2008-12-30 07:44:04 +01:00
|
|
|
echo
|
2008-12-29 05:41:00 +01:00
|
|
|
echo "Make sure you're in the toplevel source directory"
|
|
|
|
exit 1;
|
|
|
|
fi
|
2008-12-29 02:13:55 +01:00
|
|
|
|
2008-12-30 07:44:04 +01:00
|
|
|
if test -d ${PKG_DIR}; then
|
|
|
|
echo "**** USING OLD ${PKG_DIR} ****"
|
|
|
|
fi
|
2008-12-29 02:13:55 +01:00
|
|
|
|
2008-12-29 05:41:00 +01:00
|
|
|
echo
|
|
|
|
echo "---- Directory Structure ----"
|
|
|
|
mkdir -v ${PKG_DIR}
|
|
|
|
mkdir -v ${PKG_DIR}/Contents
|
|
|
|
mkdir -v ${PKG_DIR}/Contents/MacOS
|
|
|
|
mkdir -v ${PKG_DIR}/Contents/Resources
|
2009-01-01 06:59:41 +01:00
|
|
|
mkdir -v ${PKG_DIR}/Contents/Resources/etc
|
|
|
|
mkdir -v ${PKG_DIR}/Contents/Resources/etc/fonts
|
|
|
|
mkdir -v ${PKG_DIR}/Contents/Resources/etc/fonts/conf.d
|
2008-12-31 09:32:43 +01:00
|
|
|
mkdir -v ${PKG_DIR}/Contents/SharedSupport
|
|
|
|
mkdir -v ${PKG_DIR}/Contents/SharedSupport/dictionaries
|
2008-12-29 02:13:55 +01:00
|
|
|
|
2008-12-29 05:41:00 +01:00
|
|
|
echo
|
|
|
|
echo "---- Copying Skel Files ----"
|
2009-01-01 06:59:41 +01:00
|
|
|
find ${SKEL_DIR} -type f -not -regex ".*.svn.*"
|
|
|
|
cp ${SKEL_DIR}/Contents/Resources/*.icns ${PKG_DIR}/Contents/Resources
|
|
|
|
cp ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.* ${PKG_DIR}/Contents/Resources/etc/fonts
|
|
|
|
cp ${SKEL_DIR}/Contents/Resources/etc/fonts/conf.d/*.conf ${PKG_DIR}/Contents/Resources/etc/fonts/conf.d
|
2008-12-31 06:52:52 +01:00
|
|
|
cat ${SKEL_DIR}/Contents/Info.plist |sed -f scripts/osx-bundle.sed > ${PKG_DIR}/Contents/Info.plist
|
2008-12-29 02:13:55 +01:00
|
|
|
|
2009-01-04 11:04:32 +01:00
|
|
|
echo
|
|
|
|
echo "---- Copying locale files ----"
|
2009-01-04 11:53:54 +01:00
|
|
|
# Let Aqua know that aegisub supports english. English strings are
|
|
|
|
# internal so we don't need an aegisub.mo file.
|
|
|
|
mkdir -v ${PKG_DIR}/Contents/Resources/en.lproj
|
|
|
|
|
2009-01-04 11:04:32 +01:00
|
|
|
for i in `cat po/LINGUAS`; do
|
|
|
|
if test -f "po/${i}.gmo"; then
|
|
|
|
mkdir -v ${PKG_DIR}/Contents/Resources/${i}.lproj;
|
2009-01-04 11:53:54 +01:00
|
|
|
cp -v po/${i}.gmo ${PKG_DIR}/Contents/Resources/${i}.lproj/aegisub.mo;
|
2009-01-04 11:04:32 +01:00
|
|
|
else
|
|
|
|
echo "${i}.gmo not found!"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2008-12-29 05:41:00 +01:00
|
|
|
echo
|
|
|
|
echo "---- Binaries ----"
|
|
|
|
cp -v aegisub/.libs/aegisub ${PKG_DIR}/Contents/MacOS
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "---- Libraries ----"
|
|
|
|
python scripts/osx-fix-libs.py "${PKG_DIR}/Contents/MacOS/aegisub"
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Done Creating ${PKG_DIR}"
|