Synchronized with trunk

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1222 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2009-09-24 08:33:34 +00:00
commit a5e20f23ca
18 changed files with 1623 additions and 1143 deletions

View file

@ -157,7 +157,7 @@
A066106A0E89058900D39DEB /* trees.c in Sources */ = {isa = PBXBuildFile; fileRef = A0660FE90E89058900D39DEB /* trees.c */; };
A066106C0E89058900D39DEB /* uncompr.c in Sources */ = {isa = PBXBuildFile; fileRef = A0660FEB0E89058900D39DEB /* uncompr.c */; };
A066106F0E89058900D39DEB /* zutil.c in Sources */ = {isa = PBXBuildFile; fileRef = A0660FEE0E89058900D39DEB /* zutil.c */; };
A0ABBD570FD46A2200D528E9 /* libsfml-system.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A01269660E6318C000B96A5D /* libsfml-system.dylib */; };
A0ABBD570FD46A2200D528E9 /* libsfml-system-d.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A01269660E6318C000B96A5D /* libsfml-system-d.dylib */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -201,14 +201,14 @@
/* Begin PBXFileReference section */
A011E8050F65B35400FAE48D /* GLKit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GLKit.h; sourceTree = "<group>"; };
A011E8060F65B35400FAE48D /* GLKit.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = GLKit.mm; sourceTree = "<group>"; };
A01269660E6318C000B96A5D /* libsfml-system.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-system.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A012696F0E6318FE00B96A5D /* libsfml-network.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-network.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A01269760E63190F00B96A5D /* libsfml-audio.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-audio.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A012697D0E63192000B96A5D /* libsfml-window.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-window.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A01269840E63192B00B96A5D /* libsfml-graphics.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-graphics.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A01269660E6318C000B96A5D /* libsfml-system-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-system-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A012696F0E6318FE00B96A5D /* libsfml-network-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-network-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A01269760E63190F00B96A5D /* libsfml-audio-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-audio-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A012697D0E63192000B96A5D /* libsfml-window-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-window-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A01269840E63192B00B96A5D /* libsfml-graphics-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-graphics-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
A018A2AD0EA21A2C005FFAC3 /* Http.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Http.cpp; path = ../../src/SFML/Network/Http.cpp; sourceTree = SOURCE_ROOT; };
A018A2AE0EA21A2C005FFAC3 /* Ftp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Ftp.cpp; path = ../../src/SFML/Network/Ftp.cpp; sourceTree = SOURCE_ROOT; };
A01BEF070F6BF0140095262C /* Initializer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Initializer.cpp; path = ../../src/SFML/System/Initializer.cpp; sourceTree = SOURCE_ROOT; };
A01BEF070F6BF0140095262C /* Initializer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Initializer.cpp; sourceTree = "<group>"; };
A04C5A930EDDD88B00935061 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ../../src/SFML/Window/Cocoa/AppController.h; sourceTree = SOURCE_ROOT; };
A04C5A940EDDD88B00935061 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ../../src/SFML/Window/Cocoa/AppController.mm; sourceTree = SOURCE_ROOT; };
A04C5A950EDDD88B00935061 /* Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../../src/SFML/Window/Cocoa/Joystick.cpp; sourceTree = SOURCE_ROOT; };
@ -409,7 +409,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A0ABBD570FD46A2200D528E9 /* libsfml-system.dylib in Frameworks */,
A0ABBD570FD46A2200D528E9 /* libsfml-system-d.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -445,11 +445,11 @@
A01269670E6318C000B96A5D /* Products */ = {
isa = PBXGroup;
children = (
A01269660E6318C000B96A5D /* libsfml-system.dylib */,
A012696F0E6318FE00B96A5D /* libsfml-network.dylib */,
A01269760E63190F00B96A5D /* libsfml-audio.dylib */,
A012697D0E63192000B96A5D /* libsfml-window.dylib */,
A01269840E63192B00B96A5D /* libsfml-graphics.dylib */,
A01269660E6318C000B96A5D /* libsfml-system-d.dylib */,
A012696F0E6318FE00B96A5D /* libsfml-network-d.dylib */,
A01269760E63190F00B96A5D /* libsfml-audio-d.dylib */,
A012697D0E63192000B96A5D /* libsfml-window-d.dylib */,
A01269840E63192B00B96A5D /* libsfml-graphics-d.dylib */,
);
name = Products;
sourceTree = "<group>";
@ -457,7 +457,6 @@
A01269870E63193B00B96A5D /* sfml-system */ = {
isa = PBXGroup;
children = (
A01BEF070F6BF0140095262C /* Initializer.cpp */,
A0660EA90E89051400D39DEB /* Clock.cpp */,
A0660EAA0E89051400D39DEB /* Platform.hpp */,
A0660EAB0E89051400D39DEB /* Lock.cpp */,
@ -577,6 +576,7 @@
A0660EAE0E89051400D39DEB /* Unix */ = {
isa = PBXGroup;
children = (
A01BEF070F6BF0140095262C /* Initializer.cpp */,
A0660EAF0E89051400D39DEB /* Mutex.cpp */,
A0660EB00E89051400D39DEB /* Platform.cpp */,
A0660EB10E89051400D39DEB /* Platform.hpp */,
@ -770,7 +770,7 @@
);
name = "sfml-system";
productName = "sfml-system";
productReference = A01269660E6318C000B96A5D /* libsfml-system.dylib */;
productReference = A01269660E6318C000B96A5D /* libsfml-system-d.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
A012696E0E6318FE00B96A5D /* sfml-network */ = {
@ -786,7 +786,7 @@
);
name = "sfml-network";
productName = "sfml-network";
productReference = A012696F0E6318FE00B96A5D /* libsfml-network.dylib */;
productReference = A012696F0E6318FE00B96A5D /* libsfml-network-d.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
A01269750E63190F00B96A5D /* sfml-audio */ = {
@ -802,7 +802,7 @@
);
name = "sfml-audio";
productName = "sfml-audio";
productReference = A01269760E63190F00B96A5D /* libsfml-audio.dylib */;
productReference = A01269760E63190F00B96A5D /* libsfml-audio-d.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
A012697C0E63192000B96A5D /* sfml-window */ = {
@ -818,7 +818,7 @@
);
name = "sfml-window";
productName = "sfml-window";
productReference = A012697D0E63192000B96A5D /* libsfml-window.dylib */;
productReference = A012697D0E63192000B96A5D /* libsfml-window-d.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
A01269830E63192B00B96A5D /* sfml-graphics */ = {
@ -834,7 +834,7 @@
);
name = "sfml-graphics";
productName = "sfml-graphics";
productReference = A01269840E63192B00B96A5D /* libsfml-graphics.dylib */;
productReference = A01269840E63192B00B96A5D /* libsfml-graphics-d.dylib */;
productType = "com.apple.product-type.library.dynamic";
};
/* End PBXNativeTarget section */
@ -1067,6 +1067,7 @@
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../extlibs/bin";
GCC_VERSION = 4.0;
HEADER_SEARCH_PATHS = (
"${SRCROOT}/../../src",
"${SRCROOT}/../../include",
@ -1088,6 +1089,7 @@
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../extlibs/bin";
GCC_VERSION = 4.0;
HEADER_SEARCH_PATHS = (
"${SRCROOT}/../../src",
"${SRCROOT}/../../include",

View file

@ -56,9 +56,7 @@
A04C59B40EDDBA9C00935061 /* VideoModeSupport.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A04C59AA0EDDBA9C00935061 /* VideoModeSupport.hpp */; };
A04C59B70EDDBA9C00935061 /* WindowImplCocoa.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A04C59AD0EDDBA9C00935061 /* WindowImplCocoa.hpp */; };
A04C59B80EDDBA9C00935061 /* WindowImplCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = A04C59AE0EDDBA9C00935061 /* WindowImplCocoa.mm */; };
A05EEF700E5CF18F00572B7E /* sfml-window.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C93EB40D9A9CA000B9E0C8 /* sfml-window.framework */; };
A093E3D00D8BF918002236B4 /* dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A093E3CF0D8BF918002236B4 /* dummy.cpp */; };
A093E5480D8BFEAE002236B4 /* sfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system.framework */; };
A09EEBF70D8C19BF00F6C625 /* Platform.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A09EEBED0D8C19BF00F6C625 /* Platform.hpp */; };
A09EEBF80D8C19BF00F6C625 /* Randomizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBEE0D8C19BF00F6C625 /* Randomizer.cpp */; };
A09EEBF90D8C19BF00F6C625 /* Mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBF00D8C19BF00F6C625 /* Mutex.cpp */; };
@ -68,8 +66,6 @@
A09EEBFD0D8C19BF00F6C625 /* Clock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBF40D8C19BF00F6C625 /* Clock.cpp */; };
A09EEBFE0D8C19BF00F6C625 /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBF50D8C19BF00F6C625 /* Lock.cpp */; };
A09EEBFF0D8C19BF00F6C625 /* Sleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBF60D8C19BF00F6C625 /* Sleep.cpp */; };
A0BE1A200D917332007D4CAD /* sfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system.framework */; };
A0C93F930D9AA9FA00B9E0C8 /* sfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system.framework */; };
A0CE9FE70F46F72500FD00CE /* GLKit.h in Headers */ = {isa = PBXBuildFile; fileRef = A0CE9FE50F46F72500FD00CE /* GLKit.h */; };
A0CE9FE80F46F72500FD00CE /* GLKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = A0CE9FE60F46F72500FD00CE /* GLKit.mm */; };
A0EEDE990F59D49C0023A7F7 /* Initializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0EEDE980F59D49C0023A7F7 /* Initializer.cpp */; };
@ -439,7 +435,7 @@
A0C93EB40D9A9CA000B9E0C8 /* sfml-window.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-window.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
A0CE9FE50F46F72500FD00CE /* GLKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLKit.h; sourceTree = "<group>"; };
A0CE9FE60F46F72500FD00CE /* GLKit.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GLKit.mm; sourceTree = "<group>"; };
A0EEDE980F59D49C0023A7F7 /* Initializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Initializer.cpp; path = ../../src/SFML/System/Initializer.cpp; sourceTree = SOURCE_ROOT; };
A0EEDE980F59D49C0023A7F7 /* Initializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Initializer.cpp; sourceTree = "<group>"; };
A0F1E6800E75440800778F12 /* IPAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = IPAddress.cpp; path = ../../src/SFML/Network/IPAddress.cpp; sourceTree = SOURCE_ROOT; };
A0F1E6820E75440800778F12 /* Packet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Packet.cpp; path = ../../src/SFML/Network/Packet.cpp; sourceTree = SOURCE_ROOT; };
A0F1E6830E75440800778F12 /* SelectorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SelectorBase.cpp; path = ../../src/SFML/Network/SelectorBase.cpp; sourceTree = SOURCE_ROOT; };
@ -608,7 +604,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A093E5480D8BFEAE002236B4 /* sfml-system.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -616,8 +611,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A0BE1A200D917332007D4CAD /* sfml-system.framework in Frameworks */,
A05EEF700E5CF18F00572B7E /* sfml-window.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -625,7 +618,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A0C93F930D9AA9FA00B9E0C8 /* sfml-system.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -942,7 +934,6 @@
A09EEBF40D8C19BF00F6C625 /* Clock.cpp */,
A09EEBF50D8C19BF00F6C625 /* Lock.cpp */,
A09EEBF60D8C19BF00F6C625 /* Sleep.cpp */,
A0EEDE980F59D49C0023A7F7 /* Initializer.cpp */,
);
name = Sources;
sourceTree = SOURCE_ROOT;
@ -950,6 +941,7 @@
A09EEBEF0D8C19BF00F6C625 /* Unix */ = {
isa = PBXGroup;
children = (
A0EEDE980F59D49C0023A7F7 /* Initializer.cpp */,
A09EEBF00D8C19BF00F6C625 /* Mutex.cpp */,
A09EEBF10D8C19BF00F6C625 /* Platform.cpp */,
A09EEBF20D8C19BF00F6C625 /* Platform.hpp */,
@ -1724,7 +1716,7 @@
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../extlibs/bin";
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = "";
GCC_VERSION = 4.0;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO;
GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
GCC_WARN_CHECK_SWITCH_STATEMENTS = NO;
@ -1758,7 +1750,7 @@
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../extlibs/bin";
GCC_OPTIMIZATION_LEVEL = 2;
GCC_VERSION = "";
GCC_VERSION = 4.0;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = NO;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = NO;
@ -1885,6 +1877,8 @@
OpenAL,
"-framework",
sndfile,
"-framework",
"sfml-system-d",
);
PRODUCT_NAME = "sfml-audio-d";
SECTORDER_FLAGS = "";
@ -1912,6 +1906,8 @@
OpenAL,
"-framework",
sndfile,
"-framework",
"sfml-system",
);
PRODUCT_NAME = "sfml-audio";
SECTORDER_FLAGS = "";
@ -1939,6 +1935,10 @@
"-framework",
OpenGL,
"$(SRCROOT)/../../extlibs/libs-xcode/libfreetype.a",
"-framework",
"sfml-system-d",
"-framework",
"sfml-window-d",
);
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-graphics-d";
@ -1967,6 +1967,10 @@
"-framework",
OpenGL,
"$(SRCROOT)/../../extlibs/libs-xcode/libfreetype.a",
"-framework",
"sfml-system",
"-framework",
"sfml-window",
);
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-graphics";
@ -1991,7 +1995,6 @@
INFOPLIST_FILE = "sfml-network-Info.plist";
INSTALL_PATH = "@executable_path/../Frameworks";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-network-d";
SECTORDER_FLAGS = "";
@ -2015,7 +2018,6 @@
INFOPLIST_FILE = "sfml-network-Info.plist";
INSTALL_PATH = "@executable_path/../Frameworks";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-network";
SECTORDER_FLAGS = "";
@ -2101,6 +2103,8 @@
ApplicationServices,
"-framework",
Cocoa,
"-framework",
"sfml-system-d",
);
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-window-d";
@ -2133,6 +2137,8 @@
ApplicationServices,
"-framework",
Cocoa,
"-framework",
"sfml-system",
);
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-window";
@ -2154,7 +2160,7 @@
FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../extlibs/bin";
GCC_DEBUGGING_SYMBOLS = full;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = "";
GCC_VERSION = 4.0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@ -2241,6 +2247,8 @@
OpenAL,
"-framework",
sndfile,
"-framework",
"sfml-system-d",
);
PRODUCT_NAME = "sfml-audio-d";
SECTORDER_FLAGS = "";
@ -2268,6 +2276,10 @@
"-framework",
OpenGL,
"$(SRCROOT)/../../extlibs/libs-xcode/libfreetype.a",
"-framework",
"sfml-system-d",
"-framework",
"sfml-window-d",
);
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-graphics-d";
@ -2292,7 +2304,6 @@
INFOPLIST_FILE = "sfml-network-Info.plist";
INSTALL_PATH = "@executable_path/../Frameworks";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-network-d";
SECTORDER_FLAGS = "";
@ -2352,6 +2363,8 @@
ApplicationServices,
"-framework",
Cocoa,
"-framework",
"sfml-system-d",
);
OTHER_REZFLAGS = "";
PRODUCT_NAME = "sfml-window-d";

