mirror of https://github.com/odrling/Aegisub
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
|
@ -23,11 +23,11 @@ SUBDIRS = \
|
||||||
desktop
|
desktop
|
||||||
|
|
||||||
osx-bundle:
|
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:
|
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:
|
osx-tinderbox-bundle:
|
||||||
@SHELL@ scripts/osx-bundle.sh "$(T_BUNDLE)" @AEGISUB_VERSION_DATA@ DICT_DIR="$(DICT_DIR)"
|
@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;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -d ${PKG_DIR}; then
|
if test -d "${PKG_DIR}"; then
|
||||||
echo "**** USING OLD ${PKG_DIR} ****"
|
echo "**** USING OLD ${PKG_DIR} ****"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Directory Structure ----"
|
echo "---- Directory Structure ----"
|
||||||
mkdir -v ${PKG_DIR}
|
mkdir -v "${PKG_DIR}"
|
||||||
mkdir -v ${PKG_DIR}/Contents
|
mkdir -v "${PKG_DIR}/Contents"
|
||||||
mkdir -v ${PKG_DIR}/Contents/MacOS
|
mkdir -v "${PKG_DIR}/Contents/MacOS"
|
||||||
mkdir -v ${PKG_DIR}/Contents/Resources
|
mkdir -v "${PKG_DIR}/Contents/Resources"
|
||||||
mkdir -v ${PKG_DIR}/Contents/Resources/etc
|
mkdir -v "${PKG_DIR}/Contents/Resources/etc"
|
||||||
mkdir -v ${PKG_DIR}/Contents/Resources/etc/fonts
|
mkdir -v "${PKG_DIR}/Contents/Resources/etc/fonts"
|
||||||
mkdir -v ${PKG_DIR}/Contents/Resources/etc/fonts/conf.d
|
mkdir -v "${PKG_DIR}/Contents/Resources/etc/fonts/conf.d"
|
||||||
mkdir -v ${PKG_DIR}/Contents/SharedSupport
|
mkdir -v "${PKG_DIR}/Contents/SharedSupport"
|
||||||
mkdir -v ${PKG_DIR}/Contents/SharedSupport/dictionaries
|
mkdir -v "${PKG_DIR}/Contents/SharedSupport/dictionaries"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Copying Skel Files ----"
|
echo "---- Copying Skel Files ----"
|
||||||
find ${SKEL_DIR} -type f -not -regex ".*.svn.*"
|
find ${SKEL_DIR} -type f -not -regex ".*.svn.*"
|
||||||
cp ${SKEL_DIR}/Contents/Resources/*.icns ${PKG_DIR}/Contents/Resources
|
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
|
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
|
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
|
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
|
cat ${SKEL_DIR}/Contents/Info.plist |sed -f scripts/osx-bundle.sed > "${PKG_DIR}/Contents/Info.plist"
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Copying dictionaries ----"
|
echo "---- Copying dictionaries ----"
|
||||||
if test -z ${DICT_DIR}; then
|
if test -z "${DICT_DIR}"; then
|
||||||
DICT_DIR="${HOME_DIR}/dict"
|
DICT_DIR="${HOME_DIR}/dict"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -d "${DICT_DIR}"; then
|
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
|
else
|
||||||
echo "WARNING: Dictionaries not found, please set $$DICT_DIR to a directiory"
|
echo "WARNING: Dictionaries not found, please set $$DICT_DIR to a directiory"
|
||||||
echo " where the *.aff and *.dic files can be found"
|
echo " where the *.aff and *.dic files can be found"
|
||||||
|
@ -61,21 +61,21 @@ echo
|
||||||
echo "---- Copying automation/ files ----"
|
echo "---- Copying automation/ files ----"
|
||||||
cd automation
|
cd automation
|
||||||
make install \
|
make install \
|
||||||
aegisubdatadir=../${PKG_DIR}/Contents/SharedSupport \
|
aegisubdatadir="../${PKG_DIR}/Contents/SharedSupport" \
|
||||||
aegisubdocdir=../${PKG_DIR}/Contents/SharedSupport/doc
|
aegisubdocdir="../${PKG_DIR}/Contents/SharedSupport/doc"
|
||||||
cd ${SRCDIR}
|
cd "${SRCDIR}"
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Copying locale files ----"
|
echo "---- Copying locale files ----"
|
||||||
# Let Aqua know that aegisub supports english. English strings are
|
# Let Aqua know that aegisub supports english. English strings are
|
||||||
# internal so we don't need an aegisub.mo file.
|
# 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
|
for i in `cat po/LINGUAS`; do
|
||||||
if test -f "po/${i}.gmo"; then
|
if test -f "po/${i}.gmo"; then
|
||||||
mkdir -v ${PKG_DIR}/Contents/Resources/${i}.lproj;
|
mkdir -v "${PKG_DIR}/Contents/Resources/${i}.lproj";
|
||||||
cp -v po/${i}.gmo ${PKG_DIR}/Contents/Resources/${i}.lproj/aegisub.mo;
|
cp -v po/${i}.gmo "${PKG_DIR}/Contents/Resources/${i}.lproj/aegisub.mo";
|
||||||
else
|
else
|
||||||
echo "${i}.gmo not found!"
|
echo "${i}.gmo not found!"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -93,17 +93,17 @@ echo "---- Binaries ----"
|
||||||
# it's a good enough hack until then.
|
# it's a good enough hack until then.
|
||||||
|
|
||||||
if test src/${AEGISUB_BIN} -nt src/.libs/${AEGISUB_BIN}; 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
|
else
|
||||||
cp -v src/.libs/${AEGISUB_BIN} ${PKG_DIR}/Contents/MacOS/aegisub
|
cp -v src/.libs/${AEGISUB_BIN} "${PKG_DIR}/Contents/MacOS/aegisub"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo cc -o ${PKG_DIR}/Contents/MacOS/restart-helper scripts/osx-bundle-restart-helper.c
|
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 $?
|
${CC} -o "${PKG_DIR}/Contents/MacOS/restart-helper" scripts/osx-bundle-restart-helper.c || exit $?
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Libraries ----"
|
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
|
||||||
echo "Done Creating ${PKG_DIR}"
|
echo "Done Creating \"${PKG_DIR}\""
|
||||||
|
|
|
@ -17,7 +17,7 @@ PKG_NAME_RW="${1}_rw.dmg"
|
||||||
PKG_NAME_VOLUME="${2}"
|
PKG_NAME_VOLUME="${2}"
|
||||||
|
|
||||||
if ! test -d "${PKG_DIR}"; then
|
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;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -28,18 +28,18 @@ if ! /usr/bin/perl -e 'require Mac::Finder::DSStore' > /dev/null 2>&1; then
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf ${TMP_DMG} "${PKG_NAME}.dmg"
|
rm -rf "${TMP_DMG}" "${PKG_NAME}.dmg"
|
||||||
mkdir -v ${TMP_DMG}
|
mkdir -v "${TMP_DMG}"
|
||||||
echo
|
echo
|
||||||
echo "---- Copying ${1} into ${TMP_DMG}/ ----"
|
echo "---- Copying ${1} into ${TMP_DMG}/ ----"
|
||||||
cp -R ${PKG_DIR} ${TMP_DMG}
|
cp -R "${PKG_DIR}" "${TMP_DMG}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Setting up ----"
|
echo "---- Setting up ----"
|
||||||
ln -vsf /Applications "${TMP_DMG}"
|
ln -vsf /Applications "${TMP_DMG}"
|
||||||
mkdir -v ${TMP_DMG}/.background
|
mkdir -v "${TMP_DMG}/.background"
|
||||||
cp -v packages/osx_dmg/dmg_background.png ${TMP_DMG}/.background/background.png
|
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
|
cp -v packages/osx_bundle/Contents/Resources/Aegisub.icns "${TMP_DMG}/.VolumeIcon.icns"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Creating image ----"
|
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 $?
|
/usr/bin/hdiutil convert "${PKG_NAME_RW}" -format UDZO -imagekey zlib-level=9 -o "${PKG_NAME}.dmg" || exit $?
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "---- Removing ${TMP_DMG}, ${PKG_NAME_RW} ----"
|
echo "---- Removing \"${TMP_DMG}\", \"${PKG_NAME_RW}\" ----"
|
||||||
rm -rf ${TMP_DMG} ${PKG_NAME_RW} || exit $?
|
rm -rf "${TMP_DMG}" "${PKG_NAME_RW}" || exit $?
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
|
@ -18,7 +18,7 @@ def otool(cmdline):
|
||||||
|
|
||||||
def collectlibs(lib, masterlist, targetdir):
|
def collectlibs(lib, masterlist, targetdir):
|
||||||
global goodlist
|
global goodlist
|
||||||
liblist = otool("-L " + lib)
|
liblist = otool("-L '" + lib + "'")
|
||||||
locallist = []
|
locallist = []
|
||||||
for l in liblist:
|
for l in liblist:
|
||||||
lr = otool_libname_extract(l)
|
lr = otool_libname_extract(l)
|
||||||
|
@ -55,10 +55,10 @@ print "Fixing library install names..."
|
||||||
in_tool_cmdline = "install_name_tool "
|
in_tool_cmdline = "install_name_tool "
|
||||||
for lib in libs:
|
for lib in libs:
|
||||||
libbase = os.path.basename(lib)
|
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:
|
for lib in libs:
|
||||||
libbase = os.path.basename(lib)
|
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
|
print lib, "-> @executable_path/" + libbase
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue