Coder Social home page Coder Social logo

lamebuilder's Introduction

脚本名称

LameBuilderForiOS

使用方法

下载源码

将该脚本放到lame源码的根目录中. lame3.1版本源码下载地址为: lame3.1源码下载

配置参数

配置源码路径

假设dirPath_lameLib为您下载Lame库后放在电脑的路径.

需要在脚本中,设置libPath为该路径.

配置要编译的架构

在archs中,设定要编译的架构,默认为"i386 x86_64 armv7 arm64"

运行脚本

执行命令,编译Lame库 sh LameBuilderForiOS.sh

编译结果

该脚本会分别在 dirPath_lameLib/../Build/Thin/x86_64 dirPath_lameLib/../Build/Thin/i386 dirPath_lameLib/../Build/Thin/armv7s dirPath_lameLib/../Build/Thin/arm64 四个目录中,编译对应平台下的库文件 然后将四个平台下的库合并到 dirPath_lameLib/../Build/Fat中

实际使用时,我们只要把fat中的.a库文件和头文件一起拷贝到项目中去就可以了.

版本记录

0.0.3(0) 2020-11-18

1,调整脚本结构,便于阅读.

V0.0.2 2020-08-06

1,修复bug,连续编译多个架构时,只有第一次编译成功 将make clean移到make install后面,并添加make distclean命令,清除掉旧的Makefile文件. 2,将编译开关打开 3,修改README.md

V0.0.1 2020-04-16

first commit

lamebuilder's People

Stargazers

 avatar

Watchers

James Cloos avatar BinaryBang avatar  avatar

lamebuilder's Issues

你好的使用本sh出现了问题,能否指点一下~

进入根目录:
MacBook-Pro:lame-3.100 $ ls
ACM STYLEGUIDE fat
API TODO frontend
COPYING USAGE include
ChangeLog acinclude.m4 install-sh
DEFINES aclocal.m4 lame.bat
Dll compile lame.spec
HACKING config.guess lame.spec.in
INSTALL config.h.in libmp3lame
INSTALL.configure config.log ltmain.sh
LICENSE config.rpath mac
LameBuilderForiOS.sh config.sub macosx
Makefile.MSVC configMS.h misc
Makefile.am configure missing
Makefile.am.global configure.in mpglib
Makefile.in debian testcase.mp3
Makefile.unix depcomp testcase.wav
README doc vc_solution
README.WINGTK dshow

sh运行******

