55 Star 270 Fork 3

腾讯开源/ncnn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
package.sh 6.88 KB
一键复制 编辑 原始数据 按行查看 历史
nihui 提交于 2020-07-27 11:22 . fix typo
#!/usr/bin/bash
NAME=ncnn
##### package android lib
ANDROIDPKGNAME=${NAME}-android-lib
rm -rf $ANDROIDPKGNAME
mkdir -p $ANDROIDPKGNAME
mkdir -p $ANDROIDPKGNAME/armeabi-v7a
mkdir -p $ANDROIDPKGNAME/arm64-v8a
mkdir -p $ANDROIDPKGNAME/x86
mkdir -p $ANDROIDPKGNAME/x86_64
mkdir -p $ANDROIDPKGNAME/include
cp build-android-armv7/install/lib/lib*.a $ANDROIDPKGNAME/armeabi-v7a/
cp build-android-aarch64/install/lib/lib*.a $ANDROIDPKGNAME/arm64-v8a/
cp build-android-x86/install/lib/lib*.a $ANDROIDPKGNAME/x86/
cp build-android-x86_64/install/lib/lib*.a $ANDROIDPKGNAME/x86_64/
cp -r build-android-aarch64/install/include/* $ANDROIDPKGNAME/include/
rm -f $ANDROIDPKGNAME.zip
zip -9 -r $ANDROIDPKGNAME.zip $ANDROIDPKGNAME
##### package ios framework
IOSPKGNAME=${NAME}.framework
rm -rf $IOSPKGNAME
mkdir -p $IOSPKGNAME/Versions/A/Headers
mkdir -p $IOSPKGNAME/Versions/A/Resources
ln -s A $IOSPKGNAME/Versions/Current
ln -s Versions/Current/Headers $IOSPKGNAME/Headers
ln -s Versions/Current/Resources $IOSPKGNAME/Resources
ln -s Versions/Current/${NAME} $IOSPKGNAME/${NAME}
lipo -create \
build-ios/install/lib/lib${NAME}.a \
build-ios-sim/install/lib/lib${NAME}.a \
-o $IOSPKGNAME/Versions/A/${NAME}
cp -r build-ios/install/include/* $IOSPKGNAME/Versions/A/Headers/
cp Info.plist ${IOSPKGNAME}/Versions/A/Resources/
rm -f $IOSPKGNAME.zip
zip -9 -y -r $IOSPKGNAME.zip $IOSPKGNAME
##### package ios framework bitcode
IOSPKGNAME=${NAME}.framework
rm -rf $IOSPKGNAME
mkdir -p $IOSPKGNAME/Versions/A/Headers
mkdir -p $IOSPKGNAME/Versions/A/Resources
ln -s A $IOSPKGNAME/Versions/Current
ln -s Versions/Current/Headers $IOSPKGNAME/Headers
ln -s Versions/Current/Resources $IOSPKGNAME/Resources
ln -s Versions/Current/${NAME} $IOSPKGNAME/${NAME}
lipo -create \
build-ios-bitcode/install/lib/lib${NAME}.a \
build-ios-sim-bitcode/install/lib/lib${NAME}.a \
-o $IOSPKGNAME/Versions/A/${NAME}
cp -r build-ios-bitcode/install/include/ncnn $IOSPKGNAME/Versions/A/Headers/
cp Info.plist ${IOSPKGNAME}/Versions/A/Resources/
rm -f $IOSPKGNAME-bitcode.zip
zip -9 -y -r $IOSPKGNAME-bitcode.zip $IOSPKGNAME
##### package android lib vulkan
ANDROIDPKGNAME=${NAME}-android-vulkan-lib
rm -rf $ANDROIDPKGNAME
mkdir -p $ANDROIDPKGNAME
mkdir -p $ANDROIDPKGNAME/armeabi-v7a
mkdir -p $ANDROIDPKGNAME/arm64-v8a
mkdir -p $ANDROIDPKGNAME/x86
mkdir -p $ANDROIDPKGNAME/x86_64
mkdir -p $ANDROIDPKGNAME/include
cp build-android-armv7-vulkan/install/lib/lib*.a $ANDROIDPKGNAME/armeabi-v7a/
cp build-android-aarch64-vulkan/install/lib/lib*.a $ANDROIDPKGNAME/arm64-v8a/
cp build-android-x86-vulkan/install/lib/lib*.a $ANDROIDPKGNAME/x86/
cp build-android-x86_64-vulkan/install/lib/lib*.a $ANDROIDPKGNAME/x86_64/
cp -r build-android-aarch64-vulkan/install/include/* $ANDROIDPKGNAME/include/
rm -f $ANDROIDPKGNAME.zip
zip -9 -r $ANDROIDPKGNAME.zip $ANDROIDPKGNAME
##### package ios framework vulkan
IOSPKGNAME=${NAME}.framework
rm -rf $IOSPKGNAME
mkdir -p $IOSPKGNAME/Versions/A/Headers
mkdir -p $IOSPKGNAME/Versions/A/Resources
ln -s A $IOSPKGNAME/Versions/Current
ln -s Versions/Current/Headers $IOSPKGNAME/Headers
ln -s Versions/Current/Resources $IOSPKGNAME/Resources
ln -s Versions/Current/${NAME} $IOSPKGNAME/${NAME}
lipo -create \
build-ios-vulkan/install/lib/lib${NAME}.a \
build-ios-sim-vulkan/install/lib/lib${NAME}.a \
-o $IOSPKGNAME/Versions/A/${NAME}
cp -r build-ios-vulkan/install/include/ncnn $IOSPKGNAME/Versions/A/Headers/
cp Info.plist ${IOSPKGNAME}/Versions/A/Resources/
rm -f $IOSPKGNAME-vulkan.zip
zip -9 -y -r $IOSPKGNAME-vulkan.zip $IOSPKGNAME
##### package ios framework vulkan bitcode
IOSPKGNAME=${NAME}.framework
rm -rf $IOSPKGNAME
mkdir -p $IOSPKGNAME/Versions/A/Headers
mkdir -p $IOSPKGNAME/Versions/A/Resources
ln -s A $IOSPKGNAME/Versions/Current
ln -s Versions/Current/Headers $IOSPKGNAME/Headers
ln -s Versions/Current/Resources $IOSPKGNAME/Resources
ln -s Versions/Current/${NAME} $IOSPKGNAME/${NAME}
lipo -create \
build-ios-vulkan-bitcode/install/lib/lib${NAME}.a \
build-ios-sim-vulkan-bitcode/install/lib/lib${NAME}.a \
-o $IOSPKGNAME/Versions/A/${NAME}
cp -r build-ios-vulkan-bitcode/install/include/ncnn $IOSPKGNAME/Versions/A/Headers/
cp Info.plist ${IOSPKGNAME}/Versions/A/Resources/
rm -f $IOSPKGNAME-vulkan-bitcode.zip
zip -9 -y -r $IOSPKGNAME-vulkan-bitcode.zip $IOSPKGNAME
##### package ios framework glslang
IOSPKGNAME=glslang.framework
rm -rf $IOSPKGNAME
mkdir -p $IOSPKGNAME/Versions/A/Headers
mkdir -p $IOSPKGNAME/Versions/A/Resources
ln -s A $IOSPKGNAME/Versions/Current
ln -s Versions/Current/Headers $IOSPKGNAME/Headers
ln -s Versions/Current/Resources $IOSPKGNAME/Resources
ln -s Versions/Current/glslang $IOSPKGNAME/glslang
libtool -static \
build-ios-vulkan/install/lib/libglslang.a \
build-ios-vulkan/install/lib/libSPIRV.a \
build-ios-vulkan/install/lib/libOGLCompiler.a \
build-ios-vulkan/install/lib/libOSDependent.a \
-o build-ios-vulkan/install/lib/libglslang_combined.a
libtool -static \
build-ios-sim-vulkan/install/lib/libglslang.a \
build-ios-sim-vulkan/install/lib/libSPIRV.a \
build-ios-sim-vulkan/install/lib/libOGLCompiler.a \
build-ios-sim-vulkan/install/lib/libOSDependent.a \
-o build-ios-sim-vulkan/install/lib/libglslang_combined.a
lipo -create \
build-ios-vulkan/install/lib/libglslang_combined.a \
build-ios-sim-vulkan/install/lib/libglslang_combined.a \
-o $IOSPKGNAME/Versions/A/glslang
cp -r build-ios-vulkan/install/include/glslang $IOSPKGNAME/Versions/A/Headers/
cp Info.plist ${IOSPKGNAME}/Versions/A/Resources/
rm -f $IOSPKGNAME.zip
zip -9 -y -r $IOSPKGNAME.zip $IOSPKGNAME
##### package ios framework glslang bitcode
IOSPKGNAME=glslang.framework
rm -rf $IOSPKGNAME
mkdir -p $IOSPKGNAME/Versions/A/Headers
mkdir -p $IOSPKGNAME/Versions/A/Resources
ln -s A $IOSPKGNAME/Versions/Current
ln -s Versions/Current/Headers $IOSPKGNAME/Headers
ln -s Versions/Current/Resources $IOSPKGNAME/Resources
ln -s Versions/Current/glslang $IOSPKGNAME/glslang
libtool -static \
build-ios-vulkan-bitcode/install/lib/libglslang.a \
build-ios-vulkan-bitcode/install/lib/libSPIRV.a \
build-ios-vulkan-bitcode/install/lib/libOGLCompiler.a \
build-ios-vulkan-bitcode/install/lib/libOSDependent.a \
-o build-ios-vulkan-bitcode/install/lib/libglslang_combined.a
libtool -static \
build-ios-sim-vulkan-bitcode/install/lib/libglslang.a \
build-ios-sim-vulkan-bitcode/install/lib/libSPIRV.a \
build-ios-sim-vulkan-bitcode/install/lib/libOGLCompiler.a \
build-ios-sim-vulkan-bitcode/install/lib/libOSDependent.a \
-o build-ios-sim-vulkan-bitcode/install/lib/libglslang_combined.a
lipo -create \
build-ios-vulkan-bitcode/install/lib/libglslang_combined.a \
build-ios-sim-vulkan-bitcode/install/lib/libglslang_combined.a \
-o $IOSPKGNAME/Versions/A/glslang
cp -r build-ios-vulkan-bitcode/install/include/glslang $IOSPKGNAME/Versions/A/Headers/
cp Info.plist ${IOSPKGNAME}/Versions/A/Resources/
rm -f $IOSPKGNAME-bitcode.zip
zip -9 -y -r $IOSPKGNAME-bitcode.zip $IOSPKGNAME
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/Tencent/ncnn.git
[email protected]:Tencent/ncnn.git
Tencent
ncnn
ncnn
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385