diff --git a/contrib/xcode/ReadMe.txt b/contrib/xcode/ReadMe.txt new file mode 100644 index 00000000..4b07bbb2 --- /dev/null +++ b/contrib/xcode/ReadMe.txt @@ -0,0 +1,25 @@ +Exiv2 xcode/ReadMe.txt +-------------------------------------- +See http://dev.exiv2.org/issues/1110 + +exiv2.xcodeproj is a "no thrills" wrapper for the autotools: + +Target Command +config make config +configure ./configure +exiv2 make CXXFLAGS=-ggdb +install sudo make install +samples make samples +tests make tests +exiv2json make exiv2json + +About executables: + +When you add an executable to the "run" command, use: + +bin/.libs/exiv2 As this uses the build library (without having to run install) + +For all sample applications, including exiv2json, you will have to run install when you make library changes. + +Robin Mills +robin@clanmills.com diff --git a/contrib/xcode/exiv2.xcodeproj/project.pbxproj b/contrib/xcode/exiv2.xcodeproj/project.pbxproj new file mode 100644 index 00000000..1b296dde --- /dev/null +++ b/contrib/xcode/exiv2.xcodeproj/project.pbxproj @@ -0,0 +1,721 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 47; + objects = { + +/* Begin PBXContainerItemProxy section */ + A1CF5C831B8E3EB400B0D341 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A10C3EB217DE224C008DC351 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A105A09C1B8E36D100833CA3; + remoteInfo = exiv2; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + A1467F9B1B8F1B0400A2E7CD /* ReadMe.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; }; + A193A3D11B91DA7200455831 /* xmpsdk */ = {isa = PBXFileReference; lastKnownFileType = folder; name = xmpsdk; path = ../xmpsdk; sourceTree = ""; }; + A193A3D21B91DBC300455831 /* bin */ = {isa = PBXFileReference; lastKnownFileType = folder; name = bin; path = ../bin; sourceTree = ""; }; + A193A3D31B91DBC300455831 /* samples */ = {isa = PBXFileReference; lastKnownFileType = folder; name = samples; path = ../samples; sourceTree = ""; }; + A193A3D41B91DBC300455831 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../src; sourceTree = ""; }; + A193A3D51B91DBC300455831 /* test */ = {isa = PBXFileReference; lastKnownFileType = folder; name = test; path = ../test; sourceTree = ""; }; + A193A3D61B91DBC300455831 /* include */ = {isa = PBXFileReference; lastKnownFileType = folder; name = include; path = ../include; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + A10C3EB117DE224C008DC351 = { + isa = PBXGroup; + children = ( + A1467F9B1B8F1B0400A2E7CD /* ReadMe.txt */, + A193A3D21B91DBC300455831 /* bin */, + A193A3D61B91DBC300455831 /* include */, + A193A3D31B91DBC300455831 /* samples */, + A193A3D41B91DBC300455831 /* src */, + A193A3D51B91DBC300455831 /* test */, + A193A3D11B91DA7200455831 /* xmpsdk */, + ); + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXLegacyTarget section */ + A105A09C1B8E36D100833CA3 /* exiv2 */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "make -j $(ACTION)"; + buildConfigurationList = A105A09D1B8E36D100833CA3 /* Build configuration list for PBXLegacyTarget "exiv2" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/env; + buildWorkingDirectory = "$(PROJECT_DIR)/.."; + dependencies = ( + ); + name = exiv2; + passBuildSettingsInEnvironment = 1; + productName = exiv2; + }; + A13633F91B8EF5AD0046FC3F /* samples */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(TARGET_NAME)"; + buildConfigurationList = A13633FC1B8EF5AD0046FC3F /* Build configuration list for PBXLegacyTarget "samples" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = "$(PROJECT_DIR)/.."; + dependencies = ( + ); + name = samples; + passBuildSettingsInEnvironment = 1; + productName = samples; + }; + A14E15981B8F04F8006F2E61 /* config */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "PATH=/usr/local/bin:/opt/local/bin:$(PATH) make config"; + buildConfigurationList = A14E159B1B8F04F8006F2E61 /* Build configuration list for PBXLegacyTarget "config" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/env; + buildWorkingDirectory = "$(PROJECT_DIR)/.."; + dependencies = ( + ); + name = config; + passBuildSettingsInEnvironment = 1; + productName = config; + }; + A14E159C1B8F0755006F2E61 /* configure */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "./configure CXXFLAGS=-ggdb"; + buildConfigurationList = A14E159D1B8F0755006F2E61 /* Build configuration list for PBXLegacyTarget "configure" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/env; + buildWorkingDirectory = "$(PROJECT_DIR)/.."; + dependencies = ( + ); + name = configure; + passBuildSettingsInEnvironment = 1; + productName = configure; + }; + A17533741B8E7DA9003247E0 /* tests */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(TARGET_NAME)"; + buildConfigurationList = A17533751B8E7DA9003247E0 /* Build configuration list for PBXLegacyTarget "tests" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/make; + buildWorkingDirectory = "$(PROJECT_DIR)/.."; + dependencies = ( + ); + name = tests; + passBuildSettingsInEnvironment = 1; + productName = test; + }; + A1CF5C7F1B8E3EA600B0D341 /* exiv2json */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "make $(TARGET_NAME)"; + buildConfigurationList = A1CF5C821B8E3EA600B0D341 /* Build configuration list for PBXLegacyTarget "exiv2json" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/env; + buildWorkingDirectory = "$(PROJECT_DIR)/.."; + dependencies = ( + A1CF5C841B8E3EB400B0D341 /* PBXTargetDependency */, + ); + name = exiv2json; + passBuildSettingsInEnvironment = 1; + productName = exiv2json; + }; + A1CF5C851B8E4AB400B0D341 /* install */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "make install"; + buildConfigurationList = A1CF5C861B8E4AB400B0D341 /* Build configuration list for PBXLegacyTarget "install" */; + buildPhases = ( + ); + buildToolPath = /usr/bin/sudo; + buildWorkingDirectory = "$(PROJECT_DIR)/.."; + dependencies = ( + ); + name = install; + passBuildSettingsInEnvironment = 1; + productName = install; + }; +/* End PBXLegacyTarget section */ + +/* Begin PBXProject section */ + A10C3EB217DE224C008DC351 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + ORGANIZATIONNAME = "Team Exiv2"; + TargetAttributes = { + A105A09C1B8E36D100833CA3 = { + CreatedOnToolsVersion = 6.4; + }; + A13633F91B8EF5AD0046FC3F = { + CreatedOnToolsVersion = 6.4; + }; + A14E15981B8F04F8006F2E61 = { + CreatedOnToolsVersion = 6.4; + }; + A14E159C1B8F0755006F2E61 = { + CreatedOnToolsVersion = 6.4; + }; + A17533741B8E7DA9003247E0 = { + CreatedOnToolsVersion = 6.4; + }; + A1CF5C7F1B8E3EA600B0D341 = { + CreatedOnToolsVersion = 6.4; + }; + A1CF5C851B8E4AB400B0D341 = { + CreatedOnToolsVersion = 6.4; + }; + }; + }; + buildConfigurationList = A10C3EB517DE224C008DC351 /* Build configuration list for PBXProject "exiv2" */; + compatibilityVersion = "Xcode 6.3"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = A10C3EB117DE224C008DC351; + productRefGroup = A10C3EB117DE224C008DC351; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A14E15981B8F04F8006F2E61 /* config */, + A14E159C1B8F0755006F2E61 /* configure */, + A105A09C1B8E36D100833CA3 /* exiv2 */, + A1CF5C851B8E4AB400B0D341 /* install */, + A13633F91B8EF5AD0046FC3F /* samples */, + A17533741B8E7DA9003247E0 /* tests */, + A1CF5C7F1B8E3EA600B0D341 /* exiv2json */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXTargetDependency section */ + A1CF5C841B8E3EB400B0D341 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A105A09C1B8E36D100833CA3 /* exiv2 */; + targetProxy = A1CF5C831B8E3EB400B0D341 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + A105A09E1B8E36D100833CA3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A105A09F1B8E36D100833CA3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + A10C3EB717DE224C008DC351 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + A10C3EB817DE224C008DC351 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.10; + SDKROOT = macosx; + }; + name = Release; + }; + A13633FA1B8EF5AD0046FC3F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A13633FB1B8EF5AD0046FC3F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + A14E15991B8F04F8006F2E61 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A14E159A1B8F04F8006F2E61 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + A14E159E1B8F0755006F2E61 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A14E159F1B8F0755006F2E61 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + A17533761B8E7DA9003247E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A17533771B8E7DA9003247E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + A1CF5C801B8E3EA600B0D341 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A1CF5C811B8E3EA600B0D341 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + A1CF5C871B8E4AB400B0D341 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + DEBUGGING_SYMBOLS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + A1CF5C881B8E4AB400B0D341 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A105A09D1B8E36D100833CA3 /* Build configuration list for PBXLegacyTarget "exiv2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A105A09E1B8E36D100833CA3 /* Debug */, + A105A09F1B8E36D100833CA3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A10C3EB517DE224C008DC351 /* Build configuration list for PBXProject "exiv2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A10C3EB717DE224C008DC351 /* Debug */, + A10C3EB817DE224C008DC351 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A13633FC1B8EF5AD0046FC3F /* Build configuration list for PBXLegacyTarget "samples" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A13633FA1B8EF5AD0046FC3F /* Debug */, + A13633FB1B8EF5AD0046FC3F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A14E159B1B8F04F8006F2E61 /* Build configuration list for PBXLegacyTarget "config" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A14E15991B8F04F8006F2E61 /* Debug */, + A14E159A1B8F04F8006F2E61 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A14E159D1B8F0755006F2E61 /* Build configuration list for PBXLegacyTarget "configure" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A14E159E1B8F0755006F2E61 /* Debug */, + A14E159F1B8F0755006F2E61 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A17533751B8E7DA9003247E0 /* Build configuration list for PBXLegacyTarget "tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A17533761B8E7DA9003247E0 /* Debug */, + A17533771B8E7DA9003247E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A1CF5C821B8E3EA600B0D341 /* Build configuration list for PBXLegacyTarget "exiv2json" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A1CF5C801B8E3EA600B0D341 /* Debug */, + A1CF5C811B8E3EA600B0D341 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A1CF5C861B8E4AB400B0D341 /* Build configuration list for PBXLegacyTarget "install" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A1CF5C871B8E4AB400B0D341 /* Debug */, + A1CF5C881B8E4AB400B0D341 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A10C3EB217DE224C008DC351 /* Project object */; +} diff --git a/include/exiv2/exiv2.hpp b/include/exiv2/exiv2.hpp index 878b9397..19b31a28 100644 --- a/include/exiv2/exiv2.hpp +++ b/include/exiv2/exiv2.hpp @@ -31,12 +31,12 @@ // ***************************************************************************** // included header files +#include "datasets.hpp" #include "basicio.hpp" #include "bmpimage.hpp" #include "convert.hpp" #include "cr2image.hpp" #include "crwimage.hpp" -#include "datasets.hpp" #include "easyaccess.hpp" #include "epsimage.hpp" #include "error.hpp" diff --git a/include/exiv2/http.hpp b/include/exiv2/http.hpp index e4e5ad1d..6805f333 100644 --- a/include/exiv2/http.hpp +++ b/include/exiv2/http.hpp @@ -5,12 +5,10 @@ #include #include -namespace Exiv2 { - typedef std::map dict_t; - typedef dict_t::iterator dict_i; - - EXIV2API int http(dict_t& request,dict_t& response,std::string& errors); +#include "datasets.hpp" +namespace Exiv2 { + EXIV2API int http(Exiv2::Dictionary& request,Exiv2::Dictionary& response,std::string& errors); } #ifndef EXV_USE_CURL diff --git a/samples/Makefile b/samples/Makefile index 0a4aff54..c3ca6512 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -123,7 +123,7 @@ LINK.cc += -rpath $(PREFIX) -L$(PREFIX) # to build the samples. Some errors only show up in this scenario, e.g., errors # due to missing headers which are not installed (depending on compile-time # settings) but may be wrongly included from other headers. -COMPILE.cc += -I$(top_srcdir)/include/exiv2 +COMPILE.cc += -I$(top_srcdir)/include -I$(top_srcdir)/include/exiv2 # ****************************************************************************** # Rules @@ -168,7 +168,7 @@ geotag: %: %.cpp # link applications which require utils.cpp support metacopy path-test: %: %.cpp ../src/utils.o - $(COMPILE.cc) -I../src -I../include/exiv2 -o $@.o $< + $(COMPILE.cc) -I../src -I../include -I../include/exiv2 -o $@.o $< @$(MAKEDEPEND) @$(POSTDEPEND) $(LIBTOOL) --mode=link $(LINK.cc) $@.o ../src/utils.o -o ../bin/$@ diff --git a/samples/conntest.cpp b/samples/conntest.cpp index 777f1da5..43eb42e3 100644 --- a/samples/conntest.cpp +++ b/samples/conntest.cpp @@ -6,12 +6,11 @@ #include #include -using namespace std; void httpcon(const std::string& url, bool useHttp1_0 = false) { - Exiv2::dict_t response; - Exiv2::dict_t request; - string errors; + Exiv2::Dictionary response; + Exiv2::Dictionary request; + std::string errors; Exiv2::Uri uri = Exiv2::Uri::Parse(url); Exiv2::Uri::Decode(uri); @@ -41,7 +40,7 @@ void curlcon(const std::string& url, bool useHttp1_0 = false) { throw Exiv2::Error(1, "Timeout Environmental Variable must be a positive integer."); } - string response; + std::string response; curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, Exiv2::curlWriter); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); @@ -74,14 +73,14 @@ void sshcon(const std::string& url) { Exiv2::Uri uri = Exiv2::Uri::Parse(url); Exiv2::Uri::Decode(uri); - string page = uri.Path; + std::string page = uri.Path; // remove / at the beginning of the path if (page[0] == '/') { page = page.substr(1); } Exiv2::SSH ssh(uri.Host, uri.Username, uri.Password, uri.Port); - string response = ""; - string cmd = "declare -a x=($(ls -alt " + page + ")); echo ${x[4]}"; + std::string response = ""; + std::string cmd = "declare -a x=($(ls -alt " + page + ")); echo ${x[4]}"; if (ssh.runCommand(cmd, &response) != 0) { throw Exiv2::Error(1, "Unable to get file length."); } else { @@ -96,7 +95,7 @@ void sftpcon(const std::string& url) { Exiv2::Uri uri = Exiv2::Uri::Parse(url); Exiv2::Uri::Decode(uri); - string page = uri.Path; + std::string page = uri.Path; // remove / at the beginning of the path if (page[0] == '/') { page = page.substr(1); @@ -112,7 +111,7 @@ void sftpcon(const std::string& url) { int main(int argc,const char** argv) { if (argc < 2) { - cout << "Usage: " << argv[0] << " url {-http1_0}\n"; + std::cout << "Usage: " << argv[0] << " url {-http1_0}" << std::endl; return 1; } std::string url(argv[1]); @@ -146,12 +145,12 @@ int main(int argc,const char** argv) isOk = true; } } catch (Exiv2::AnyError& e) { - std::cout << "Error: '" << e << "'\n"; + std::cout << "Error: '" << e << "'" << std::endl; return -1; } - if (!isOk) cout << "The protocol is unsupported.\n"; - else cout << "OK.\n"; + if (!isOk) std::cout << "The protocol is unsupported." << std::endl; + else std::cout << "OK." << std::endl; return 0; } diff --git a/samples/exiv2json.cpp b/samples/exiv2json.cpp index 45271455..505268d9 100644 --- a/samples/exiv2json.cpp +++ b/samples/exiv2json.cpp @@ -3,7 +3,6 @@ // Sample program to print metadata in JSON format #include -#include #include "Jzon.h" #include diff --git a/samples/httptest.cpp b/samples/httptest.cpp index defbc281..d8d267a9 100644 --- a/samples/httptest.cpp +++ b/samples/httptest.cpp @@ -8,12 +8,11 @@ #include #include -using namespace std; static int testSyntax(const char* arg) { if ( !arg ) { - cout << "insufficient input" << endl; + std::cout << "insufficient input" << std::endl; exit(0); } return 0; @@ -22,18 +21,18 @@ static int testSyntax(const char* arg) int main(int argc,const char** argv) { if ( argc < 2 ) { - cout << "usage : " << argv[0] << " [key value]+" << endl; - cout << "example: " << argv[0] << " [[-url] url | -server clanmills.com -page /LargsPanorama.jpg] -header \"Range: bytes=0-200\"" << endl; - cout << "or : " << argv[0] << " http://clanmills.com/LargsPanorama.jpg" << endl; - cout << "useful keys: -verb {GET|HEAD|PUT} -page str -server str -port number -version [-header something]+ " << endl; - cout << "default keys: -verb GET -server clanmills.com -page robin.shtml -port 80 -version 1.0" << endl; - cout << "export http_proxy=url eg export http_proxy=http://64.62.247.244:80" << endl; + std::cout << "usage : " << argv[0] << " [key value]+" << std::endl; + std::cout << "example: " << argv[0] << " [[-url] url | -server clanmills.com -page /LargsPanorama.jpg] -header \"Range: bytes=0-200\"" << std::endl; + std::cout << "or : " << argv[0] << " http://clanmills.com/LargsPanorama.jpg" << std::endl; + std::cout << "useful keys: -verb {GET|HEAD|PUT} -page str -server str -port number -version [-header something]+ " << std::endl; + std::cout << "default keys: -verb GET -server clanmills.com -page robin.shtml -port 80 -version 1.0" << std::endl; + std::cout << "export http_proxy=url eg export http_proxy=http://64.62.247.244:80" << std::endl; return 0; } - Exiv2::dict_t response; - Exiv2::dict_t request; - string errors; + Exiv2::Dictionary response; + Exiv2::Dictionary request; + std::string errors; // convert the command-line arguments into the request dictionary for ( int i = 1 ; i < argc ; i +=2 ) { @@ -41,14 +40,14 @@ int main(int argc,const char** argv) // skip past the -'s on the key while ( arg[0] == '-' ) arg++; - if ( string(arg) == "header" ) { + if ( std::string(arg) == "header" ) { testSyntax(argv[i+1]); - string header = argv[i+1]; + std::string header = argv[i+1]; if ( ! strchr(argv[i+1],'\n') ) { header += "\r\n"; } request[arg] += header; - } else if ( string(arg) == "uri" || string(arg) == "url" ) { + } else if ( std::string(arg) == "uri" || std::string(arg) == "url" ) { testSyntax(argv[i+1]); Exiv2::Uri uri = Exiv2::Uri::Parse(argv[i+1]); if ( uri.Protocol == "http" ) { @@ -56,7 +55,7 @@ int main(int argc,const char** argv) request["page"] = uri.Path; request["port"] = uri.Port; } - } else if ( string(arg).substr(0,7) == "http://" ) { + } else if ( std::string(arg).substr(0,7) == "http://" ) { Exiv2::Uri uri = Exiv2::Uri::Parse(argv[i--]); if ( uri.Protocol == "http" ) { request["server"] = uri.Host; @@ -72,25 +71,25 @@ int main(int argc,const char** argv) if ( !request.count("server") ) request["server"] = "clanmills.com"; int result = Exiv2::http(request,response,errors); - cout << "result = " << result << endl; - cout << "errors = " << errors << endl; - cout << endl; + std::cout << "result = " << result << std::endl; + std::cout << "errors = " << errors << std::endl; + std::cout << std::endl; - for ( Exiv2::dict_i it = response.begin() ; it != response.end() ; it++ ) { + for ( Exiv2::Dictionary_i it = response.begin() ; it != response.end() ; it++ ) { // don't show request header if (it->first == "requestheaders") continue; - cout << it->first << " -> "; + std::cout << it->first << " -> "; if ( it->first == "body") { - string& value = it->second; - cout << "# " << value.length(); - if ( value.length() < 1000 ) cout << " = " << value ; + std::string value(it->second); + std::cout << "# " << value.length(); + if ( value.length() < 1000 ) std::cout << " = " << value ; } else { - cout << it->second; + std::cout << it->second; } - cout << endl; + std::cout << std::endl; } return 0; diff --git a/src/basicio.cpp b/src/basicio.cpp index 3dd7d16c..19653260 100644 --- a/src/basicio.cpp +++ b/src/basicio.cpp @@ -30,7 +30,7 @@ EXIV2_RCSID("@(#) $Id$") // included header files #include "config.h" - +#include "datasets.hpp" #include "basicio.hpp" #include "futils.hpp" #include "types.hpp" @@ -2012,8 +2012,8 @@ namespace Exiv2 { long HttpIo::HttpImpl::getFileLength() { - dict_t response; - dict_t request; + Exiv2::Dictionary response; + Exiv2::Dictionary request; std::string errors; request["server"] = hostInfo_.Host; request["page" ] = hostInfo_.Path; @@ -2024,14 +2024,14 @@ namespace Exiv2 { throw Error(55, "Server", serverCode); } - dict_i lengthIter = response.find("Content-Length"); + Exiv2::Dictionary_i lengthIter = response.find("Content-Length"); return (lengthIter == response.end()) ? -1 : atol((lengthIter->second).c_str()); } void HttpIo::HttpImpl::getDataByRange(long lowBlock, long highBlock, std::string& response) { - dict_t responseDic; - dict_t request; + Exiv2::Dictionary responseDic; + Exiv2::Dictionary request; request["server"] = hostInfo_.Host; request["page" ] = hostInfo_.Path; if (hostInfo_.Port != "") request["port"] = hostInfo_.Port; @@ -2063,8 +2063,8 @@ namespace Exiv2 { scriptPath = "/" + scriptPath; } - dict_t response; - dict_t request; + Exiv2::Dictionary response; + Exiv2::Dictionary request; std::string errors; Uri scriptUri = Exiv2::Uri::Parse(scriptPath); diff --git a/src/http.cpp b/src/http.cpp index b8a429bb..a8c8b351 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -26,6 +26,7 @@ // included header files #include "config.h" +#include "datasets.hpp" #include "http.hpp" #include "futils.hpp" @@ -171,9 +172,9 @@ static void flushBuffer(const char* buffer,size_t start,int& end,std::string& fi end = 0 ; } -static Exiv2::dict_t stringToDict(const std::string& s) +static Exiv2::Dictionary stringToDict(const std::string& s) { - Exiv2::dict_t result; + Exiv2::Dictionary result; std::string token; size_t i = 0; @@ -203,7 +204,7 @@ static int makeNonBlocking(int sockfd) #endif } -int Exiv2::http(dict_t& request,dict_t& response,std::string& errors) +int Exiv2::http(Exiv2::Dictionary& request,Exiv2::Dictionary& response,std::string& errors) { if ( !request.count("verb") ) request["verb" ] = "GET"; if ( !request.count("header") ) request["header" ] = "" ; @@ -248,7 +249,7 @@ int Exiv2::http(dict_t& request,dict_t& response,std::string& errors) const char* no_proxy = getenv(no_proxi); bool bNoProxy = NO_PROXY||no_proxy; std::string no_prox = std::string(bNoProxy?(no_proxy?no_proxy:NO_PROXY):""); - Exiv2::dict_t noProxy= stringToDict(no_prox + ",localhost,127.0.0.1"); + Exiv2::Dictionary noProxy= stringToDict(no_prox + ",localhost,127.0.0.1"); // if the server is on the no_proxy list ... ignore the proxy! if ( noProxy.count(servername) ) bProx = false;