Forráskód Böngészése

add gons lib support

gemer 4 éve
szülő
commit
cb31f65291
1 módosított fájl, 13 hozzáadás és 0 törlés
  1. 13 0
      install-ffmpeg

+ 13 - 0
install-ffmpeg

@@ -12,6 +12,7 @@ LDEXEFLAGS=""
 EXTRALIBS="-ldl -lpthread -lm -lz"
 MACOS_M1=false
 CONFIGURE_OPTIONS=()
+useGitLib=""
 # Check for Apple Silicon
 if [[ ("$(uname -m)" == "arm64") && ("$OSTYPE" == "darwin"*) ]]; then
   # If arm64 AND darwin (macOS)
@@ -180,6 +181,7 @@ usage() {
   echo "      --version       Display version information"
   echo "  -b, --build         Starts the build process"
   echo "  -c, --cleanup       Remove all working dirs"
+  echo "  -i, --in        use innet package source for gogs"
   echo "  -f, --full-static   Build a full static FFmpeg binary (eg. glibc, pthreads etc...) **only Linux**"
   echo "                      Note: Because of the NSS (Name Service Switch), glibc does not recommend static links."
   echo ""
@@ -210,6 +212,10 @@ while (($# > 0)); do
       fi
       LDEXEFLAGS="-static"
     fi
+    if [[ "$1" == "--in" || "$1" =~ 'i' ]]; then
+      useGitLib="1"
+      echo 'use gogs in lib'
+    fi
     shift
     ;;
   *)
@@ -247,6 +253,13 @@ export PKG_CONFIG_PATH
 
 buildEssentialLib() {
   sudo apt-get install -y build-essential autoconf m4 libtool curl -y
+  echo "building Essential Lib"
+  echo "======================= $useGitLib"
+  if [ "$useGitLib" -eq 1 ]; then
+    echo "--- pull gogs lib --- "
+    download "http://192.168.0.115:3000/zhangyupeng/4dage-ffmpeg/raw/master/packages.tar.gz" "packages.tar.gz"
+    execute cp -r "${PACKAGES}"/packages/* "${PACKAGES}"
+  fi
 }
 buildEssentialLib