📄 mac_packager
字号:
#!/bin/sh################################################### aMule.app bundle creator. ##################################################### This file is part of the aMule Project#### Copyright (c) 2004-2008 Angel Vidal (Kry) ( kry@amule.org )## Copyright (c) 2003-2008 aMule Project ( http://www.amule-project.net )#### This program is free software; you can redistribute it and/or## modify it under the terms of the GNU General Public License## as published by the Free Software Foundation; either## version 2 of the License, or (at your option) any later version.#### This program is distributed in the hope that it will be useful,## but WITHOUT ANY WARRANTY; without even the implied warranty of## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the## GNU General Public License for more details.#### You should have received a copy of the GNU General Public License## along with this program; if not, write to the Free Software## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USAecho ""echo -n "Step 1: Cleaning bundle... "rm aMule.app/Contents/Frameworks/libwx_* aMule.app/Contents/MacOS/* 1> /dev/null 2> /dev/nullrm -r aMule.app/Contents/Resources/webserver 1> /dev/null 2> /dev/nullrm -r aMule.app/Contents/SharedSupport 1> /dev/null 2> /dev/nullecho "Done"echo ""echo -n "Step 2: Copying aMule to app bundle... " cp src/amule aMule.app/Contents/MacOS/cp src/webserver/src/amuleweb aMule.app/Contents/MacOS/cp src/ed2k aMule.app/Contents/MacOS/cp src/amulecmd aMule.app/Contents/MacOS/cp -R src/webserver aMule.app/Contents/Resourcesfind aMule.app/Contents/Resources/webserver \( -name .svn -o -name "Makefile*" -o -name src \) -print0 | xargs -0 rm -rfecho "Done"echo ""echo -n "Step 3: Installing translations to app bundle... "orig_dir=`pwd`cd pomake install datadir=$orig_dir/aMule.app/Contents/SharedSupport 1> /dev/null 2> /dev/nullcd $orig_direcho "Done"echo ""echo "Step 4: Copying libs to Framework"echo " wxWidgets..."# wxWidgets libs to frameworksfor i in $( otool -L aMule.app/Contents/MacOS/amule \ aMule.app/Contents/MacOS/amuleweb \ aMule.app/Contents/MacOS/ed2k \ aMule.app/Contents/MacOS/amulecmd \ | sort -u | grep libwx_ | cut -d " " -f 1 ); do cp $i aMule.app/Contents/Frameworks; doneecho "Libs copy done."echo ""echo "Step 5: Update libs info"#then install_name_tool on them to fix the path on the shared libcd aMule.app/Contents/for i in $( ls Frameworks | grep -v CVS); do echo " Updating $i" #update library id install_name_tool -id @executable_path/../Frameworks/$i Frameworks/$i #update library links for j in $( otool -L Frameworks/$i | grep libwx_ | cut -d " " -f 1 ); do install_name_tool -change \ $j @executable_path/../Frameworks/`echo $j | rev | cut -d "/" -f 1 | rev` \ Frameworks/$i 1> /dev/null 2> /dev/null done echo " Updating aMule lib info for $i" #update amule executable install_name_tool -change \ `otool -L MacOS/amule | grep $i | cut -d " " -f 1` \ @executable_path/../Frameworks/$i MacOS/amule 1> /dev/null 2> /dev/null install_name_tool -change \ `otool -L MacOS/amuleweb | grep $i | cut -d " " -f 1` \ @executable_path/../Frameworks/$i MacOS/amuleweb 1> /dev/null 2> /dev/null install_name_tool -change \ `otool -L MacOS/ed2k | grep $i | cut -d " " -f 1` \ @executable_path/../Frameworks/$i MacOS/ed2k 1> /dev/null 2> /dev/null install_name_tool -change \ `otool -L MacOS/amulecmd | grep $i | cut -d " " -f 1` \ @executable_path/../Frameworks/$i MacOS/amulecmd 1> /dev/null 2> /dev/nulldoneecho "Libs info updated, aMule.app is ready to package."echo ""cd ../..echo -n "Creating aMule.zip... "zip -9 -r aMule.zip aMule.app/ -j docs/README.Mac.txt docs/COPYING > /dev/nullecho "Done"echo ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -