mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Added info files and documentation importation.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1198 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
b5a17a832f
commit
d8742e9ba0
464
build/xcode/dist/autogen.sh
vendored
464
build/xcode/dist/autogen.sh
vendored
@ -14,30 +14,34 @@ XCODE_SAMPLES_PROJECT="samples.xcodeproj"
|
|||||||
XCODE_BUILD_STYLE="Release"
|
XCODE_BUILD_STYLE="Release"
|
||||||
XCODE_C_TARGETS=("SFML" "csfml-system" "csfml-network" "csfml-audio" "csfml-window" "csfml-graphics")
|
XCODE_C_TARGETS=("SFML" "csfml-system" "csfml-network" "csfml-audio" "csfml-window" "csfml-graphics")
|
||||||
XCODE_CXX_TARGETS=("SFML" "sfml-system" "sfml-network" "sfml-audio" "sfml-window" "sfml-graphics")
|
XCODE_CXX_TARGETS=("SFML" "sfml-system" "sfml-network" "sfml-audio" "sfml-window" "sfml-graphics")
|
||||||
XCODE_SAMPLES_DIR="$ROOT_DIR/samples/build/xcode"
|
|
||||||
|
|
||||||
TARGET_C_FRAMEWORKS_DIR="$ROOT_DIR/CSFML/lib"
|
C_FRAMEWORKS_DIR="$ROOT_DIR/CSFML/lib"
|
||||||
TARGET_CXX_FRAMEWORKS_DIR="$ROOT_DIR/lib"
|
CXX_FRAMEWORKS_DIR="$ROOT_DIR/lib"
|
||||||
TARGET_CXX_SAMPLES_DIR="$ROOT_DIR/samples/bin"
|
CXX_SAMPLES_DIR="$ROOT_DIR/samples/bin"
|
||||||
PACKAGES_ROOT_DIR="$ROOT_DIR/dist"
|
PACKAGES_ROOT_DIR="$ROOT_DIR/dist"
|
||||||
CXX_SDK_PACKAGE="SFML-$SFML_VERSION-sdk-$OS"
|
CXX_SDK_PACKAGE="SFML-$SFML_VERSION-sdk-$OS"
|
||||||
CXX_DEV_PACKAGE="SFML-$SFML_VERSION-dev-$OS"
|
CXX_DEV_PACKAGE="SFML-$SFML_VERSION-dev-$OS"
|
||||||
C_SDK_PACKAGE="SFML-$SFML_VERSION-c-sdk-$OS"
|
C_SDK_PACKAGE="SFML-$SFML_VERSION-c-sdk-$OS"
|
||||||
C_DEV_PACKAGE="SFML-$SFML_VERSION-c-dev-$OS"
|
C_DEV_PACKAGE="SFML-$SFML_VERSION-c-dev-$OS"
|
||||||
PACKAGES_CXX_SDK_DIR="$PACKAGES_ROOT_DIR/$CXX_SDK_PACKAGE"
|
CXX_SDK_PACKAGE_DIR="$PACKAGES_ROOT_DIR/$CXX_SDK_PACKAGE"
|
||||||
PACKAGES_CXX_DEV_DIR="$PACKAGES_ROOT_DIR/$CXX_DEV_PACKAGE"
|
CXX_DEV_PACKAGE_DIR="$PACKAGES_ROOT_DIR/$CXX_DEV_PACKAGE"
|
||||||
PACKAGES_C_SDK_DIR="$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE"
|
C_SDK_PACKAGE_DIR="$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE"
|
||||||
PACKAGES_C_SDK_SUB_DIR="$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE/CSFML"
|
C_SDK_PACKAGE_SUB_DIR="$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE/CSFML"
|
||||||
PACKAGES_C_DEV_DIR="$PACKAGES_ROOT_DIR/$C_DEV_PACKAGE"
|
C_DEV_PACKAGE_DIR="$PACKAGES_ROOT_DIR/$C_DEV_PACKAGE"
|
||||||
PACKAGES_C_DEV_SUB_DIR="$PACKAGES_ROOT_DIR/$C_DEV_PACKAGE/CSFML"
|
C_DEV_PACKAGE_SUB_DIR="$PACKAGES_ROOT_DIR/$C_DEV_PACKAGE/CSFML"
|
||||||
|
PACKAGES_INFO_FILES_DIR="$XCODE_CXX_ROOT_DIR/dist"
|
||||||
|
|
||||||
CXX_SDK_DIRS=("build" "src" "include" "lib" "extlibs" "samples")
|
CXX_SDK_DIRS=("build" "src" "include" "lib" "extlibs" "samples" "doc")
|
||||||
CXX_DEV_DIRS=("lib" "extlibs" "build/xcode/templates")
|
CXX_DEV_DIRS=("lib" "extlibs" "build/xcode/templates")
|
||||||
C_SDK_DIRS=("src" "include" "extlibs")
|
C_SDK_DIRS=("src" "include" "extlibs")
|
||||||
C_SDK_SUB_DIRS=("CSFML/xcode" "CSFML/src" "CSFML/include" "CSFML/lib")
|
C_SDK_SUB_DIRS=("CSFML/xcode" "CSFML/src" "CSFML/include" "CSFML/lib")
|
||||||
C_DEV_DIRS=("extlibs")
|
C_DEV_DIRS=("extlibs")
|
||||||
C_DEV_SUB_DIRS=("CSFML/xcode/templates" "CSFML/lib")
|
C_DEV_SUB_DIRS=("CSFML/xcode/templates" "CSFML/lib")
|
||||||
|
PACKAGE_INFO_FILES=("Read Me.rtf" "Release Notes.rtf" "Notes de version.rtf" "license.txt" "Lisez-moi.rtf")
|
||||||
|
|
||||||
|
SHOULD_CONSIDER_CXX="yes"
|
||||||
|
SHOULD_CONSIDER_C="yes"
|
||||||
|
SHOULD_CONSIDER_SAMPLES="yes"
|
||||||
|
|
||||||
# Checks that last command ended normally. Prints an error message and exists if not.
|
# Checks that last command ended normally. Prints an error message and exists if not.
|
||||||
check_last_process()
|
check_last_process()
|
||||||
@ -49,7 +53,7 @@ check_last_process()
|
|||||||
echo "$1"
|
echo "$1"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo " *** Last process did not end properly. Process stopped."
|
echo "*** Last process did not end properly. Process stopped."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -60,18 +64,23 @@ print_usage()
|
|||||||
echo "Usage: $0 [clean | build | build-samples | build-pkg | all]"
|
echo "Usage: $0 [clean | build | build-samples | build-pkg | all]"
|
||||||
echo " Default shows this help"
|
echo " Default shows this help"
|
||||||
echo
|
echo
|
||||||
echo " clean\t\tdeletes all the intermediates object files and built frameworks"
|
echo " clean\t\tdeletes the C and C++ frameworks, object files and packages"
|
||||||
echo " build\t\tcompiles all the C and C++ SFML frameworks"
|
echo " build\t\tcompiles all the C and C++ SFML frameworks"
|
||||||
echo " build-samples\tcompiles the SFML samples"
|
echo " build-samples\tcompiles the SFML samples"
|
||||||
echo " build-pkg\t\tbuilds the Disk Image Files to be distributed"
|
echo " build-pkg\t\tbuilds the packages to be distributed"
|
||||||
echo " all\t\t\tdoes build, build-samples and build-pkg"
|
echo " all\t\t\tdoes build, build-samples and build-pkg"
|
||||||
|
echo
|
||||||
|
echo " Found C++ project : $SHOULD_CONSIDER_CXX"
|
||||||
|
echo " Found C project : $SHOULD_CONSIDER_C"
|
||||||
|
echo " Found samples project : $SHOULD_CONSIDER_SAMPLES"
|
||||||
|
echo " Missing projects will be skiped without further warning."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Checks that the user computer can run this script
|
# Checks that the user computer can run this script
|
||||||
check_config()
|
check_config()
|
||||||
{
|
{
|
||||||
os=`uname -s`
|
os=`uname -s`
|
||||||
if [ $os != "Darwin" ]
|
if [ $os != "Darwin" ]
|
||||||
then
|
then
|
||||||
echo "You're not running Mac OS X !"
|
echo "You're not running Mac OS X !"
|
||||||
exit 1
|
exit 1
|
||||||
@ -95,6 +104,21 @@ check_config()
|
|||||||
echo "Missing Mac OS X 10.4 SDK needed by SFML. Please install it."
|
echo "Missing Mac OS X 10.4 SDK needed by SFML. Please install it."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! test -d "$XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||||
|
then
|
||||||
|
SHOULD_CONSIDER_CXX="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! test -d "$XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||||
|
then
|
||||||
|
SHOULD_CONSIDER_C="no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! test -d "$XCODE_SAMPLES_ROOT_DIR/$XCODE_SAMPLES_PROJECT"
|
||||||
|
then
|
||||||
|
SHOULD_CONSIDER_SAMPLES="no"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Makes a directory if needed
|
# Makes a directory if needed
|
||||||
@ -115,6 +139,15 @@ remove_dir()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Checks that a file exists and removes it
|
||||||
|
remove_file()
|
||||||
|
{
|
||||||
|
if test -f "$1"
|
||||||
|
then
|
||||||
|
rm -f "$1" > /dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Moves a directory, removing the destination before moving if already existing
|
# Moves a directory, removing the destination before moving if already existing
|
||||||
move_dir()
|
move_dir()
|
||||||
{
|
{
|
||||||
@ -128,7 +161,7 @@ move_dir()
|
|||||||
|
|
||||||
copy()
|
copy()
|
||||||
{
|
{
|
||||||
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude .svn -exclude codeblocks -exclude *vc2005 -exclude *vc2008 -exclude *mingw -exclude Makefile -exclude Main -exclude "Template for new ports" -exclude Linux -exclude Win32 -exclude win32 -exclude *.build -exclude *.dll -exclude *.dSYM -exclude qt -exclude wxwidgets -exclude X11 -exclude lucas* -strip-debug-symbols -resolve-src-symlinks "$1" "$2"
|
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude ".*" -exclude codeblocks -exclude *vc2005 -exclude *vc2008 -exclude *mingw -exclude Makefile -exclude Main -exclude "Template for new ports" -exclude Linux -exclude Win32 -exclude win32 -exclude *.build -exclude *.dll -exclude *.dSYM -exclude qt -exclude wxwidgets -exclude X11 -exclude "$USER*" -exclude dist -exclude AL -strip-debug-symbols -resolve-src-symlinks "$1" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Delete built frameworks and intermediate object files
|
# Delete built frameworks and intermediate object files
|
||||||
@ -137,39 +170,65 @@ clean_all()
|
|||||||
cd "$ROOT_DIR"
|
cd "$ROOT_DIR"
|
||||||
|
|
||||||
# Process cleaning for C++ project
|
# Process cleaning for C++ project
|
||||||
printf "Cleaning C++ products..."
|
if [ "$SHOULD_CONSIDER_CXX" == "yes" ]
|
||||||
if test -d "$XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
|
||||||
then
|
then
|
||||||
cd "$XCODE_CXX_ROOT_DIR"
|
printf "Cleaning C++ products..."
|
||||||
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > /dev/null
|
if test -d "$XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||||
check_last_process " done"
|
then
|
||||||
else
|
cd "$XCODE_CXX_ROOT_DIR"
|
||||||
echo "*** Missing file $XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT. Process stopped."
|
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > /dev/null
|
||||||
exit 1
|
check_last_process " done"
|
||||||
|
else
|
||||||
|
if test -d "$XCODE_CXX_ROOT_DIR"
|
||||||
|
then
|
||||||
|
echo "*** Missing file $XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT. Process stopped."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo " not found. Skiped"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Process cleaning for C project
|
# Process cleaning for C project
|
||||||
printf "Cleaning C products..."
|
if [ "$SHOULD_CONSIDER_C" == "yes" ]
|
||||||
if test -d "$XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
|
||||||
then
|
then
|
||||||
cd "$XCODE_C_ROOT_DIR"
|
printf "Cleaning C products..."
|
||||||
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > /dev/null
|
if test -d "$XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||||
check_last_process " done"
|
then
|
||||||
else
|
cd "$XCODE_C_ROOT_DIR"
|
||||||
echo "*** Missing file $XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT. Process stopped."
|
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > /dev/null
|
||||||
exit 1
|
check_last_process " done"
|
||||||
|
else
|
||||||
|
# Do not produce error if the package does no contain the C stuff
|
||||||
|
if test -d "$XCODE_C_ROOT_DIR"
|
||||||
|
then
|
||||||
|
echo "*** Missing file $XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT. Process stopped."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo " not found. Skiped"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Process cleaning for samples
|
# Process cleaning for samples
|
||||||
printf "Cleaning samples..."
|
if [ "$SHOULD_CONSIDER_SAMPLES" == "yes" ]
|
||||||
if test -d "$XCODE_SAMPLES_ROOT_DIR/$XCODE_SAMPLES_PROJECT"
|
|
||||||
then
|
then
|
||||||
cd "$XCODE_SAMPLES_ROOT_DIR"
|
printf "Cleaning samples..."
|
||||||
xcodebuild -project "$XCODE_SAMPLES_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > /dev/null
|
if test -d "$XCODE_SAMPLES_ROOT_DIR/$XCODE_SAMPLES_PROJECT"
|
||||||
check_last_process " done"
|
then
|
||||||
else
|
cd "$XCODE_SAMPLES_ROOT_DIR"
|
||||||
echo "*** Missing file $XCODE_SAMPLES_ROOT_DIR/$XCODE_SAMPLES_PROJECT. Process stopped."
|
xcodebuild -project "$XCODE_SAMPLES_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > /dev/null
|
||||||
exit 1
|
check_last_process " done"
|
||||||
|
else
|
||||||
|
# Do not produce error if the package does not contain the samples
|
||||||
|
if test -d "$XCODE_SAMPLES_ROOT_DIR"
|
||||||
|
then
|
||||||
|
echo "*** Missing file $XCODE_SAMPLES_ROOT_DIR/$XCODE_SAMPLES_PROJECT. Process stopped."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo " not found. Skiped"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Process cleaning for packages
|
# Process cleaning for packages
|
||||||
@ -182,45 +241,51 @@ clean_all()
|
|||||||
build_frameworks()
|
build_frameworks()
|
||||||
{
|
{
|
||||||
# Go into the C++ project directory
|
# Go into the C++ project directory
|
||||||
cd "$XCODE_CXX_ROOT_DIR"
|
if [ "$SHOULD_CONSIDER_CXX" == "yes" ]
|
||||||
check_last_process
|
|
||||||
echo "Building C++ SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
|
||||||
|
|
||||||
if test -d "$XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
|
||||||
then
|
then
|
||||||
# Build every C++ target (building manually each target to be able to show progress)
|
cd "$XCODE_CXX_ROOT_DIR"
|
||||||
for target in ${XCODE_CXX_TARGETS[@]}
|
check_last_process
|
||||||
do
|
echo "Building C++ SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
||||||
printf "Building $target framework..."
|
|
||||||
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > /dev/null
|
|
||||||
check_last_process " done"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All C++ SFML frameworks built."
|
if test -d "$XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||||
else
|
then
|
||||||
echo "*** Missing file $XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT. Process stopped."
|
# Build every C++ target (building manually each target to be able to show progress)
|
||||||
exit 1
|
for target in "${XCODE_CXX_TARGETS[@]}"
|
||||||
|
do
|
||||||
|
printf "Building $target framework..."
|
||||||
|
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > /dev/null
|
||||||
|
check_last_process " done"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "All C++ SFML frameworks built."
|
||||||
|
else
|
||||||
|
echo "*** Missing file $XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT. Process stopped."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Go into the C project directory
|
# Go into the C project directory
|
||||||
cd "$XCODE_C_ROOT_DIR"
|
if [ "$SHOULD_CONSIDER_C" == "yes" ]
|
||||||
check_last_process
|
|
||||||
echo "Building C SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
|
||||||
|
|
||||||
if test -d "$XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
|
||||||
then
|
then
|
||||||
# Build every C target
|
cd "$XCODE_C_ROOT_DIR"
|
||||||
for target in ${XCODE_C_TARGETS[@]}
|
check_last_process
|
||||||
do
|
echo "Building C SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
||||||
printf "Building $target framework..."
|
|
||||||
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > /dev/null
|
|
||||||
check_last_process " done"
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All C SFML frameworks built."
|
if test -d "$XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||||
else
|
then
|
||||||
echo "*** Missing file $XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT. Process stopped."
|
# Build every C target
|
||||||
exit 1
|
for target in "${XCODE_C_TARGETS[@]}"
|
||||||
|
do
|
||||||
|
printf "Building $target framework..."
|
||||||
|
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > /dev/null
|
||||||
|
check_last_process " done"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "All C SFML frameworks built."
|
||||||
|
else
|
||||||
|
echo "*** Missing file $XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT. Process stopped."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,23 +293,36 @@ build_frameworks()
|
|||||||
build_samples()
|
build_samples()
|
||||||
{
|
{
|
||||||
# Go into the samples project directory
|
# Go into the samples project directory
|
||||||
cd "$XCODE_SAMPLES_DIR"
|
if [ "$SHOULD_CONSIDER_SAMPLES" == "yes" ]
|
||||||
check_last_process
|
|
||||||
|
|
||||||
printf "Building SFML samples in $XCODE_BUILD_STYLE mode..."
|
|
||||||
if test -d "$XCODE_SAMPLES_DIR/$XCODE_SAMPLES_PROJECT"
|
|
||||||
then
|
then
|
||||||
# Build the samples
|
cd "$XCODE_SAMPLES_ROOT_DIR"
|
||||||
xcodebuild -project "$XCODE_SAMPLES_PROJECT" -target "All" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > /dev/null
|
|
||||||
check_last_process " done"
|
|
||||||
echo "In order to run the samples, the SFML frameworks (located in \"lib\") must be copied in the /Library/Frameworks directory." > "$TARGET_CXX_SAMPLES_DIR/README"
|
|
||||||
check_last_process
|
check_last_process
|
||||||
else
|
|
||||||
echo "*** Missing file $XCODE_SAMPLES_DIR/$XCODE_SAMPLES_PROJECT. Process stopped."
|
printf "Building SFML samples in $XCODE_BUILD_STYLE mode..."
|
||||||
exit 1
|
if test -d "$XCODE_SAMPLES_ROOT_DIR/$XCODE_SAMPLES_PROJECT"
|
||||||
|
then
|
||||||
|
# Build the samples
|
||||||
|
xcodebuild -project "$XCODE_SAMPLES_PROJECT" -target "All" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > /dev/null
|
||||||
|
check_last_process " done"
|
||||||
|
echo "In order to run the samples, the SFML frameworks (located in \"lib\") must be copied in the /Library/Frameworks directory." > "$CXX_SAMPLES_DIR/README"
|
||||||
|
check_last_process
|
||||||
|
else
|
||||||
|
echo "*** Missing file $XCODE_SAMPLES_ROOT_DIR/$XCODE_SAMPLES_PROJECT. Process stopped."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Put the information files in the package
|
||||||
|
copy_info_files()
|
||||||
|
{
|
||||||
|
for file in "${PACKAGE_INFO_FILES[@]}"
|
||||||
|
do
|
||||||
|
copy "$PACKAGES_INFO_FILES_DIR/$file" "$1"
|
||||||
|
check_last_process
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Build the disk image files of the C and C++ Dev and SDK packages
|
# Build the disk image files of the C and C++ Dev and SDK packages
|
||||||
build_packages()
|
build_packages()
|
||||||
{
|
{
|
||||||
@ -253,107 +331,137 @@ build_packages()
|
|||||||
make_dir "$PACKAGES_ROOT_DIR"
|
make_dir "$PACKAGES_ROOT_DIR"
|
||||||
|
|
||||||
# Build the C++ SDK package
|
# Build the C++ SDK package
|
||||||
printf "Building C++ SDK package..."
|
if [ "$SHOULD_CONSIDER_CXX" == "yes" ]
|
||||||
make_dir "$PACKAGES_CXX_SDK_DIR"
|
then
|
||||||
for dir in ${CXX_SDK_DIRS[@]}
|
echo "Building C++ SDK package..."
|
||||||
do
|
make_dir "$CXX_SDK_PACKAGE_DIR"
|
||||||
copy "$ROOT_DIR/$dir" "$PACKAGES_CXX_SDK_DIR"
|
for dir in "${CXX_SDK_DIRS[@]}"
|
||||||
check_last_process
|
do
|
||||||
done
|
case "$dir" in
|
||||||
|
"doc")
|
||||||
# Build the disk image file
|
if ! test -f "$ROOT_DIR/$dir/html/index.htm"
|
||||||
hdiutil create -ov -format UDBZ -volname "$CXX_SDK_PACKAGE" -srcfolder "$PACKAGES_CXX_SDK_DIR" "$PACKAGES_ROOT_DIR/$CXX_SDK_PACKAGE.dmg" > /dev/null
|
then
|
||||||
check_last_process " done"
|
echo "$ROOT_DIR/$dir/html/index.htm not found. Make sure the documentation has been built."
|
||||||
|
exit 1
|
||||||
# Build the C++ Dev package
|
fi
|
||||||
printf "Building C++ Development package..."
|
;;
|
||||||
make_dir "$PACKAGES_CXX_DEV_DIR"
|
esac
|
||||||
for dir in ${CXX_DEV_DIRS[@]}
|
|
||||||
do
|
copy "$ROOT_DIR/$dir" "$CXX_SDK_PACKAGE_DIR"
|
||||||
copy "$ROOT_DIR/$dir" "$PACKAGES_CXX_DEV_DIR"
|
check_last_process
|
||||||
check_last_process
|
done
|
||||||
|
copy_info_files "$CXX_SDK_PACKAGE_DIR"
|
||||||
|
check_last_process
|
||||||
|
|
||||||
case $dir in
|
# Build the disk image file
|
||||||
"build/xcode/templates")
|
printf "Made final folder, building Disk Image File..."
|
||||||
# Special consideration for the templates folder that is to be moved in build/xcode
|
remove_file "$PACKAGES_ROOT_DIR/$CXX_SDK_PACKAGE.dmg"
|
||||||
move_dir "$PACKAGES_CXX_DEV_DIR/templates" "$PACKAGES_CXX_DEV_DIR/build/xcode"
|
hdiutil create -format UDBZ -volname "$CXX_SDK_PACKAGE" -srcfolder "$CXX_SDK_PACKAGE_DIR" "$PACKAGES_ROOT_DIR/$CXX_SDK_PACKAGE.dmg" > /dev/null
|
||||||
check_last_process
|
check_last_process " done"
|
||||||
;;
|
|
||||||
"extlibs")
|
# Build the C++ Dev package
|
||||||
# Drop the libs-xcode and headers directories
|
echo "Building C++ Development package..."
|
||||||
remove_dir "$PACKAGES_CXX_DEV_DIR/extlibs/libs-xcode"
|
make_dir "$CXX_DEV_PACKAGE_DIR"
|
||||||
check_last_process
|
for dir in "${CXX_DEV_DIRS[@]}"
|
||||||
remove_dir "$PACKAGES_CXX_DEV_DIR/extlibs/headers"
|
do
|
||||||
check_last_process
|
copy "$ROOT_DIR/$dir" "$CXX_DEV_PACKAGE_DIR"
|
||||||
;;
|
check_last_process
|
||||||
*)
|
|
||||||
;;
|
case $dir in
|
||||||
esac
|
"build/xcode/templates")
|
||||||
done
|
# Special consideration for the templates folder that is to be moved in build/xcode
|
||||||
|
move_dir "$CXX_DEV_PACKAGE_DIR/templates" "$CXX_DEV_PACKAGE_DIR/build/xcode"
|
||||||
# Build the disk image file
|
check_last_process
|
||||||
hdiutil create -ov -format UDBZ -volname "$CXX_DEV_PACKAGE" -srcfolder "$PACKAGES_CXX_DEV_DIR" "$PACKAGES_ROOT_DIR/$CXX_DEV_PACKAGE.dmg" > /dev/null
|
;;
|
||||||
check_last_process " done"
|
"extlibs")
|
||||||
|
# Drop the libs-xcode and headers directories
|
||||||
|
remove_dir "$CXX_DEV_PACKAGE_DIR/extlibs/libs-xcode"
|
||||||
|
check_last_process
|
||||||
|
remove_dir "$CXX_DEV_PACKAGE_DIR/extlibs/headers"
|
||||||
|
check_last_process
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
copy_info_files "$CXX_DEV_PACKAGE_DIR"
|
||||||
|
|
||||||
|
# Build the disk image file
|
||||||
|
printf "Made final folder, building Disk Image File..."
|
||||||
|
remove_file "$PACKAGES_ROOT_DIR/$CXX_DEV_PACKAGE.dmg"
|
||||||
|
hdiutil create -format UDBZ -volname "$CXX_DEV_PACKAGE" -srcfolder "$CXX_DEV_PACKAGE_DIR" "$PACKAGES_ROOT_DIR/$CXX_DEV_PACKAGE.dmg" > /dev/null
|
||||||
|
check_last_process " done"
|
||||||
|
fi # SHOULD_CONSIDER_CXX
|
||||||
|
|
||||||
|
|
||||||
# Build the C SDK package
|
# Build the C SDK package
|
||||||
printf "Building C SDK package..."
|
if [ "$SHOULD_CONSIDER_C" == "yes" ]
|
||||||
make_dir "$PACKAGES_C_SDK_DIR"
|
then
|
||||||
for dir in ${C_SDK_DIRS[@]}
|
echo "Building C SDK package..."
|
||||||
do
|
make_dir "$C_SDK_PACKAGE_DIR"
|
||||||
copy "$ROOT_DIR/$dir" "$PACKAGES_C_SDK_DIR"
|
for dir in "${C_SDK_DIRS[@]}"
|
||||||
check_last_process
|
do
|
||||||
done
|
copy "$ROOT_DIR/$dir" "$C_SDK_PACKAGE_DIR"
|
||||||
|
check_last_process
|
||||||
make_dir "$PACKAGES_C_SDK_SUB_DIR"
|
done
|
||||||
for dir in ${C_SDK_SUB_DIRS[@]}
|
|
||||||
do
|
|
||||||
copy "$ROOT_DIR/$dir" "$PACKAGES_C_SDK_SUB_DIR"
|
|
||||||
check_last_process
|
|
||||||
done
|
|
||||||
|
|
||||||
# Build the disk image file
|
|
||||||
hdiutil create -ov -format UDBZ -volname "$C_SDK_PACKAGE" -srcfolder "$PACKAGES_C_SDK_DIR" "$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE.dmg" > /dev/null
|
|
||||||
check_last_process " done"
|
|
||||||
|
|
||||||
# Build the C Development package
|
|
||||||
printf "Building C Development package..."
|
|
||||||
make_dir "$PACKAGES_C_DEV_DIR"
|
|
||||||
for dir in ${C_DEV_DIRS[@]}
|
|
||||||
do
|
|
||||||
copy "$ROOT_DIR/$dir" "$PACKAGES_C_DEV_DIR"
|
|
||||||
check_last_process
|
|
||||||
|
|
||||||
case $dir in
|
make_dir "$C_SDK_PACKAGE_SUB_DIR"
|
||||||
"extlibs")
|
for dir in "${C_SDK_SUB_DIRS[@]}"
|
||||||
# Drop the libs-xcode and headers directories
|
do
|
||||||
remove_dir "$PACKAGES_C_DEV_DIR/extlibs/libs-xcode"
|
copy "$ROOT_DIR/$dir" "$C_SDK_PACKAGE_SUB_DIR"
|
||||||
check_last_process
|
check_last_process
|
||||||
remove_dir "$PACKAGES_C_DEV_DIR/extlibs/headers"
|
done
|
||||||
check_last_process
|
copy_info_files "$C_SDK_PACKAGE_DIR"
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
make_dir "$PACKAGES_C_DEV_SUB_DIR"
|
|
||||||
for dir in ${C_DEV_SUB_DIRS[@]}
|
|
||||||
do
|
|
||||||
copy "$ROOT_DIR/$dir" "$PACKAGES_C_DEV_SUB_DIR"
|
|
||||||
check_last_process
|
|
||||||
|
|
||||||
case $dir in
|
# Build the disk image file
|
||||||
"CSFML/xcode/templates")
|
printf "Made final folder, building Disk Image File..."
|
||||||
# Special consideration for the templates folder that is to be moved in build/xcode
|
remove_file "$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE.dmg"
|
||||||
move_dir "$PACKAGES_C_DEV_DIR/CSFML/templates" "$PACKAGES_C_DEV_DIR/CSFML/xcode"
|
hdiutil create -format UDBZ -volname "$C_SDK_PACKAGE" -srcfolder "$C_SDK_PACKAGE_DIR" "$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE.dmg" > /dev/null
|
||||||
check_last_process
|
check_last_process " done"
|
||||||
;;
|
|
||||||
esac
|
# Build the C Development package
|
||||||
done
|
echo "Building C Development package..."
|
||||||
|
make_dir "$C_DEV_PACKAGE_DIR"
|
||||||
|
for dir in "${C_DEV_DIRS[@]}"
|
||||||
|
do
|
||||||
|
copy "$ROOT_DIR/$dir" "$C_DEV_PACKAGE_DIR"
|
||||||
|
check_last_process
|
||||||
|
|
||||||
|
case $dir in
|
||||||
|
"extlibs")
|
||||||
|
# Drop the libs-xcode and headers directories
|
||||||
|
remove_dir "$C_DEV_PACKAGE_DIR/extlibs/libs-xcode"
|
||||||
|
check_last_process
|
||||||
|
remove_dir "$C_DEV_PACKAGE_DIR/extlibs/headers"
|
||||||
|
check_last_process
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
make_dir "$C_DEV_PACKAGE_SUB_DIR"
|
||||||
|
for dir in "${C_DEV_SUB_DIRS[@]}"
|
||||||
|
do
|
||||||
|
copy "$ROOT_DIR/$dir" "$C_DEV_PACKAGE_SUB_DIR"
|
||||||
|
check_last_process
|
||||||
|
|
||||||
|
case $dir in
|
||||||
|
"CSFML/xcode/templates")
|
||||||
|
# Special consideration for the templates folder that is to be moved in build/xcode
|
||||||
|
move_dir "$C_DEV_PACKAGE_DIR/CSFML/templates" "$C_DEV_PACKAGE_DIR/CSFML/xcode"
|
||||||
|
check_last_process
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
copy_info_files "$C_DEV_PACKAGE_DIR"
|
||||||
|
|
||||||
|
# Build the disk image file
|
||||||
|
printf "Made final folder, building Disk Image File..."
|
||||||
|
remove_file "$PACKAGES_ROOT_DIR/$C_DEV_PACKAGE.dmg"
|
||||||
|
hdiutil create -format UDBZ -volname "$C_DEV_PACKAGE" -srcfolder "$C_DEV_PACKAGE_DIR" "$PACKAGES_ROOT_DIR/$C_DEV_PACKAGE.dmg" > /dev/null
|
||||||
|
check_last_process " done"
|
||||||
|
fi
|
||||||
|
|
||||||
# Build the disk image file
|
echo "All packages have been built. See $PACKAGES_ROOT_DIR."
|
||||||
hdiutil create -ov -format UDBZ -volname "$C_DEV_PACKAGE" -srcfolder "$PACKAGES_C_DEV_DIR" "$PACKAGES_ROOT_DIR/$C_DEV_PACKAGE.dmg" > /dev/null
|
|
||||||
check_last_process " done"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user