Remove framework-only links when packaging VLC-release.app
[vlc.git] / projects / macosx / framework / Pre-Compile.sh
index fe50324..4065f4a 100644 (file)
@@ -92,7 +92,8 @@ if test "${ACTION}" = "build"; then
     if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
         prefix=".libs/"
         install_library "${VLC_BUILD_DIR}/src/${prefix}vlc" "${target}" "bin" "@loader_path/lib"
-        install ${target}/vlc ${target}/VLC
+        mv ${target}/vlc ${target}/VLC
+        chmod +x ${target}/VLC
         suffix="dylib"
     else
         prefix=""
@@ -116,28 +117,23 @@ 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} .
+
+        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