View file

@ -1,4 +1,30 @@
#!/bin/sh
############################################################
#
# SFML - Simple and Fast Multimedia Library
# Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and Laurent Gomila (laurent.gom@gmail.com)
#
# This software is provided 'as-is', without any express or implied warranty.
# In no event will the authors be held liable for any damages arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it freely,
# subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented;
# you must not claim that you wrote the original software.
# If you use this software in a product, an acknowledgment
# in the product documentation would be appreciated but is not required.
#
# 2. Altered source versions must be plainly marked as such,
# and must not be misrepresented as being the original software.
#
# 3. This notice may not be removed or altered from any source distribution.
#
############################################################
cd ../../../
SFML_VERSION="1.6"
@ -43,6 +69,8 @@ SHOULD_CONSIDER_CXX="yes"
SHOULD_CONSIDER_C="yes"
SHOULD_CONSIDER_SAMPLES="yes"
VERBOSE_OUTPUT="/dev/null"
# Checks that last command ended normally. Prints an error message and exists if not.
check_last_process()
{
@ -61,15 +89,20 @@ check_last_process()
# User help
print_usage()
{
echo "Usage: $0 [clean | build | build-samples | build-pkg | all]"
echo " Default shows this help"
echo "Usage: $0 [clean | build | build-samples | build-pkg | all [--verbose]]"
echo
echo "Commands:"
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-samples\tcompiles the SFML samples"
echo " build-pkg\t\tbuilds the packages to be distributed"
echo " all\t\t\tdoes build, build-samples and build-pkg"
echo " help (default)\tshows this usage information"
echo
echo "Options:"
echo " --verbose\t\tdo not hide standard ouput, errors are still shown"
echo
echo "Contents summary:"
echo " Found C++ project : $SHOULD_CONSIDER_CXX"
echo " Found C project : $SHOULD_CONSIDER_C"
echo " Found samples project : $SHOULD_CONSIDER_SAMPLES"
@ -135,7 +168,7 @@ remove_dir()
{
if test -d "$1"
then
rm -rfv "$1" > /dev/null
rm -rfv "$1" > "$VERBOSE_OUTPUT"
fi
}
@ -144,7 +177,7 @@ remove_file()
{
if test -f "$1"
then
rm -f "$1" > /dev/null
rm -f "$1" > "$VERBOSE_OUTPUT"
fi
}
@ -176,7 +209,7 @@ clean_all()
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 > /dev/null
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"
@ -189,6 +222,7 @@ clean_all()
fi
fi
# Process cleaning for C project
if [ "$SHOULD_CONSIDER_C" == "yes" ]
then
@ -196,7 +230,7 @@ clean_all()
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 > /dev/null
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
@ -217,7 +251,7 @@ clean_all()
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 > /dev/null
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
@ -253,7 +287,7 @@ build_frameworks()
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
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > "$VERBOSE_OUTPUT"
check_last_process " done"
done
@ -277,7 +311,7 @@ build_frameworks()
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
xcodebuild -project "$XCODE_FRAMEWORKS_PROJECT" -target "$target" -parallelizeTargets -configuration "$XCODE_BUILD_STYLE" build > "$VERBOSE_OUTPUT"
check_last_process " done"
done
@ -302,7 +336,7 @@ build_samples()
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
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
@ -323,7 +357,7 @@ copy_info_files()
done
}
# Build the disk image files of the C and C++ Dev and SDK packages
# Build the archives of the C and C++ Dev and SDK packages
build_packages()
{
cd "$ROOT_DIR"
@ -333,7 +367,7 @@ build_packages()
# Build the C++ SDK package
if [ "$SHOULD_CONSIDER_CXX" == "yes" ]
then
echo "Building C++ SDK package..."
printf "Building C++ SDK package..."
make_dir "$CXX_SDK_PACKAGE_DIR"
for dir in "${CXX_SDK_DIRS[@]}"
do
@ -341,7 +375,7 @@ build_packages()
"doc")
if ! test -f "$ROOT_DIR/$dir/html/index.htm"
then
echo "$ROOT_DIR/$dir/html/index.htm not found. Make sure the documentation has been built."
echo "*** $ROOT_DIR/$dir/html/index.htm not found. Make sure the documentation has been built."
exit 1
fi
;;
@ -353,14 +387,13 @@ build_packages()
copy_info_files "$CXX_SDK_PACKAGE_DIR"
check_last_process
# Build the disk image file
printf "Made final folder, building Disk Image File..."
remove_file "$PACKAGES_ROOT_DIR/$CXX_SDK_PACKAGE.dmg"
hdiutil create -format UDBZ -volname "$CXX_SDK_PACKAGE" -srcfolder "$CXX_SDK_PACKAGE_DIR" "$PACKAGES_ROOT_DIR/$CXX_SDK_PACKAGE.dmg" > /dev/null
# Build the archive
cd "$PACKAGES_ROOT_DIR"
tar -cjlf "$PACKAGES_ROOT_DIR/$CXX_SDK_PACKAGE.tar.bz2" "$CXX_SDK_PACKAGE" > "$VERBOSE_OUTPUT"
check_last_process " done"
# Build the C++ Dev package
echo "Building C++ Development package..."
printf "Building C++ Development package..."
make_dir "$CXX_DEV_PACKAGE_DIR"
for dir in "${CXX_DEV_DIRS[@]}"
do
@ -386,10 +419,9 @@ build_packages()
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
# Build the archive
cd "$PACKAGES_ROOT_DIR"
tar -cjlf "$PACKAGES_ROOT_DIR/$CXX_DEV_PACKAGE.tar.bz2" "$CXX_DEV_PACKAGE" > "$VERBOSE_OUTPUT"
check_last_process " done"
fi # SHOULD_CONSIDER_CXX
@ -397,7 +429,7 @@ build_packages()
# Build the C SDK package
if [ "$SHOULD_CONSIDER_C" == "yes" ]
then
echo "Building C SDK package..."
printf "Building C SDK package..."
make_dir "$C_SDK_PACKAGE_DIR"
for dir in "${C_SDK_DIRS[@]}"
do
@ -413,14 +445,13 @@ build_packages()
done
copy_info_files "$C_SDK_PACKAGE_DIR"
# Build the disk image file
printf "Made final folder, building Disk Image File..."
remove_file "$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE.dmg"
hdiutil create -format UDBZ -volname "$C_SDK_PACKAGE" -srcfolder "$C_SDK_PACKAGE_DIR" "$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE.dmg" > /dev/null
# Build the archive
cd "$PACKAGES_ROOT_DIR"
tar -cjlf "$PACKAGES_ROOT_DIR/$C_SDK_PACKAGE.tar.bz2" "$C_SDK_PACKAGE" > "$VERBOSE_OUTPUT"
check_last_process " done"
# Build the C Development package
echo "Building C Development package..."
printf "Building C Development package..."
make_dir "$C_DEV_PACKAGE_DIR"
for dir in "${C_DEV_DIRS[@]}"
do
@ -454,10 +485,9 @@ build_packages()
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
# Build the archive
cd "$PACKAGES_ROOT_DIR"
tar -cjlf "$PACKAGES_ROOT_DIR/$C_DEV_PACKAGE.tar.bz2" "$C_DEV_PACKAGE" > "$VERBOSE_OUTPUT"
check_last_process " done"
fi
@ -476,6 +506,14 @@ main()
action="$1"
fi
for flag in $*
do
if [ "$flag" == "--verbose" ]
then
VERBOSE_OUTPUT="/dev/stdout"
fi
done
case $action in
"clean")
clean_all $*
@ -503,6 +541,9 @@ main()
"help")
print_usage $*
;;
"--verbose")
echo "--verbose option cannot be used alone. See usage."
;;
*)
echo "Unknow action $action."
print_usage $*