Fix osx-bundle and osx-dmg breakage after adding buildbot support, both scripts now accept spaces in the directory names.
Originally committed to SVN as r3001.
This commit is contained in:
parent
f13d23509a
commit
d603ceeda9
4 changed files with 43 additions and 43 deletions
|
@ -23,11 +23,11 @@ SUBDIRS = \
|
|||
desktop
|
||||
|
||||
osx-bundle:
|
||||
@SHELL@ scripts/osx-bundle.sh "Aegisub (r@SVN_REVISION@@PACKAGE_DEBUG@)" @AEGISUB_VERSION_DATA@ DICT_DIR=$(DICT_DIR)
|
||||
@SHELL@ scripts/osx-bundle.sh "Aegisub (r@SVN_REVISION@-@DARWIN_ARCH@@PACKAGE_DEBUG@)" @AEGISUB_VERSION_DATA@ DICT_DIR=$(DICT_DIR)
|
||||
|
||||
|
||||
osx-dmg:
|
||||
@SHELL@ scripts/osx-dmg.sh aegisub-r@SVN_REVISION@-@DARWIN_ARCH@@PACKAGE_DEBUG@ "Aegisub (r@SVN_REVISION@@PACKAGE_DEBUG@)"
|
||||
@SHELL@ scripts/osx-dmg.sh "Aegisub (r@SVN_REVISION@-@DARWIN_ARCH@@PACKAGE_DEBUG@)" "Aegisub (r@SVN_REVISION@-@DARWIN_ARCH@@PACKAGE_DEBUG@)"
|
||||
|
||||
osx-tinderbox-bundle:
|
||||
@SHELL@ scripts/osx-bundle.sh "$(T_BUNDLE)" @AEGISUB_VERSION_DATA@ DICT_DIR="$(DICT_DIR)"
|
||||
|
|
|
@ -17,40 +17,40 @@ if ! test -d packages/osx_bundle; then
|
|||
exit 1;
|
||||
fi
|
||||
|
||||
if test -d ${PKG_DIR}; then
|
||||
if test -d "${PKG_DIR}"; then
|
||||
echo "**** USING OLD ${PKG_DIR} ****"
|
||||
fi
|
||||
|
||||
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
|
||||
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
|
||||
mkdir -v ${PKG_DIR}/Contents/SharedSupport
|
||||
mkdir -v ${PKG_DIR}/Contents/SharedSupport/dictionaries
|
||||
mkdir -v "${PKG_DIR}"
|
||||
mkdir -v "${PKG_DIR}/Contents"
|
||||
mkdir -v "${PKG_DIR}/Contents/MacOS"
|
||||
mkdir -v "${PKG_DIR}/Contents/Resources"
|
||||
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"
|
||||
mkdir -v "${PKG_DIR}/Contents/SharedSupport"
|
||||
mkdir -v "${PKG_DIR}/Contents/SharedSupport/dictionaries"
|
||||
|
||||
echo
|
||||
echo "---- Copying Skel Files ----"
|
||||
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.dtd ${PKG_DIR}/Contents/Resources/etc/fonts
|
||||
cat ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.conf |sed -f scripts/osx-bundle.sed > ${PKG_DIR}/Contents/Resources/etc/fonts/fonts.conf
|
||||
cp ${SKEL_DIR}/Contents/Resources/etc/fonts/conf.d/*.conf ${PKG_DIR}/Contents/Resources/etc/fonts/conf.d
|
||||
cat ${SKEL_DIR}/Contents/Info.plist |sed -f scripts/osx-bundle.sed > ${PKG_DIR}/Contents/Info.plist
|
||||
cp ${SKEL_DIR}/Contents/Resources/*.icns "${PKG_DIR}/Contents/Resources"
|
||||
cp ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.dtd "${PKG_DIR}/Contents/Resources/etc/fonts"
|
||||
cat ${SKEL_DIR}/Contents/Resources/etc/fonts/fonts.conf |sed -f scripts/osx-bundle.sed > "${PKG_DIR}/Contents/Resources/etc/fonts/fonts.conf"
|
||||
cp ${SKEL_DIR}/Contents/Resources/etc/fonts/conf.d/*.conf "${PKG_DIR}/Contents/Resources/etc/fonts/conf.d"
|
||||
cat ${SKEL_DIR}/Contents/Info.plist |sed -f scripts/osx-bundle.sed > "${PKG_DIR}/Contents/Info.plist"
|
||||
|
||||
|
||||
echo
|
||||
echo "---- Copying dictionaries ----"
|
||||
if test -z ${DICT_DIR}; then
|
||||
if test -z "${DICT_DIR}"; then
|
||||
DICT_DIR="${HOME_DIR}/dict"
|
||||
fi
|
||||
|
||||
if test -d "${DICT_DIR}"; then
|
||||
cp -v ${DICT_DIR}/* ${PKG_DIR}/Contents/SharedSupport/dictionaries
|
||||
cp -v "${DICT_DIR}/*" "${PKG_DIR}/Contents/SharedSupport/dictionaries"
|
||||
else
|
||||
echo "WARNING: Dictionaries not found, please set $$DICT_DIR to a directiory"
|
||||
echo " where the *.aff and *.dic files can be found"
|
||||
|
@ -61,21 +61,21 @@ echo
|
|||
echo "---- Copying automation/ files ----"
|
||||
cd automation
|
||||
make install \
|
||||
aegisubdatadir=../${PKG_DIR}/Contents/SharedSupport \
|
||||
aegisubdocdir=../${PKG_DIR}/Contents/SharedSupport/doc
|
||||
cd ${SRCDIR}
|
||||
aegisubdatadir="../${PKG_DIR}/Contents/SharedSupport" \
|
||||
aegisubdocdir="../${PKG_DIR}/Contents/SharedSupport/doc"
|
||||
cd "${SRCDIR}"
|
||||
|
||||
|
||||
echo
|
||||
echo "---- Copying locale files ----"
|
||||
# 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
|
||||
mkdir -v "${PKG_DIR}/Contents/Resources/en.lproj"
|
||||
|
||||
for i in `cat po/LINGUAS`; do
|
||||
if test -f "po/${i}.gmo"; then
|
||||
mkdir -v ${PKG_DIR}/Contents/Resources/${i}.lproj;
|
||||
cp -v po/${i}.gmo ${PKG_DIR}/Contents/Resources/${i}.lproj/aegisub.mo;
|
||||
mkdir -v "${PKG_DIR}/Contents/Resources/${i}.lproj";
|
||||
cp -v po/${i}.gmo "${PKG_DIR}/Contents/Resources/${i}.lproj/aegisub.mo";
|
||||
else
|
||||
echo "${i}.gmo not found!"
|
||||
exit 1
|
||||
|
@ -93,17 +93,17 @@ echo "---- Binaries ----"
|
|||
# it's a good enough hack until then.
|
||||
|
||||
if test src/${AEGISUB_BIN} -nt src/.libs/${AEGISUB_BIN}; then
|
||||
cp -v src/${AEGISUB_BIN} ${PKG_DIR}/Contents/MacOS/aegisub
|
||||
cp -v src/${AEGISUB_BIN} "${PKG_DIR}/Contents/MacOS/aegisub"
|
||||
else
|
||||
cp -v src/.libs/${AEGISUB_BIN} ${PKG_DIR}/Contents/MacOS/aegisub
|
||||
cp -v src/.libs/${AEGISUB_BIN} "${PKG_DIR}/Contents/MacOS/aegisub"
|
||||
fi
|
||||
|
||||
echo cc -o ${PKG_DIR}/Contents/MacOS/restart-helper scripts/osx-bundle-restart-helper.c
|
||||
${CC} -o ${PKG_DIR}/Contents/MacOS/restart-helper scripts/osx-bundle-restart-helper.c || exit $?
|
||||
echo cc -o "${PKG_DIR}/Contents/MacOS/restart-helper scripts/osx-bundle-restart-helper.c"
|
||||
${CC} -o "${PKG_DIR}/Contents/MacOS/restart-helper" scripts/osx-bundle-restart-helper.c || exit $?
|
||||
|
||||
echo
|
||||
echo "---- Libraries ----"
|
||||
python scripts/osx-fix-libs.py "${PKG_DIR}/Contents/MacOS/Aegisub" || exit $?
|
||||
python scripts/osx-fix-libs.py "${PKG_DIR}/Contents/MacOS/aegisub" || exit $?
|
||||
|
||||
echo
|
||||
echo "Done Creating ${PKG_DIR}"
|
||||
echo "Done Creating \"${PKG_DIR}\""
|
||||
|
|
|
@ -17,7 +17,7 @@ PKG_NAME_RW="${1}_rw.dmg"
|
|||
PKG_NAME_VOLUME="${2}"
|
||||
|
||||
if ! test -d "${PKG_DIR}"; then
|
||||
echo "${PKG_DIR} does not exist, please run 'make osx-bundle'"
|
||||
echo "\"${PKG_DIR}\" does not exist, please run 'make osx-bundle'"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
@ -28,18 +28,18 @@ if ! /usr/bin/perl -e 'require Mac::Finder::DSStore' > /dev/null 2>&1; then
|
|||
exit 1;
|
||||
fi
|
||||
|
||||
rm -rf ${TMP_DMG} "${PKG_NAME}.dmg"
|
||||
mkdir -v ${TMP_DMG}
|
||||
rm -rf "${TMP_DMG}" "${PKG_NAME}.dmg"
|
||||
mkdir -v "${TMP_DMG}"
|
||||
echo
|
||||
echo "---- Copying ${1} into ${TMP_DMG}/ ----"
|
||||
cp -R ${PKG_DIR} ${TMP_DMG}
|
||||
cp -R "${PKG_DIR}" "${TMP_DMG}"
|
||||
|
||||
echo
|
||||
echo "---- Setting up ----"
|
||||
ln -vsf /Applications "${TMP_DMG}"
|
||||
mkdir -v ${TMP_DMG}/.background
|
||||
cp -v packages/osx_dmg/dmg_background.png ${TMP_DMG}/.background/background.png
|
||||
cp -v packages/osx_bundle/Contents/Resources/Aegisub.icns ${TMP_DMG}/.VolumeIcon.icns
|
||||
mkdir -v "${TMP_DMG}/.background"
|
||||
cp -v packages/osx_dmg/dmg_background.png "${TMP_DMG}/.background/background.png"
|
||||
cp -v packages/osx_bundle/Contents/Resources/Aegisub.icns "${TMP_DMG}/.VolumeIcon.icns"
|
||||
|
||||
echo
|
||||
echo "---- Creating image ----"
|
||||
|
@ -71,8 +71,8 @@ echo "---- Compressing ----"
|
|||
/usr/bin/hdiutil convert "${PKG_NAME_RW}" -format UDZO -imagekey zlib-level=9 -o "${PKG_NAME}.dmg" || exit $?
|
||||
|
||||
echo
|
||||
echo "---- Removing ${TMP_DMG}, ${PKG_NAME_RW} ----"
|
||||
rm -rf ${TMP_DMG} ${PKG_NAME_RW} || exit $?
|
||||
echo "---- Removing \"${TMP_DMG}\", \"${PKG_NAME_RW}\" ----"
|
||||
rm -rf "${TMP_DMG}" "${PKG_NAME_RW}" || exit $?
|
||||
|
||||
echo
|
||||
echo "Done!"
|
||||
|
|
|
@ -18,7 +18,7 @@ def otool(cmdline):
|
|||
|
||||
def collectlibs(lib, masterlist, targetdir):
|
||||
global goodlist
|
||||
liblist = otool("-L " + lib)
|
||||
liblist = otool("-L '" + lib + "'")
|
||||
locallist = []
|
||||
for l in liblist:
|
||||
lr = otool_libname_extract(l)
|
||||
|
@ -55,10 +55,10 @@ print "Fixing library install names..."
|
|||
in_tool_cmdline = "install_name_tool "
|
||||
for lib in libs:
|
||||
libbase = os.path.basename(lib)
|
||||
in_tool_cmdline = in_tool_cmdline + ("-change %s @executable_path/%s " % (lib, libbase))
|
||||
in_tool_cmdline = in_tool_cmdline + ("-change '%s' '@executable_path/%s' " % (lib, libbase))
|
||||
for lib in libs:
|
||||
libbase = os.path.basename(lib)
|
||||
os.system("%s -id @executable_path/%s '%s/%s'" % (in_tool_cmdline, libbase, targetdir, libbase))
|
||||
os.system("%s -id '@executable_path/%s' '%s/%s'" % (in_tool_cmdline, libbase, targetdir, libbase))
|
||||
print lib, "-> @executable_path/" + libbase
|
||||
sys.stdout.flush()
|
||||
|
||||
|
|
Loading…
Reference in a new issue