Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a97937b7
Commit
a97937b7
authored
Feb 16, 2010
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/framework: Fix precompilation.
parent
beec0722
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
35 deletions
+46
-35
projects/macosx/framework/Pre-Compile.sh
projects/macosx/framework/Pre-Compile.sh
+46
-35
No files found.
projects/macosx/framework/Pre-Compile.sh
View file @
a97937b7
...
@@ -33,6 +33,11 @@ else
...
@@ -33,6 +33,11 @@ else
echo
"Building for
$ARCHS
"
echo
"Building for
$ARCHS
"
fi
fi
if
test
"
${
ACTION
}
"
=
"clean"
;
then
rm
-Rf
"
${
VLC_BUILD_DIR
}
/tmp"
exit
0
fi
if
test
"
${
ACTION
}
"
!=
"build"
;
then
if
test
"
${
ACTION
}
"
!=
"build"
;
then
echo
"This script is supposed to run from xcodebuild or Xcode"
echo
"This script is supposed to run from xcodebuild or Xcode"
exit
1
exit
1
...
@@ -43,6 +48,7 @@ modules="modules"
...
@@ -43,6 +48,7 @@ modules="modules"
share
=
"share"
share
=
"share"
include
=
"include"
include
=
"include"
target
=
"
${
TARGET_BUILD_DIR
}
/
${
CONTENTS_FOLDER_PATH
}
"
target
=
"
${
TARGET_BUILD_DIR
}
/
${
CONTENTS_FOLDER_PATH
}
"
target_bin
=
"
${
target
}
/bin"
target_lib
=
"
${
target
}
/
${
lib
}
"
# Should we consider using a different well-known folder like shared resources?
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_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_share
=
"
${
target
}
/
${
share
}
"
# Should we consider using a different well-known folder like shared resources?
...
@@ -53,7 +59,7 @@ suffix="dylib"
...
@@ -53,7 +59,7 @@ suffix="dylib"
##########################
##########################
# @function vlc_install_object(src_lib, dest_dir, type, lib_install_prefix, destination_name)
# @function vlc_install_object(src_lib, dest_dir, type, lib_install_prefix, destination_name
, suffix
)
# @description Installs the specified library into the destination folder, automatically changes the references to dependencies
# @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 src_lib source library to copy to the destination directory
# @param dest_dir destination directory where the src_lib should be copied to
# @param dest_dir destination directory where the src_lib should be copied to
...
@@ -66,18 +72,20 @@ vlc_install_object() {
...
@@ -66,18 +72,20 @@ vlc_install_object() {
local
destination_name
=
${
5
}
local
destination_name
=
${
5
}
local
suffix
=
${
6
}
local
suffix
=
${
6
}
if
[
$type
=
"lib
rary
"
]
;
then
if
[
$type
=
"lib"
]
;
then
local
install_name
=
"@loader_path/lib"
local
install_name
=
"@loader_path/lib"
elif
[
$type
=
"module"
]
;
then
elif
[
$type
=
"module"
]
;
then
local
install_name
=
"@loader_path/modules"
local
install_name
=
"@loader_path/modules"
fi
fi
if
[
"
$destination_name
"
!=
""
]
;
then
if
[
"
$destination_name
"
!=
""
]
;
then
local
lib_dest
=
"
$dest_dir
/
$destination_name$suffix
"
local
lib_dest
=
"
$dest_dir
/
$destination_name$suffix
"
local
lib_name
=
`
basename
$destination_name
`
else
else
local
lib_dest
=
"
$dest_dir
/
`
basename
$src_lib
`
$suffix
"
local
lib_dest
=
"
$dest_dir
/
`
basename
$src_lib
`
$suffix
"
local
lib_name
=
`
basename
$src_lib
`
fi
fi
if
[
"
$lib_install_prefix
"
!=
"
"
]
;
then
if
[
"
x
$lib_install_prefix
"
!=
"x
"
]
;
then
local
lib_install_prefix
=
"
$lib_install_prefix
"
local
lib_install_prefix
=
"
$lib_install_prefix
"
else
else
local
lib_install_prefix
=
"@loader_path/../lib"
local
lib_install_prefix
=
"@loader_path/../lib"
...
@@ -102,7 +110,8 @@ vlc_install_object() {
...
@@ -102,7 +110,8 @@ vlc_install_object() {
if
[
"
${
type
}
"
=
"lib"
]
;
then
if
[
"
${
type
}
"
=
"lib"
]
;
then
# Change the reference of libvlc.1 stored in the usr directory to libvlc.dylib in the framework's library directory
# Change the reference of libvlc.1 stored in the usr directory to libvlc.dylib in the framework's library directory
install_name_tool
-id
"
${
install_name
}
/
`
basename
${
lib_dest
}
`
"
${
lib_dest
}
>
/dev/null
install_name_tool
-id
"
${
install_name
}
/
${
lib_name
}
"
${
lib_dest
}
>
/dev/null
echo
"ID=
${
install_name
}
/
${
lib_name
}
"
fi
fi
if
[
"
${
type
}
"
!=
"data"
]
;
then
if
[
"
${
type
}
"
!=
"data"
]
;
then
...
@@ -141,14 +150,14 @@ vlc_install() {
...
@@ -141,14 +150,14 @@ vlc_install() {
vlc_install_object
"
$main_build_dir
/
$1
/
$2
"
"
$dest_dir
"
"
$type
"
$5
vlc_install_object
"
$main_build_dir
/
$1
/
$2
"
"
$dest_dir
"
"
$type
"
$5
else
else
objects
=
""
objects
=
""
mkdir
-p
"tmp/
$1
"
tmp_dest_dir
=
"
$VLC_BUILD_DIR
/tmp/
$type
"
mkdir
-p
"
$tmp_dest_dir
"
newinstall
=
"no"
newinstall
=
"no"
for
arch
in
$ARCHS
;
do
for
arch
in
$ARCHS
;
do
vlc_install_object
"
$VLC_BUILD_DIR
/
$arch
/
$1
/
$2
"
"
tmp/
$1
"
"
$type
"
"
$5
"
"
$2
.
$arch
"
vlc_install_object
"
$VLC_BUILD_DIR
/
$arch
/
$1
/
$2
"
"
$tmp_dest_dir
"
"
$type
"
"
$5
"
""
"
.
$arch
"
local
dest
=
"
tmp/
$1
/
$2
.
$arch
"
local
dest
=
"
$tmp_dest_dir
/
$2
.
$arch
"
if
test
-e
${
dest
}
;
then
if
test
-e
${
dest
}
;
then
if
test
"
$VLC_BUILD_DIR
/
$arch
/
$1
/
$2
"
-nt
"
${
dest
}
"
;
then
if
!
test
"
$dest_dir
/
$2
"
-nt
"
${
dest
}
"
;
then
echo
"
$VLC_BUILD_DIR
/
$arch
/
$1
/
$2
newer than
${
dest
}
"
newinstall
=
"yes"
newinstall
=
"yes"
fi
fi
objects
=
"
${
dest
}
$objects
"
objects
=
"
${
dest
}
$objects
"
...
@@ -157,8 +166,8 @@ vlc_install() {
...
@@ -157,8 +166,8 @@ vlc_install() {
fi
fi
done
;
done
;
if
test
"
$newinstall
"
=
"yes"
;
then
if
test
"
$newinstall
"
=
"yes"
;
then
echo
"Creating fat
$type
$2
"
echo
"Creating fat
$type
$
dest_dir
/
$
2
"
lipo
$objects
-output
"
$
{
dest
}
"
-create
lipo
$objects
-output
"
$
dest_dir
/
$2
"
-create
fi
fi
fi
fi
fi
fi
...
@@ -166,6 +175,27 @@ vlc_install() {
...
@@ -166,6 +175,27 @@ vlc_install() {
# @function vlc_install
# @function vlc_install
##########################
##########################
##########################
# Create a symbolic link in the root of the framework
mkdir
-p
${
target_lib
}
mkdir
-p
${
target_modules
}
mkdir
-p
${
target_bin
}
if
[
"
$RELEASE_MAKEFILE
"
!=
"yes"
]
;
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
}
.
ln
-sf
Versions/Current/bin
.
ln
-sf
../modules Versions/Current/bin
ln
-sf
../share Versions/Current/bin
popd
>
/dev/null
fi
##########################
##########################
# Hack for VLC-release.app
# Hack for VLC-release.app
if
[
"
$FULL_PRODUCT_NAME
"
=
"VLC-release.app"
]
;
then
if
[
"
$FULL_PRODUCT_NAME
"
=
"VLC-release.app"
]
;
then
...
@@ -174,13 +204,14 @@ if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
...
@@ -174,13 +204,14 @@ if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
chmod
+x
${
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
# install Safari webplugin
vlc_install
"projects/mozilla/
${
prefix
}
"
"npvlc.
${
suffix
}
"
"
${
target
}
"
"lib
rary
"
"@loader_path/lib"
vlc_install
"projects/mozilla/
${
prefix
}
"
"npvlc.
${
suffix
}
"
"
${
target
}
"
"lib"
"@loader_path/lib"
mv
${
target
}
/npvlc.
${
suffix
}
"
${
target
}
/VLC Plugin"
mv
${
target
}
/npvlc.
${
suffix
}
"
${
target
}
/VLC Plugin"
chmod
+x
"
${
target
}
/VLC Plugin"
chmod
+x
"
${
target
}
/VLC Plugin"
else
else
vlc_install
"bin/
${
prefix
}
"
"vlc"
"
${
target
}
/bin"
"bin"
"@loader_path/../lib"
vlc_install
"bin/
${
prefix
}
"
"vlc"
"
${
target
}
/bin"
"bin"
"@loader_path/../lib"
fi
fi
##########################
##########################
# Build the modules folder (Same as VLCKit.framework/modules in Makefile)
# Build the modules folder (Same as VLCKit.framework/modules in Makefile)
echo
"Building modules folder..."
echo
"Building modules folder..."
...
@@ -196,31 +227,11 @@ done
...
@@ -196,31 +227,11 @@ done
cache
=
`
ls
${
main_build_dir
}
/modules/plugins-
*
.dat |
sed
-e
s:
${
main_build_dir
}
/::
`
cache
=
`
ls
${
main_build_dir
}
/modules/plugins-
*
.dat |
sed
-e
s:
${
main_build_dir
}
/::
`
vlc_install
`
dirname
${
cache
}
`
`
basename
${
cache
}
`
${
target_modules
}
"data"
vlc_install
`
dirname
${
cache
}
`
`
basename
${
cache
}
`
${
target_modules
}
"data"
# Build the modules folder
# Build the lib folder
##########################
##########################
##########################
# Create a symbolic link in the root of the framework
mkdir
-p
${
target_lib
}
mkdir
-p
${
target_modules
}
if
[
"
$RELEASE_MAKEFILE
"
!=
"yes"
]
;
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
}
.
ln
-sf
Versions/Current/bin
.
ln
-sf
../modules Versions/Current/bin
ln
-sf
../share Versions/Current/bin
popd
>
/dev/null
fi
vlc_install
"src/
${
prefix
}
"
"libvlc.5.dylib"
"
${
target_lib
}
"
"lib
rary
"
vlc_install
"src/
${
prefix
}
"
"libvlc.5.dylib"
"
${
target_lib
}
"
"lib"
vlc_install
"src/
${
prefix
}
"
"libvlccore.4.dylib"
"
${
target_lib
}
"
"lib
rary
"
vlc_install
"src/
${
prefix
}
"
"libvlccore.4.dylib"
"
${
target_lib
}
"
"lib"
pushd
`
pwd
`
>
/dev/null
pushd
`
pwd
`
>
/dev/null
cd
${
TARGET_BUILD_DIR
}
/
${
FULL_PRODUCT_NAME
}
/lib
cd
${
TARGET_BUILD_DIR
}
/
${
FULL_PRODUCT_NAME
}
/lib
ln
-sf
libvlc.5.dylib libvlc.dylib
ln
-sf
libvlc.5.dylib libvlc.dylib
...
...
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