MacBook-Pro:lame-3.100 $ ./LameBuilderForiOS.sh
Welcome to use lame builder for iOS,version:0.0.1
If you have any problem using this build file,you can communicate with the author by email address: [email protected]
Now let's starting,you should have a cup of coffee...
Compile begin...
Building binariy for i386...
$configure_flags is : --enable-static --disable-shared --disable-frontend
$HOST is : --host=i386-apple-darwin
$CPU is :
$CC is : xcrun -sdk iphonesimulator clang -arch i386
$CXX is :
$CPP is :
$AS is :
$CFLAGS is : -arch i386 -fembed-bitcode -miphoneos-version-min=7.0
$LDFLAGS is : -arch i386 -fembed-bitcode -miphoneos-version-min=7.0
$CPPFLAGS is :
$prefix is : /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/i386
$ARCH_SELF is : x86_64-apple-darwin19.6.0
Configure command is: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/configure --enable-static --disable-shared --disable-frontend --host=i386-apple-darwin --build=x86_64-apple-darwin19.6.0 CC=xcrun -sdk iphonesimulator clang -arch i386 CXX=xcrun -sdk iphonesimulator clang -arch i386 CPP=xcrun -sdk iphonesimulator clang -arch i386 -E CFLAGS=-arch i386 -fembed-bitcode -miphoneos-version-min=7.0 LDFAGS=-arch i386 -fembed-bitcode -miphoneos-version-min=7.0 CPPFLAGS=-arch i386 -fembed-bitcode -miphoneos-version-min=7.0 --prefix=/Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/i386
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... i386-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: unsafe absolute working directory name
./LameBuilderForiOS.sh: line 124: CPPFLAGS=-arch i386 -fembed-bitcode -miphoneos-version-min=7.0: command not found
make: *** No rule to make target clean'. Stop. make: *** No targets specified and no makefile found. Stop. make: Nothing to be done for install'.
Building binariy for i386 finish
./LameBuilderForiOS.sh: line 135: cd: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/i386/lib/: No such file or directory
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/i386/lib/.a (No such file or directory)
Building binariy for x86_64...
$configure_flags is : --enable-static --disable-shared --disable-frontend
$HOST is : --host=x86_64-apple-darwin
$CPU is :
$CC is : xcrun -sdk iphonesimulator clang -arch x86_64
$CXX is :
$CPP is :
$AS is :
$CFLAGS is : -arch x86_64 -fembed-bitcode -miphoneos-version-min=7.0
$LDFLAGS is : -arch x86_64 -fembed-bitcode -miphoneos-version-min=7.0
$CPPFLAGS is :
$prefix is : /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/x86_64
$ARCH_SELF is : x86_64-apple-darwin19.6.0
Configure command is: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/configure --enable-static --disable-shared --disable-frontend --host=x86_64-apple-darwin --build=x86_64-apple-darwin19.6.0 CC=xcrun -sdk iphonesimulator clang -arch x86_64 CXX=xcrun -sdk iphonesimulator clang -arch x86_64 CPP=xcrun -sdk iphonesimulator clang -arch x86_64 -E CFLAGS=-arch x86_64 -fembed-bitcode -miphoneos-version-min=7.0 LDFAGS=-arch x86_64 -fembed-bitcode -miphoneos-version-min=7.0 CPPFLAGS=-arch x86_64 -fembed-bitcode -miphoneos-version-min=7.0 --prefix=/Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/x86_64
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... x86_64-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: unsafe absolute working directory name
./LameBuilderForiOS.sh: line 124: CPPFLAGS=-arch x86_64 -fembed-bitcode -miphoneos-version-min=7.0: command not found
make: *** No rule to make target clean'. Stop. make: *** No targets specified and no makefile found. Stop. make: Nothing to be done for install'.
Building binariy for x86_64 finish
./LameBuilderForiOS.sh: line 135: cd: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/x86_64/lib/: No such file or directory
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/x86_64/lib/
.a (No such file or directory)
Building binariy for arm64...
$configure_flags is : --enable-static --disable-shared --disable-frontend
$HOST is : --host=arm-apple-darwin
$CPU is :
$CC is : xcrun -sdk iphoneos clang -arch arm64
$CXX is :
$CPP is :
$AS is :
$CFLAGS is : -arch arm64 -fembed-bitcode -miphoneos-version-min=7.0
$LDFLAGS is : -arch arm64 -fembed-bitcode -miphoneos-version-min=7.0
$CPPFLAGS is :
$prefix is : /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/arm64
$ARCH_SELF is : x86_64-apple-darwin19.6.0
Configure command is: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/configure --enable-static --disable-shared --disable-frontend --host=arm-apple-darwin --build=x86_64-apple-darwin19.6.0 CC=xcrun -sdk iphoneos clang -arch arm64 CXX=xcrun -sdk iphoneos clang -arch arm64 CPP=xcrun -sdk iphoneos clang -arch arm64 -E CFLAGS=-arch arm64 -fembed-bitcode -miphoneos-version-min=7.0 LDFAGS=-arch arm64 -fembed-bitcode -miphoneos-version-min=7.0 CPPFLAGS=-arch arm64 -fembed-bitcode -miphoneos-version-min=7.0 --prefix=/Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/arm64
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... arm-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: unsafe absolute working directory name
./LameBuilderForiOS.sh: line 124: CPPFLAGS=-arch arm64 -fembed-bitcode -miphoneos-version-min=7.0: command not found
make: *** No rule to make target clean'. Stop. make: *** No targets specified and no makefile found. Stop. make: Nothing to be done for install'.
Building binariy for arm64 finish
./LameBuilderForiOS.sh: line 135: cd: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/arm64/lib/: No such file or directory
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/arm64/lib/.a (No such file or directory)
Building binariy for armv7s...
$configure_flags is : --enable-static --disable-shared --disable-frontend
$HOST is : --host=arm-apple-darwin
$CPU is :
$CC is : xcrun -sdk iphoneos clang -arch armv7s
$CXX is :
$CPP is :
$AS is :
$CFLAGS is : -arch armv7s -fembed-bitcode -miphoneos-version-min=7.0
$LDFLAGS is : -arch armv7s -fembed-bitcode -miphoneos-version-min=7.0
$CPPFLAGS is :
$prefix is : /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/armv7s
$ARCH_SELF is : x86_64-apple-darwin19.6.0
Configure command is: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/configure --enable-static --disable-shared --disable-frontend --host=arm-apple-darwin --build=x86_64-apple-darwin19.6.0 CC=xcrun -sdk iphoneos clang -arch armv7s CXX=xcrun -sdk iphoneos clang -arch armv7s CPP=xcrun -sdk iphoneos clang -arch armv7s -E CFLAGS=-arch armv7s -fembed-bitcode -miphoneos-version-min=7.0 LDFAGS=-arch armv7s -fembed-bitcode -miphoneos-version-min=7.0 CPPFLAGS=-arch armv7s -fembed-bitcode -miphoneos-version-min=7.0 --prefix=/Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/armv7s
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... arm-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: unsafe absolute working directory name
./LameBuilderForiOS.sh: line 124: CPPFLAGS=-arch armv7s -fembed-bitcode -miphoneos-version-min=7.0: command not found
make: *** No rule to make target clean'. Stop. make: *** No targets specified and no makefile found. Stop. make: Nothing to be done for install'.
Building binariy for armv7s finish
./LameBuilderForiOS.sh: line 135: cd: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/armv7s/lib/: No such file or directory
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/armv7s/lib/
.a (No such file or directory)
Compile finish.
Building fat binaries,start.
./LameBuilderForiOS.sh: line 153: cd: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/i386/lib: No such file or directory
$LIB is *.a
cmdFind is :
find /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin -name *.a
find: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin: No such file or directory
result of find is :

Output file is: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/fat/lib/.a
find: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin: No such file or directory
cmdLipo is: lipo -create -output /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/fat/lib/
.a
find: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin: No such file or directory
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: no input files specified
usage: lipo <input_file> [ ...]
command is one of:
-archs
-create
-detailed_info
-extract <arch_type> [-extract <arch_type> ...]
-extract_family <arch_type> [-extract_family <arch_type> ...]
-info
-remove <arch_type> [-remove <arch_type> ...]
-replace <arch_type> <file_name> [-replace <arch_type> <file_name> ...]
-thin <arch_type>
-verify_arch <arch_type> ...
options are one or more of:
-arch <arch_type> <input_file>
-hideARM64
-output <output_file>
-segalign <arch_type>
cp: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/thin/i386/include: No such file or directory
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/lvdachao/Desktop/YYHVideo&audio/downloads/mp3_lame/lame-3.100/fat/lib/*.a (No such file or directory)
Building fat binaries,finish.
Operation done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.