]> git.sesse.net Git - vlc/blobdiff - projects/macosx/framework/Pre-Compile.sh
Don't leak every https parameters.
[vlc] / projects / macosx / framework / Pre-Compile.sh
index 15c33699bc94cb51c7885f8ec72d1ee8cf411b73..b921a922da86236bbaeef80425d95f04fa803ab1 100644 (file)
@@ -24,10 +24,12 @@ if test "${ACTION}" = "build"; then
     lib="lib"
     modules="modules"
     share="share"
+    include="include"
     target="${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}"
     target_lib="${target}/${lib}"            # Should we consider using a different well-known folder like shared resources?
     target_modules="${target}/${modules}"    # Should we consider using a different well-known folder like shared resources?
     target_share="${target}/${share}"    # Should we consider using a different well-known folder like shared resources?
+    target_include="${target}/${include}"    # Should we consider using a different well-known folder like shared resources?
     linked_libs=" "
     
     ##########################
@@ -53,7 +55,7 @@ if test "${ACTION}" = "build"; then
         else
             local lib_install_prefix="@loader_path/../lib"
         fi
-        
+
         if test -e ${1} && ((! test -e ${lib_dest}) || test ${1} -nt ${lib_dest} ); then
             
             mkdir -p ${2}
@@ -87,22 +89,22 @@ if test "${ACTION}" = "build"; then
     # @function install_library
     ##########################
 
+    prefix=".libs/"
+    suffix="dylib"
+
     ##########################
     # Hack for VLC-release.app
     if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
-        prefix=".libs/"
         install_library "${VLC_BUILD_DIR}/src/${prefix}vlc" "${target}" "bin" "@loader_path/lib"
         mv ${target}/vlc ${target}/VLC
         chmod +x ${target}/VLC
-    else
-        prefix=""
     fi
 
     ##########################
     # Build the modules folder (Same as VLCKit.framework/modules in Makefile)
     echo "Building modules folder..."
     # Figure out what modules are available to install
-    for module in `find ${VLC_BUILD_DIR}/modules -name *.so` ; do
+    for module in `find ${VLC_BUILD_DIR}/modules -name *.${suffix}` ; do
         # Check to see that the reported module actually exists
         if test -n ${module}; then
             install_library ${module} ${target_modules} "module"
@@ -115,28 +117,25 @@ if test "${ACTION}" = "build"; then
     # Create a symbolic link in the root of the framework
     mkdir -p ${target_lib}
     mkdir -p ${target_modules}
-    
-    pushd `pwd` > /dev/null 
-    cd ${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}
-    
-    ln -sf Versions/Current/${lib} .
-    ln -sf Versions/Current/${modules} .
-    
-    popd > /dev/null 
-    # Create a symbolic link in the root of the framework
-    ##########################
-    
+
+    if [ "$FULL_PRODUCT_NAME" != "VLC-release.app" ] ; then
+        pushd `pwd` > /dev/null
+        cd ${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}
+
+        ln -sf Versions/Current/${lib} .
+        ln -sf Versions/Current/${modules} .
+        ln -sf Versions/Current/${include} .
+        ln -sf Versions/Current/${share} .
+
+        popd > /dev/null
+    fi
+
     ##########################
     # Build the library folder
     echo "Building library folder... ${linked_libs}"
     for linked_lib in ${linked_libs} ; do
         case "${linked_lib}" in
-            */extras/contrib/lib/*.dylib)
-                if test -e ${linked_lib}; then
-                    install_library ${linked_lib} ${target_lib} "library"
-                fi
-                ;;
-            */vlc_install_dir/lib/*.dylib)
+            */extras/contrib/lib/*.dylib|*/vlc_install_dir/lib/*.dylib)
                 if test -e ${linked_lib}; then
                     install_library ${linked_lib} ${target_lib} "library"
                 fi
@@ -144,8 +143,6 @@ if test "${ACTION}" = "build"; then
         esac
     done
 
-
-    install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc-control.dylib" ${target_lib} "library"
     install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc.dylib" ${target_lib} "library"
 
     ##########################
@@ -154,4 +151,11 @@ if test "${ACTION}" = "build"; then
     pbxcp="/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -resolve-src-symlinks"
     mkdir -p ${target_share}
     $pbxcp ${VLC_SRC_DIR}/share/lua ${target_share}
+
+    ##########################
+    # Exporting headers
+    echo "Exporting headers..."
+    mkdir -p ${target_include}/vlc
+    $pbxcp ${VLC_SRC_DIR}/include/vlc/*.h ${target_include}/vlc
+
 fi