shell编译xcode打包静态/动态库之shell编译xcode
2015-05-20 13:19
344 查看
在利用shell编译xcode之前先熟悉一些常用的linux命令行
(1)当前目录命令
CURRENTPATH=`pwd`
(2)判断某一路径是否是文件夹
if [ ! -d
"$DEVELOPER" ]; then
exit
1
fi
(3)下载某个网址
curl -O https://www.openssl.org/source/文件名 (4)创建某个路径下的某个文件夹
mkdir -p
"${CURRENTPATH}/src"
(5)切换到某个路径下
cd "${CURRENTPATH}/src}"
(6)遍历数组中的内容
ARCHS="i386 x86_64 armv7 armv7s arm64"
for ARCH
in ${ARCHS}
done
(7)拷贝某个路径下的文件到另一个路径
cp -R 文件A 路径B
(8)打印某个目录下 带有某个文件后缀的文件名
dir=$(ls -l $CURRENTPATH |awk
'/^d/ {print $NF}')
for i
in $dir
do
if [[ $i =~ \.xcodeproj$ ]];
then
ISVAILDPATH="ISTRUE"
TARGETNAME="${i%.*}"
echo "$TARGETNAME"
echo $i
fi
done
(9)xcode静态库打包
xcodebuild -target $TARGETNAME -configuration Release -sdk iphonesimulator -arch i386 -arch x86_64
xcodebuild -target $TARGETNAME -configuration Release -sdk iphoneos -arch armv7 -arch armv7s -arch arm64
(10)创建动态库并宝贝h文件
libtool -no_warning_for_no_symbols $LIBTOOL_FLAGS -o $FWNAME.framework/$FWNAME $RELEASEIPHONEA/$STATICLIBNAME $RELEASESIMULATORA/$STATICLIBNAME
cp -r $RELEASEIPHONEA/"include/$TARGETNAME"/* $FWNAME.framework/Headers/
(11)编译xcode
xcodebuild -target targetName
clean
xcodebuild
-target targetName
xcrun
-sdk iphoneos PackageApplication -v path/To/xxx.app -o xxx.ipa
第二部生成APP第三步生成可以发布的ipa
(1)当前目录命令
CURRENTPATH=`pwd`
(2)判断某一路径是否是文件夹
if [ ! -d
"$DEVELOPER" ]; then
exit
1
fi
(3)下载某个网址
curl -O https://www.openssl.org/source/文件名 (4)创建某个路径下的某个文件夹
mkdir -p
"${CURRENTPATH}/src"
(5)切换到某个路径下
cd "${CURRENTPATH}/src}"
(6)遍历数组中的内容
ARCHS="i386 x86_64 armv7 armv7s arm64"
for ARCH
in ${ARCHS}
done
(7)拷贝某个路径下的文件到另一个路径
cp -R 文件A 路径B
(8)打印某个目录下 带有某个文件后缀的文件名
dir=$(ls -l $CURRENTPATH |awk
'/^d/ {print $NF}')
for i
in $dir
do
if [[ $i =~ \.xcodeproj$ ]];
then
ISVAILDPATH="ISTRUE"
TARGETNAME="${i%.*}"
echo "$TARGETNAME"
echo $i
fi
done
(9)xcode静态库打包
xcodebuild -target $TARGETNAME -configuration Release -sdk iphonesimulator -arch i386 -arch x86_64
xcodebuild -target $TARGETNAME -configuration Release -sdk iphoneos -arch armv7 -arch armv7s -arch arm64
(10)创建动态库并宝贝h文件
libtool -no_warning_for_no_symbols $LIBTOOL_FLAGS -o $FWNAME.framework/$FWNAME $RELEASEIPHONEA/$STATICLIBNAME $RELEASESIMULATORA/$STATICLIBNAME
cp -r $RELEASEIPHONEA/"include/$TARGETNAME"/* $FWNAME.framework/Headers/
(11)编译xcode
xcodebuild -target targetName
clean
xcodebuild
-target targetName
xcrun
-sdk iphoneos PackageApplication -v path/To/xxx.app -o xxx.ipa
第二部生成APP第三步生成可以发布的ipa
相关文章推荐
- shell编译xcode打包静态/动态库之shell基本语法
- Android导入第三方静态库.a编译成动态库.so
- jenkins-1.59+sonarqube-6.5+sonar-scanner-3.0.3.778+maven-3.3.9+shell检查打包编译java项目
- Xcode 依赖管理带来的静态库动态库分析
- Unity打包xcode工程编译错误整理
- C++编译连接总结(二)--自己的静态库动态库的编译与引用
- 几行shell帮你的xcode迅速自动批量打包ipa
- android编译openssl静态库.a 动态库.so
- IOS 如何打包XCODE编译后的APP成IPA格式
- IOS 通过脚本自动打包工具 webfrogs/xcode_shell
- 自己主动下载源代码_并编译_打包_部署_重新启动服务的Shell脚本
- iOS自动化编译打包提交-Shell脚本实现
- 在Linux下如何使用GCC编译程序、简单生成 静态库及动态库。
- 自动下载源码_并编译_打包_部署_重启服务的Shell脚本
- opencv交叉编译arm环境库,静态,动态库和可执行程序
- xcode 编译或者打包的时候 找不到图片的错误
- Xcode 打包动态及静态Framework
- xcode 静态库中资源文件及xib打包
- Unity打包xcode工程编译错误及解决方法
- 关于windows 静态动态库 还有编译选项的一些问题