From 929a90c01c7160211c19045d54961868a57dc3bf Mon Sep 17 00:00:00 2001 From: Peter <> Date: Tue, 11 Dec 2018 21:56:38 +0400 Subject: [PATCH] Update project --- .gitignore | 24 ++++++++ FFMpeg.xcodeproj/project.pbxproj | 96 ++++++++++++++++---------------- FFMpeg/build-ffmpeg.sh | 46 ++++++++++----- FFMpeg/libopus/opus.pc | 3 +- 4 files changed, 104 insertions(+), 65 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..249d3670f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +fastlane/README.md +fastlane/report.xml +fastlane/test_output/* +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.xcscmblueprint +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +.DS_Store +*.dSYM +*.dSYM.zip +*.ipa +*/xcuserdata/* diff --git a/FFMpeg.xcodeproj/project.pbxproj b/FFMpeg.xcodeproj/project.pbxproj index 50b4e7ea7e..5f323744a9 100644 --- a/FFMpeg.xcodeproj/project.pbxproj +++ b/FFMpeg.xcodeproj/project.pbxproj @@ -444,7 +444,7 @@ }; name = Release; }; - D05B076121BFB99900B1D27C /* Debug Hockeyapp */ = { + D05B076121BFB99900B1D27C /* DebugHockeyapp */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -504,9 +504,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = "Debug Hockeyapp"; + name = DebugHockeyapp; }; - D05B076221BFB99900B1D27C /* Debug Hockeyapp */ = { + D05B076221BFB99900B1D27C /* DebugHockeyapp */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -534,9 +534,9 @@ TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$BUILT_PRODUCTS_DIR/FFMpeg/FFmpeg-iOS/include"; }; - name = "Debug Hockeyapp"; + name = DebugHockeyapp; }; - D05B076321BFB9A100B1D27C /* Debug Fork */ = { + D05B076321BFB9A100B1D27C /* DebugFork */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -596,9 +596,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = "Debug Fork"; + name = DebugFork; }; - D05B076421BFB9A100B1D27C /* Debug Fork */ = { + D05B076421BFB9A100B1D27C /* DebugFork */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -626,9 +626,9 @@ TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$BUILT_PRODUCTS_DIR/FFMpeg/FFmpeg-iOS/include"; }; - name = "Debug Fork"; + name = DebugFork; }; - D05B076521BFB9A600B1D27C /* Debug AppStore */ = { + D05B076521BFB9A600B1D27C /* DebugAppStore */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -688,9 +688,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = "Debug AppStore"; + name = DebugAppStore; }; - D05B076621BFB9A600B1D27C /* Debug AppStore */ = { + D05B076621BFB9A600B1D27C /* DebugAppStore */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -718,9 +718,9 @@ TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$BUILT_PRODUCTS_DIR/FFMpeg/FFmpeg-iOS/include"; }; - name = "Debug AppStore"; + name = DebugAppStore; }; - D05B076721BFB9AF00B1D27C /* Debug AppStore LLC */ = { + D05B076721BFB9AF00B1D27C /* DebugAppStoreLLC */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -780,9 +780,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = "Debug AppStore LLC"; + name = DebugAppStoreLLC; }; - D05B076821BFB9AF00B1D27C /* Debug AppStore LLC */ = { + D05B076821BFB9AF00B1D27C /* DebugAppStoreLLC */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -810,9 +810,9 @@ TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$BUILT_PRODUCTS_DIR/FFMpeg/FFmpeg-iOS/include"; }; - name = "Debug AppStore LLC"; + name = DebugAppStoreLLC; }; - D05B076921BFB9B700B1D27C /* Release Hockeyapp */ = { + D05B076921BFB9B700B1D27C /* ReleaseHockeyapp */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -866,9 +866,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = "Release Hockeyapp"; + name = ReleaseHockeyapp; }; - D05B076A21BFB9B700B1D27C /* Release Hockeyapp */ = { + D05B076A21BFB9B700B1D27C /* ReleaseHockeyapp */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -896,9 +896,9 @@ TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$BUILT_PRODUCTS_DIR/FFMpeg/FFmpeg-iOS/include"; }; - name = "Release Hockeyapp"; + name = ReleaseHockeyapp; }; - D05B076B21BFB9BE00B1D27C /* Release Hockeyapp Internal */ = { + D05B076B21BFB9BE00B1D27C /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -952,9 +952,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = "Release Hockeyapp Internal"; + name = ReleaseHockeyappInternal; }; - D05B076C21BFB9BE00B1D27C /* Release Hockeyapp Internal */ = { + D05B076C21BFB9BE00B1D27C /* ReleaseHockeyappInternal */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -982,9 +982,9 @@ TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$BUILT_PRODUCTS_DIR/FFMpeg/FFmpeg-iOS/include"; }; - name = "Release Hockeyapp Internal"; + name = ReleaseHockeyappInternal; }; - D05B076D21BFB9C900B1D27C /* Release AppStore */ = { + D05B076D21BFB9C900B1D27C /* ReleaseAppStore */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -1038,9 +1038,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = "Release AppStore"; + name = ReleaseAppStore; }; - D05B076E21BFB9C900B1D27C /* Release AppStore */ = { + D05B076E21BFB9C900B1D27C /* ReleaseAppStore */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -1068,9 +1068,9 @@ TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$BUILT_PRODUCTS_DIR/FFMpeg/FFmpeg-iOS/include"; }; - name = "Release AppStore"; + name = ReleaseAppStore; }; - D05B076F21BFB9D200B1D27C /* Release AppStore LLC */ = { + D05B076F21BFB9D200B1D27C /* ReleaseAppStoreLLC */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -1124,9 +1124,9 @@ VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = "Release AppStore LLC"; + name = ReleaseAppStoreLLC; }; - D05B077021BFB9D200B1D27C /* Release AppStore LLC */ = { + D05B077021BFB9D200B1D27C /* ReleaseAppStoreLLC */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; @@ -1154,7 +1154,7 @@ TARGETED_DEVICE_FAMILY = "1,2"; USER_HEADER_SEARCH_PATHS = "$BUILT_PRODUCTS_DIR/FFMpeg/FFmpeg-iOS/include"; }; - name = "Release AppStore LLC"; + name = ReleaseAppStoreLLC; }; /* End XCBuildConfiguration section */ @@ -1163,15 +1163,15 @@ isa = XCConfigurationList; buildConfigurations = ( D04554BB21BF0E8E007A6DD9 /* Debug */, - D05B076721BFB9AF00B1D27C /* Debug AppStore LLC */, - D05B076521BFB9A600B1D27C /* Debug AppStore */, - D05B076321BFB9A100B1D27C /* Debug Fork */, - D05B076121BFB99900B1D27C /* Debug Hockeyapp */, + D05B076721BFB9AF00B1D27C /* DebugAppStoreLLC */, + D05B076521BFB9A600B1D27C /* DebugAppStore */, + D05B076321BFB9A100B1D27C /* DebugFork */, + D05B076121BFB99900B1D27C /* DebugHockeyapp */, D04554BC21BF0E8E007A6DD9 /* Release */, - D05B076F21BFB9D200B1D27C /* Release AppStore LLC */, - D05B076D21BFB9C900B1D27C /* Release AppStore */, - D05B076B21BFB9BE00B1D27C /* Release Hockeyapp Internal */, - D05B076921BFB9B700B1D27C /* Release Hockeyapp */, + D05B076F21BFB9D200B1D27C /* ReleaseAppStoreLLC */, + D05B076D21BFB9C900B1D27C /* ReleaseAppStore */, + D05B076B21BFB9BE00B1D27C /* ReleaseHockeyappInternal */, + D05B076921BFB9B700B1D27C /* ReleaseHockeyapp */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1180,15 +1180,15 @@ isa = XCConfigurationList; buildConfigurations = ( D04554BE21BF0E8E007A6DD9 /* Debug */, - D05B076821BFB9AF00B1D27C /* Debug AppStore LLC */, - D05B076621BFB9A600B1D27C /* Debug AppStore */, - D05B076421BFB9A100B1D27C /* Debug Fork */, - D05B076221BFB99900B1D27C /* Debug Hockeyapp */, + D05B076821BFB9AF00B1D27C /* DebugAppStoreLLC */, + D05B076621BFB9A600B1D27C /* DebugAppStore */, + D05B076421BFB9A100B1D27C /* DebugFork */, + D05B076221BFB99900B1D27C /* DebugHockeyapp */, D04554BF21BF0E8E007A6DD9 /* Release */, - D05B077021BFB9D200B1D27C /* Release AppStore LLC */, - D05B076E21BFB9C900B1D27C /* Release AppStore */, - D05B076C21BFB9BE00B1D27C /* Release Hockeyapp Internal */, - D05B076A21BFB9B700B1D27C /* Release Hockeyapp */, + D05B077021BFB9D200B1D27C /* ReleaseAppStoreLLC */, + D05B076E21BFB9C900B1D27C /* ReleaseAppStore */, + D05B076C21BFB9BE00B1D27C /* ReleaseHockeyappInternal */, + D05B076A21BFB9B700B1D27C /* ReleaseHockeyapp */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/FFMpeg/build-ffmpeg.sh b/FFMpeg/build-ffmpeg.sh index 5fd8270be4..93c4abbfaf 100755 --- a/FFMpeg/build-ffmpeg.sh +++ b/FFMpeg/build-ffmpeg.sh @@ -1,16 +1,5 @@ #!/bin/sh -if [ "$1" = "debug" ]; -then - CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-optimizations --disable-stripping" -elif [ "$1" = "release" ]; -then - CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-debug" -else - echo "No configuration specified (debug / release)" - exit 1 -fi - ARCHS="$2" for ARCH in $ARCHS @@ -35,9 +24,7 @@ FAT="$BUILD_DIR/FFmpeg-iOS" SCRATCH="$BUILD_DIR/scratch" THIN="$BUILD_DIR/thin" -export PKG_CONFIG_PATH="$SOURCE_DIR/libopus" - -LIBOPUS="$SOURCE_DIR/libopus" +PKG_CONFIG="$SOURCE_DIR/pkg-config-wrapper.sh" set -e @@ -56,6 +43,20 @@ CONFIGURE_FLAGS="--enable-cross-compile --disable-programs \ --enable-parser=aac,h264,mp3,libopus \ " + +if [ "$1" = "debug" ]; +then + CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-optimizations --disable-stripping" +elif [ "$1" = "release" ]; +then + CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-debug" +else + echo "No configuration specified (debug / release)" + exit 1 +fi + +#CONFIGURE_FLAGS="$CONFIGURE_FLAGS --pkg-config=$PKG_CONFIG" + COMPILE="y" LIPO="y" @@ -97,6 +98,19 @@ then mkdir -p "$SCRATCH/$ARCH" cd "$SCRATCH/$ARCH" + LIBOPUS_TARGET_PATH="$SCRATCH/$ARCH" + LIBOPUS_PATH="$LIBOPUS_TARGET_PATH/libopus" + rm -rf "$LIBOPUS_PATH" + cp -R "$SOURCE_DIR/libopus" "$LIBOPUS_TARGET_PATH" + + echo "prefix=\"$LIBOPUS_PATH\"" > "$LIBOPUS_PATH/opus.pc" + printf "\n" >> "$LIBOPUS_PATH/opus.pc" + cat "$SOURCE_DIR/libopus/opus.pc" >> "$LIBOPUS_PATH/opus.pc" + echo "LIBOPUS_TARGET_PATH = $LIBOPUS_TARGET_PATH" + + export PKG_CONFIG_PATH="$LIBOPUS_PATH" + echo "PKG_CONFIG_PATH = $PKG_CONFIG_PATH" + CFLAGS="-arch $ARCH" if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ] then @@ -149,7 +163,9 @@ then echo "$CONFIGURE_FLAGS" > "$CONFIGURED_MARKER" fi - make -j20 install $EXPORT || exit 1 + CORE_COUNT=`sysctl -n hw.logicalcpu` + + make -j$CORE_COUNT install $EXPORT || exit 1 cd "$CWD" done fi diff --git a/FFMpeg/libopus/opus.pc b/FFMpeg/libopus/opus.pc index 4de051824e..3dec390386 100644 --- a/FFMpeg/libopus/opus.pc +++ b/FFMpeg/libopus/opus.pc @@ -1,7 +1,6 @@ -prefix=/Users/peter/build/ffmpeg/libopus exec_prefix=${prefix} includedir=${prefix}/include -libdir=${exec_prefix}/lib +libdir=${prefix}/lib Name: Opus Description: The Opus library