Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
0c4edec7
Commit
0c4edec7
authored
Feb 12, 2010
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/framework: Simplify the Pre-Compile.sh script.
parent
05b400ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
173 additions
and
169 deletions
+173
-169
projects/macosx/framework/Pre-Compile.sh
projects/macosx/framework/Pre-Compile.sh
+173
-169
No files found.
projects/macosx/framework/Pre-Compile.sh
View file @
0c4edec7
if
test
"
${
ACTION
}
"
=
""
;
then
# Debug --
TARGET_BUILD_DIR
=
"."
FULL_PRODUCT_NAME
=
"VLCKit.framework"
CONTENTS_FOLDER_PATH
=
"
${
FULL_PRODUCT_NAME
}
/Versions/A"
VLC_BUILD_DIR
=
"../../.."
VLC_SRC_DIR
=
"../../.."
ACTION
=
"build"
rm
-fr
${
FULL_PRODUCT_NAME
}
# Debug --
# Hack to use that script with the current VLC-release.app
elif
test
"
${
ACTION
}
"
=
"release-makefile"
;
then
#!/bin/sh
#
# Pre-Compile.sh
#
# Script that install libvlc and its modules inside VLCKit.
#
# This is for some creepy reasons also used by legacy VLC-release.app or
# the moz plugin.
#
# We are building VLC-release.app or the moz plugin
#
if
test
"
${
ACTION
}
"
=
"release-makefile"
;
then
echo
"running Pre-Compile.sh in release-makefile mode"
FULL_PRODUCT_NAME
=
"
${
PRODUCT
}
"
...
...
@@ -25,24 +27,31 @@ elif test "${ACTION}" = "release-makefile"; then
RELEASE_MAKEFILE
=
"yes"
fi
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
=
""
##########################
# @function vlc_install(src_lib, dest_dir, type, lib_install_prefix, destination_name)
# @description Installs the specified library into the destination folder, automatically changes the references to dependencies
# @param src_lib source library to copy to the destination directory
# @param dest_dir destination directory where the src_lib should be copied to
vlc_install
()
{
if
test
"
${
ACTION
}
"
!=
"build"
;
then
echo
"This script is supposed to run from xcodebuild or Xcode"
exit
1
fi
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
=
""
prefix
=
".libs/"
suffix
=
"dylib"
##########################
# @function vlc_install(src_lib, dest_dir, type, lib_install_prefix, destination_name)
# @description Installs the specified library into the destination folder, automatically changes the references to dependencies
# @param src_lib source library to copy to the destination directory
# @param dest_dir destination directory where the src_lib should be copied to
vlc_install
()
{
local
src_lib
=
${
1
}
local
dest_dir
=
${
2
}
...
...
@@ -102,51 +111,48 @@ if test "${ACTION}" = "build"; then
done
fi
fi
}
# @function vlc_install
##########################
}
# @function vlc_install
##########################
prefix
=
".libs/"
suffix
=
"dylib"
##########################
# Hack for VLC-release.app
if
[
"
$FULL_PRODUCT_NAME
"
=
"VLC-release.app"
]
;
then
##########################
# Hack for VLC-release.app
if
[
"
$FULL_PRODUCT_NAME
"
=
"VLC-release.app"
]
;
then
vlc_install
"
${
VLC_BUILD_DIR
}
/bin/
${
prefix
}
vlc"
"
${
target
}
"
"bin"
"@loader_path/lib"
mv
${
target
}
/vlc
${
target
}
/VLC
chmod
+x
${
target
}
/VLC
elif
[
"
$FULL_PRODUCT_NAME
"
=
"VLC-Plugin.plugin"
]
;
then
elif
[
"
$FULL_PRODUCT_NAME
"
=
"VLC-Plugin.plugin"
]
;
then
# install Safari webplugin
vlc_install
"
${
VLC_BUILD_DIR
}
/projects/mozilla/
${
prefix
}
npvlc.
${
suffix
}
"
"
${
target
}
"
"library"
"@loader_path/lib"
mv
${
target
}
/npvlc.
${
suffix
}
"
${
target
}
/VLC Plugin"
chmod
+x
"
${
target
}
/VLC Plugin"
else
else
vlc_install
"
${
VLC_BUILD_DIR
}
/bin/
${
prefix
}
vlc"
"
${
target
}
/bin"
"bin"
"@loader_path/../lib"
fi
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
*
.
${
suffix
}
`
;
do
##########################
# 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
*
.
${
suffix
}
`
;
do
# Check to see that the reported module actually exists
if
test
-n
${
module
}
;
then
vlc_install
${
module
}
${
target_modules
}
"module"
fi
done
done
# Install the module cache
vlc_install
`
ls
${
VLC_BUILD_DIR
}
/modules/plugins-
*
.dat
`
${
target_modules
}
"data"
# Install the module cache
vlc_install
`
ls
${
VLC_BUILD_DIR
}
/modules/plugins-
*
.dat
`
${
target_modules
}
"data"
# Build the modules folder
##########################
# Build the modules folder
##########################
##########################
# Create a symbolic link in the root of the framework
mkdir
-p
${
target_lib
}
mkdir
-p
${
target_modules
}
##########################
# Create a symbolic link in the root of the framework
mkdir
-p
${
target_lib
}
mkdir
-p
${
target_modules
}
if
[
"
$RELEASE_MAKEFILE
"
!=
"yes"
]
;
then
if
[
"
$RELEASE_MAKEFILE
"
!=
"yes"
]
;
then
pushd
`
pwd
`
>
/dev/null
cd
${
TARGET_BUILD_DIR
}
/
${
FULL_PRODUCT_NAME
}
...
...
@@ -159,12 +165,12 @@ if test "${ACTION}" = "build"; then
ln
-sf
../share Versions/Current/bin
popd
>
/dev/null
fi
fi
##########################
# Build the library folder
echo
"Building library folder...
${
linked_libs
}
"
for
linked_lib
in
${
linked_libs
}
;
do
##########################
# 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|
*
/vlc_install_dir/lib/
*
.dylib
)
if
test
-e
${
linked_lib
}
;
then
...
...
@@ -172,32 +178,30 @@ if test "${ACTION}" = "build"; then
fi
;;
esac
done
vlc_install
"
${
VLC_BUILD_DIR
}
/src/
${
prefix
}
libvlc.5.dylib"
"
${
target_lib
}
"
"library"
vlc_install
"
${
VLC_BUILD_DIR
}
/src/
${
prefix
}
libvlccore.4.dylib"
"
${
target_lib
}
"
"library"
pushd
`
pwd
`
>
/dev/null
cd
${
TARGET_BUILD_DIR
}
/
${
FULL_PRODUCT_NAME
}
/lib
ln
-sf
libvlc.5.dylib libvlc.dylib
ln
-sf
libvlccore.4.dylib libvlccore.dylib
popd
>
/dev/null
##########################
# Build the share folder
echo
"Building share folder..."
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
if
[
"
$FULL_PRODUCT_NAME
"
=
"VLC-release.app"
]
;
then
done
vlc_install
"
${
VLC_BUILD_DIR
}
/src/
${
prefix
}
libvlc.5.dylib"
"
${
target_lib
}
"
"library"
vlc_install
"
${
VLC_BUILD_DIR
}
/src/
${
prefix
}
libvlccore.4.dylib"
"
${
target_lib
}
"
"library"
pushd
`
pwd
`
>
/dev/null
cd
${
TARGET_BUILD_DIR
}
/
${
FULL_PRODUCT_NAME
}
/lib
ln
-sf
libvlc.5.dylib libvlc.dylib
ln
-sf
libvlccore.4.dylib libvlccore.dylib
popd
>
/dev/null
##########################
# Build the share folder
echo
"Building share folder..."
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
if
[
"
$FULL_PRODUCT_NAME
"
=
"VLC-release.app"
]
;
then
echo
"Exporting headers..."
mkdir
-p
${
target_include
}
/vlc
$pbxcp
${
VLC_SRC_DIR
}
/include/vlc/
*
.h
${
target_include
}
/vlc
else
else
echo
"Headers not needed for this product"
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment