Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLCKit
Commits
d5192611
Commit
d5192611
authored
Jun 21, 2016
by
Felix Paul Kühne
Browse files
Add support for static tvOS frameworks
parent
2d9112ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Packaging/create-dmg.sh
View file @
d5192611
...
...
@@ -19,6 +19,7 @@ spopd()
}
MOBILE
=
no
TV
=
no
VERBOSE
=
no
USEZIP
=
no
...
...
@@ -33,12 +34,13 @@ OPTIONS:
-h Show some help
-v Be verbose
-m Package MobileVLCKit
-t Package TVVLCKit
-z Use zip file format
EOF
}
while
getopts
"hvmz"
OPTION
while
getopts
"hvm
t
z"
OPTION
do
case
$OPTION
in
h
)
...
...
@@ -51,6 +53,10 @@ do
m
)
MOBILE
=
yes
;;
t
)
MOBILE
=
yes
TV
=
yes
;;
z
)
USEZIP
=
yes
;;
...
...
@@ -73,32 +79,49 @@ root=`dirname $0`/../
DMGFOLDERNAME
=
"VLCKit - binary package"
DMGITEMNAME
=
"VLCKit-REPLACEWITHVERSION"
if
[
"
$MOBILE
"
=
"yes"
]
;
then
if
[
"
$USEZIP
"
=
"yes"
]
;
then
DMGFOLDERNAME
=
"MobileVLCKit-binary"
if
[
"TV"
=
"yes"
]
;
then
if
[
"
$USEZIP
"
=
"yes"
]
;
then
DMGFOLDERNAME
=
"TVVLCKit-binary"
else
DMGFOLDERNAME
=
"TVVLCKit - binary package"
fi
DMGITEMNAME
=
"TVVLCKit-REPLACEWITHVERSION"
else
DMGFOLDERNAME
=
"MobileVLCKit - binary package"
fi
DMGITEMNAME
=
"MobileVLCKit-REPLACEWITHVERSION"
if
[
"
$MOBILE
"
=
"yes"
]
;
then
if
[
"
$USEZIP
"
=
"yes"
]
;
then
DMGFOLDERNAME
=
"MobileVLCKit-binary"
else
DMGFOLDERNAME
=
"MobileVLCKit - binary package"
fi
DMGITEMNAME
=
"MobileVLCKit-REPLACEWITHVERSION"
fi
fi
info
"checking for distributable binary package"
spushd
${
root
}
if
[
"
$MOBILE
"
=
"no"
]
;
then
if
[
!
-e
"VLCKit"
]
;
then
info
"VLCKit not found for distribution, creating..."
if
[
"
$VERBOSE
"
=
"yes"
]
;
then
make VLCKit
V
=
1
else
make VLCKit
if
[
!
-e
"VLCKit"
]
;
then
info
"VLCKit not found for distribution, creating..."
if
[
"
$VERBOSE
"
=
"yes"
]
;
then
make VLCKit
V
=
1
else
make VLCKit
fi
fi
fi
else
if
[
!
-e
"build/MobileVLCKit.framework"
]
;
then
info
"MobileVLCKit not found for distribution, creating... this will take long"
./buildMobileVLCKit.sh
-f
fi
if
[
"
$TV
"
=
"yes"
]
;
then
if
[
!
-e
"build/TVVLCKit.framework"
]
;
then
info
"TVVLCKit not found for distribution, creating... this will take long"
./buildMobileVLCKit.sh
-f
-t
fi
else
if
[
!
-e
"build/MobileVLCKit.framework"
]
;
then
info
"MobileVLCKit not found for distribution, creating... this will take long"
./buildMobileVLCKit.sh
-f
fi
fi
fi
if
[
!
-e
"
${
DMGFOLDERNAME
}
"
]
;
then
...
...
@@ -106,12 +129,16 @@ info "Collecting items"
mkdir
-p
"
${
DMGFOLDERNAME
}
"
mkdir
-p
"
${
DMGFOLDERNAME
}
/Sample Code"
if
[
"
$MOBILE
"
=
"no"
]
;
then
cp
-R
VLCKit/
*
"
${
DMGFOLDERNAME
}
"
cp
-R
Examples_OSX/
*
"
${
DMGFOLDERNAME
}
/Sample Code"
cp
-R
VLCKit/
*
"
${
DMGFOLDERNAME
}
"
cp
-R
Examples_OSX/
*
"
${
DMGFOLDERNAME
}
/Sample Code"
else
cp
-R
build/MobileVLCKit.framework
"
${
DMGFOLDERNAME
}
"
cp
-R
Examples_iOS/
*
"
${
DMGFOLDERNAME
}
/Sample Code"
cp
COPYING
"
${
DMGFOLDERNAME
}
"
if
[
"
$TV
"
=
"yes"
]
;
then
cp
-R
build/TVVLCKit.framework
"
${
DMGFOLDERNAME
}
"
else
cp
-R
build/MobileVLCKit.framework
"
${
DMGFOLDERNAME
}
"
cp
-R
Examples_iOS/
*
"
${
DMGFOLDERNAME
}
/Sample Code"
fi
cp
COPYING
"
${
DMGFOLDERNAME
}
"
fi
cp
NEWS
"
${
DMGFOLDERNAME
}
"
spushd
"
${
DMGFOLDERNAME
}
"
...
...
@@ -131,7 +158,9 @@ hdiutil attach -readwrite -noverify -noautoopen -mountRoot ./mount ${DMGITEMNAME
if
[
"
$MOBILE
"
=
"no"
]
;
then
osascript Packaging/dmg_setup.scpt
"
${
DMGFOLDERNAME
}
"
else
osascript Packaging/mobile_dmg_setup.scpt
"
${
DMGFOLDERNAME
}
"
if
[
"
$TV
"
=
"no"
]
;
then
osascript Packaging/mobile_dmg_setup.scpt
"
${
DMGFOLDERNAME
}
"
fi
fi
hdiutil detach ./mount/
"
${
DMGFOLDERNAME
}
"
...
...
buildMobileVLCKit.sh
View file @
d5192611
...
...
@@ -64,10 +64,18 @@ buildxcodeproj()
info
"Building
$1
(
$target
,
${
CONFIGURATION
}
,
$PLATFORM
)"
local
architectures
=
""
if
[
"
$PLATFORM
"
=
"iphonesimulator"
]
;
then
architectures
=
"i386 x86_64"
if
[
"
$TVOS
"
!=
"yes"
]
;
then
if
[
"
$PLATFORM
"
=
"iphonesimulator"
]
;
then
architectures
=
"i386 x86_64"
else
architectures
=
"armv7 armv7s arm64"
fi
else
architectures
=
"armv7 armv7s arm64"
if
[
"
$PLATFORM
"
=
"appletvsimulator"
]
;
then
architectures
=
"x86_64"
else
architectures
=
"arm64"
fi
fi
local
defs
=
"
$GCC_PREPROCESSOR_DEFINITIONS
"
...
...
@@ -124,6 +132,7 @@ do
TVOS
=
yes
BITCODE
=
yes
SDK
=
`
xcrun
--sdk
appletvos
--show-sdk-version
`
SDK_MIN
=
9.0
;;
?
)
usage
...
...
@@ -438,6 +447,7 @@ fi
info
"all done"
if
[
"
$BUILD_STATIC_FRAMEWORK
"
!=
"no"
]
;
then
if
[
"
$TVOS
"
!=
"yes"
]
;
then
info
"Building static MobileVLCKit.framework"
buildxcodeproj MobileVLCKit
"MobileVLCKit"
iphoneos
...
...
@@ -455,4 +465,23 @@ if [ "$BUILD_STATIC_FRAMEWORK" != "no" ]; then
spopd
# build
info
"Build of static MobileVLCKit.framework completed"
else
info
"Building static TVVLCKit.framework"
buildxcodeproj MobileVLCKit
"TVVLCKit"
appletvos
buildxcodeproj MobileVLCKit
"TVVLCKit"
appletvsimulator
# Assumes both platforms were built currently
spushd build
rm
-rf
TVVLCKit.framework
&&
\
mkdir
TVVLCKit.framework
&&
\
lipo
-create
${
CONFIGURATION
}
-appletvos
/libTVVLCKit.a
\
${
CONFIGURATION
}
-appletvsimulator
/libTVVLCKit.a
\
-o
TVVLCKit.framework/TVVLCKit
&&
\
chmod
a+x TVVLCKit.framework/TVVLCKit
&&
\
cp
-pr
${
CONFIGURATION
}
-appletvos
/TVVLCKit TVVLCKit.framework/Headers
spopd
# build
info
"Build of static TVVLCKit.framework completed"
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