64 bits support should now be ok.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1464 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
1527ecd8ba
commit
691d031daa
267
build/xcode/dist/autogen.sh
vendored
267
build/xcode/dist/autogen.sh
vendored
|
@ -42,6 +42,7 @@ XCODE_64B_SAMPLES_PROJECT="samples with Intel 64 bits.xcodeproj"
|
|||
XCODE_BUILD_STYLE="Release"
|
||||
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_ALL_TARGETS=("All")
|
||||
|
||||
|
||||
# Architectures
|
||||
|
@ -51,11 +52,11 @@ ARCH_64B="$ARCH_3264B" # same as 3264B for now
|
|||
|
||||
C_FRAMEWORKS_DIR="$ROOT_DIR/CSFML/lib" # target directory for C frameworks
|
||||
CXX_FRAMEWORKS_DIR="$ROOT_DIR/lib" # target directory for C++ frameworks
|
||||
CXX_32B_FRAMEWORKS_DIR="$CXX_FRAMEWORKS_DIR" # target directory for '32b' C++ frameworks
|
||||
CXX_64B_FRAMEWORKS_DIR="$ROOT_DIR/lib/$ARCH_3264B" # target directory for '3264b' C++ frameworks
|
||||
CXX_32B_FRAMEWORKS_DIR="$ROOT_DIR/CSFML/lib64" # target directory for '32b' C++ frameworks
|
||||
CXX_64B_FRAMEWORKS_DIR="$ROOT_DIR/lib64" # target directory for '3264b' C++ frameworks
|
||||
CXX_SAMPLES_DIR="$ROOT_DIR/samples/bin" # target directory for C++ samples
|
||||
PACKAGES_ROOT_DIR="$ROOT_DIR/dist" # target directory for '32b' packages
|
||||
PACKAGES_ROOT_DIR_64B="$PACKAGES_ROOT_DIR/$ARCH_64B" # target directory for '64b' packages
|
||||
PACKAGES_ROOT_DIR_64B="$ROOT_DIR/dist64" # target directory for '64b' packages
|
||||
|
||||
# Packages names (default, 32 bits, 64 bits)
|
||||
CXX_SDK_PACKAGE="SFML-$SFML_VERSION-sdk-$OS-$ARCH_32B"
|
||||
|
@ -88,7 +89,9 @@ C_SDK_PACKAGE_DIR_64B="$PACKAGES_ROOT_DIR_64B/$C_SDK_PACKAGE_64B"
|
|||
C_DEV_PACKAGE_DIR_64B="$PACKAGES_ROOT_DIR_64B/$C_DEV_PACKAGE_64B"
|
||||
|
||||
CXX_SDK_DIRS=("build" "src" "include" "lib" "extlibs" "samples" "doc")
|
||||
CXX_64B_SDK_DIRS=("build" "src" "include" "lib64" "extlibs" "samples" "doc")
|
||||
CXX_DEV_DIRS=("lib" "extlibs" "build/xcode/templates")
|
||||
CXX_64B_DEV_DIRS=("lib64" "extlibs" "build/xcode/templates")
|
||||
C_SDK_DIRS=("src" "include" "extlibs")
|
||||
C_SDK_SUB_DIRS=("CSFML/xcode" "CSFML/src" "CSFML/include" "CSFML/lib")
|
||||
C_DEV_DIRS=("extlibs")
|
||||
|
@ -240,7 +243,7 @@ make_dir()
|
|||
if ! test -d "$1"
|
||||
then
|
||||
mkdir -p "$1"
|
||||
check_last_process "[param:$1]"
|
||||
check_last_process
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -278,6 +281,47 @@ copy()
|
|||
/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"
|
||||
}
|
||||
|
||||
build_project()
|
||||
{
|
||||
project_directory=$1
|
||||
project_file=$2
|
||||
target="All"
|
||||
|
||||
cd "$project_directory"
|
||||
check_last_process
|
||||
|
||||
if test -d "$project_directory/$project_file"
|
||||
then
|
||||
printf "Building target $target from $project_file..."
|
||||
xcodebuild -project "$project_file" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > "$VERBOSE_OUTPUT"
|
||||
check_last_process " done"
|
||||
else
|
||||
echo "*** Missing file $project_directory/$project_file. Process stopped."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
clean_project()
|
||||
{
|
||||
project_directory=$1
|
||||
project_file=$2
|
||||
|
||||
if test -d "$project_directory/$project_file"
|
||||
then
|
||||
cd "$project_directory"
|
||||
xcodebuild -project "$project_file" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > "$VERBOSE_OUTPUT"
|
||||
check_last_process " done"
|
||||
else
|
||||
if test -d "$project_directory"
|
||||
then
|
||||
echo "*** Missing file $project_directory/$project_file. Process stopped."
|
||||
exit 1
|
||||
else
|
||||
echo " not found. Skiped"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Delete built frameworks and intermediate object files
|
||||
clean_all()
|
||||
{
|
||||
|
@ -287,20 +331,7 @@ clean_all()
|
|||
if [ "$SHOULD_CONSIDER_CXX" == "yes" ]
|
||||
then
|
||||
printf "Cleaning C++ products..."
|
||||
if test -d "$XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||
then
|
||||
cd "$XCODE_CXX_ROOT_DIR"
|
||||
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > "$VERBOSE_OUTPUT"
|
||||
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
|
||||
clean_project "$XCODE_CXX_ROOT_DIR" "$XCODE_FRAMEWORKS_PROJECT"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -308,42 +339,14 @@ clean_all()
|
|||
if [ "$SHOULD_CONSIDER_C" == "yes" ]
|
||||
then
|
||||
printf "Cleaning C products..."
|
||||
if test -d "$XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||
then
|
||||
cd "$XCODE_C_ROOT_DIR"
|
||||
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > "$VERBOSE_OUTPUT"
|
||||
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
|
||||
clean_project "$XCODE_C_ROOT_DIR" "$XCODE_FRAMEWORKS_PROJECT"
|
||||
fi
|
||||
|
||||
# Process cleaning for samples
|
||||
if [ "$SHOULD_CONSIDER_SAMPLES" == "yes" ]
|
||||
then
|
||||
printf "Cleaning samples..."
|
||||
if test -d "$XCODE_SAMPLES_ROOT_DIR/$XCODE_SAMPLES_PROJECT"
|
||||
then
|
||||
cd "$XCODE_SAMPLES_ROOT_DIR"
|
||||
xcodebuild -project "$XCODE_SAMPLES_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > "$VERBOSE_OUTPUT"
|
||||
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
|
||||
clean_project "$XCODE_SAMPLES_ROOT_DIR" "$XCODE_SAMPLES_PROJECT"
|
||||
fi
|
||||
|
||||
# Process cleaning for packages
|
||||
|
@ -363,20 +366,7 @@ clean_all_64b()
|
|||
if [ "$SHOULD_CONSIDER_CXX_64B" == "yes" ]
|
||||
then
|
||||
printf "Cleaning 64 bits C++ products..."
|
||||
if test -d "$XCODE_CXX_ROOT_DIR/$XCODE_64B_FRAMEWORKS_PROJECT"
|
||||
then
|
||||
cd "$XCODE_CXX_ROOT_DIR"
|
||||
xcodebuild -project "$XCODE_64B_FRAMEWORKS_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > "$VERBOSE_OUTPUT"
|
||||
check_last_process " done"
|
||||
else
|
||||
if test -d "$XCODE_CXX_ROOT_DIR"
|
||||
then
|
||||
echo "*** Missing file $XCODE_CXX_ROOT_DIR/$XCODE_64B_FRAMEWORKS_PROJECT. Process stopped."
|
||||
exit 1
|
||||
else
|
||||
echo " not found. Skiped"
|
||||
fi
|
||||
fi
|
||||
clean_project "$XCODE_CXX_ROOT_DIR" "$XCODE_64B_FRAMEWORKS_PROJECT"
|
||||
fi
|
||||
|
||||
|
||||
|
@ -384,42 +374,14 @@ clean_all_64b()
|
|||
if [ "$SHOULD_CONSIDER_C_64B" == "yes" ]
|
||||
then
|
||||
printf "Cleaning 64 bits C products..."
|
||||
if test -d "$XCODE_C_ROOT_DIR/$XCODE_64B_FRAMEWORKS_PROJECT"
|
||||
then
|
||||
cd "$XCODE_C_ROOT_DIR"
|
||||
xcodebuild -project "$XCODE_64B_FRAMEWORKS_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > "$VERBOSE_OUTPUT"
|
||||
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_64B_FRAMEWORKS_PROJECT. Process stopped."
|
||||
exit 1
|
||||
else
|
||||
echo " not found. Skiped"
|
||||
fi
|
||||
fi
|
||||
clean_project "$XCODE_C_ROOT_DIR" "$XCODE_64B_FRAMEWORKS_PROJECT"
|
||||
fi
|
||||
|
||||
# Process cleaning for samples
|
||||
if [ "$SHOULD_CONSIDER_64B_SAMPLES" == "yes" ]
|
||||
then
|
||||
printf "Cleaning 64 bits samples..."
|
||||
if test -d "$XCODE_SAMPLES_ROOT_DIR/$XCODE_64B_SAMPLES_PROJECT"
|
||||
then
|
||||
cd "$XCODE_SAMPLES_ROOT_DIR"
|
||||
xcodebuild -project "$XCODE_64B_SAMPLES_PROJECT" -target "All" -configuration "$XCODE_BUILD_STYLE" clean > "$VERBOSE_OUTPUT"
|
||||
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_64B_SAMPLES_PROJECT. Process stopped."
|
||||
exit 1
|
||||
else
|
||||
echo " not found. Skiped"
|
||||
fi
|
||||
fi
|
||||
clean_project "$XCODE_SAMPLES_ROOT_DIR" "$XCODE_64B_SAMPLES_PROJECT"
|
||||
fi
|
||||
|
||||
# Process cleaning for packages
|
||||
|
@ -437,49 +399,17 @@ build_frameworks()
|
|||
# Go into the C++ project directory
|
||||
if [ "$SHOULD_CONSIDER_CXX" == "yes" ]
|
||||
then
|
||||
cd "$XCODE_CXX_ROOT_DIR"
|
||||
check_last_process
|
||||
echo "Building C++ SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
||||
|
||||
if test -d "$XCODE_CXX_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||
then
|
||||
# Build every C++ target (building manually each target to be able to show progress)
|
||||
for target in "${XCODE_CXX_TARGETS[@]}"
|
||||
do
|
||||
printf "Building $target framework..."
|
||||
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > "$VERBOSE_OUTPUT"
|
||||
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
|
||||
echo "Building C++ SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
||||
build_project "$XCODE_CXX_ROOT_DIR" "$XCODE_FRAMEWORKS_PROJECT"
|
||||
echo "All C++ SFML frameworks built."
|
||||
fi
|
||||
|
||||
# Go into the C project directory
|
||||
if [ "$SHOULD_CONSIDER_C" == "yes" ]
|
||||
then
|
||||
cd "$XCODE_C_ROOT_DIR"
|
||||
check_last_process
|
||||
echo "Building C SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
||||
|
||||
if test -d "$XCODE_C_ROOT_DIR/$XCODE_FRAMEWORKS_PROJECT"
|
||||
then
|
||||
# Build every C target
|
||||
for target in "${XCODE_C_TARGETS[@]}"
|
||||
do
|
||||
printf "Building $target framework..."
|
||||
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > "$VERBOSE_OUTPUT"
|
||||
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
|
||||
build_project "$XCODE_C_ROOT_DIR" "$XCODE_FRAMEWORKS_PROJECT"
|
||||
echo "All C SFML frameworks built."
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -491,49 +421,17 @@ build_frameworks_64b()
|
|||
# Go into the C++ project directory
|
||||
if [ "$SHOULD_CONSIDER_CXX_64B" == "yes" ]
|
||||
then
|
||||
cd "$XCODE_CXX_ROOT_DIR"
|
||||
check_last_process
|
||||
echo "Building 64 bits C++ SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
||||
|
||||
if test -d "$XCODE_CXX_ROOT_DIR/$XCODE_64B_FRAMEWORKS_PROJECT"
|
||||
then
|
||||
# Build every C++ target (building manually each target to be able to show progress)
|
||||
for target in "${XCODE_CXX_TARGETS[@]}"
|
||||
do
|
||||
printf "Building 64 bits $target framework..."
|
||||
xcodebuild -project "$XCODE_64B_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > "$VERBOSE_OUTPUT"
|
||||
check_last_process " done"
|
||||
done
|
||||
|
||||
echo "All C++ SFML frameworks built."
|
||||
else
|
||||
echo "*** Missing file $XCODE_CXX_ROOT_DIR/$XCODE_64B_FRAMEWORKS_PROJECT. Process stopped."
|
||||
exit 1
|
||||
fi
|
||||
build_project "$XCODE_CXX_ROOT_DIR" "$XCODE_64B_FRAMEWORKS_PROJECT"
|
||||
echo "All C++ SFML frameworks built."
|
||||
fi
|
||||
|
||||
# Go into the C project directory
|
||||
if [ "$SHOULD_CONSIDER_C_64B" == "yes" ]
|
||||
then
|
||||
cd "$XCODE_C_ROOT_DIR"
|
||||
check_last_process
|
||||
echo "Building C SFML frameworks in $XCODE_BUILD_STYLE mode..."
|
||||
|
||||
if test -d "$XCODE_C_ROOT_DIR/$XCODE_64B_FRAMEWORKS_PROJECT"
|
||||
then
|
||||
# Build every C target
|
||||
for target in "${XCODE_C_TARGETS[@]}"
|
||||
do
|
||||
printf "Building 64 bits $target framework..."
|
||||
xcodebuild -project "$XCODE_64B_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > "$VERBOSE_OUTPUT"
|
||||
check_last_process " done"
|
||||
done
|
||||
|
||||
echo "All C SFML frameworks built."
|
||||
else
|
||||
echo "*** Missing file $XCODE_C_ROOT_DIR/$XCODE_64B_FRAMEWORKS_PROJECT. Process stopped."
|
||||
exit 1
|
||||
fi
|
||||
build_project "$XCODE_C_ROOT_DIR" "$XCODE_64B_FRAMEWORKS_PROJECT"
|
||||
echo "All C SFML frameworks built."
|
||||
fi
|
||||
else
|
||||
echo "Intel 64 bits is not supported on your computer. Process skiped"
|
||||
|
@ -546,21 +444,10 @@ build_samples()
|
|||
# Go into the samples project directory
|
||||
if [ "$SHOULD_CONSIDER_SAMPLES" == "yes" ]
|
||||
then
|
||||
cd "$XCODE_SAMPLES_ROOT_DIR"
|
||||
check_last_process
|
||||
|
||||
printf "Building SFML samples in $XCODE_BUILD_STYLE mode..."
|
||||
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 > "$VERBOSE_OUTPUT"
|
||||
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
|
||||
build_project "$XCODE_SAMPLES_ROOT_DIR" "$XCODE_SAMPLES_PROJECT" $XCODE_ALL_TARGETS
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -572,21 +459,9 @@ build_samples_64b()
|
|||
# Go into the samples project directory
|
||||
if [ "$SHOULD_CONSIDER_SAMPLES_64B" == "yes" ]
|
||||
then
|
||||
cd "$XCODE_SAMPLES_ROOT_DIR"
|
||||
check_last_process
|
||||
|
||||
printf "Building 64 bits SFML samples in $XCODE_BUILD_STYLE mode..."
|
||||
if test -d "$XCODE_SAMPLES_ROOT_DIR/$XCODE_64B_SAMPLES_PROJECT"
|
||||
then
|
||||
# Build the samples
|
||||
xcodebuild -project "$XCODE_64B_SAMPLES_PROJECT" -target "All" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > "$VERBOSE_OUTPUT"
|
||||
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_64B_SAMPLES_PROJECT. Process stopped."
|
||||
exit 1
|
||||
fi
|
||||
build_project "$XCODE_SAMPLES_ROOT_DIR" "$XCODE_64B_SAMPLES_PROJECT" $XCODE_ALL_TARGETS
|
||||
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"
|
||||
fi
|
||||
else
|
||||
echo "Intel 64 bits is not supported on your computer. Process skiped"
|
||||
|
@ -601,6 +476,8 @@ copy_info_files()
|
|||
copy "$PACKAGES_INFO_FILES_DIR/$file" "$1"
|
||||
check_last_process
|
||||
done
|
||||
|
||||
echo "copied info files to $1"
|
||||
}
|
||||
|
||||
# Build the archives of the C and C++ Dev and SDK packages
|
||||
|
@ -753,7 +630,7 @@ build_packages_64b()
|
|||
then
|
||||
printf "Building 64 bits C++ SDK package..."
|
||||
make_dir "$CXX_SDK_PACKAGE_DIR_64B"
|
||||
for dir in "${CXX_SDK_DIRS[@]}"
|
||||
for dir in "${CXX_64B_SDK_DIRS[@]}"
|
||||
do
|
||||
case "$dir" in
|
||||
"doc")
|
||||
|
@ -779,7 +656,7 @@ build_packages_64b()
|
|||
# Build the C++ Dev package
|
||||
printf "Building 64 bits C++ Development package..."
|
||||
make_dir "$CXX_DEV_PACKAGE_DIR_64B"
|
||||
for dir in "${CXX_DEV_DIRS[@]}"
|
||||
for dir in "${CXX_64B_DEV_DIRS[@]}"
|
||||
do
|
||||
copy "$ROOT_DIR/$dir" "$CXX_DEV_PACKAGE_DIR_64B"
|
||||
check_last_process
|
||||
|
|
Loading…
Reference in a new issue