[Drdivx-commits] SF.net SVN: drdivx: [789] DrDivX/trunk/drdivx2
Brought to you by:
harikrishnan_v,
seabass089
From: <har...@us...> - 2006-10-31 19:06:14
|
Revision: 789 http://svn.sourceforge.net/drdivx/?rev=789&view=rev Author: harikrishnan_v Date: 2006-10-31 11:06:11 -0800 (Tue, 31 Oct 2006) Log Message: ----------- Port copy plugin to os x Modified Paths: -------------- DrDivX/trunk/drdivx2/build/xcode/gui.xcodeproj/project.pbxproj DrDivX/trunk/drdivx2/src/copy_plugin/CopyPlugin.cpp Modified: DrDivX/trunk/drdivx2/build/xcode/gui.xcodeproj/project.pbxproj =================================================================== --- DrDivX/trunk/drdivx2/build/xcode/gui.xcodeproj/project.pbxproj 2006-10-31 18:41:32 UTC (rev 788) +++ DrDivX/trunk/drdivx2/build/xcode/gui.xcodeproj/project.pbxproj 2006-10-31 19:06:11 UTC (rev 789) @@ -49,6 +49,9 @@ 4784403F0A91214400475408 /* VersionChecker.cpp in Build Sources */ = {isa = PBXBuildFile; fileRef = 4784403B0A91214400475408 /* VersionChecker.cpp */; }; 478440440A9121F300475408 /* moc_VersionChecker.cpp in Build Sources */ = {isa = PBXBuildFile; fileRef = 478440430A9121F300475408 /* moc_VersionChecker.cpp */; }; 479341B7E4697743A03F4CB3 /* moc_StatusGraphWidget.cpp in Build Sources */ = {isa = PBXBuildFile; fileRef = 46346460A14B5CFCC4D697B4 /* moc_StatusGraphWidget.cpp */; settings = {ATTRIBUTES = (); }; }; + 47A006030AF7D51F0073C0D8 /* CopyPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47A006010AF7D51F0073C0D8 /* CopyPlugin.cpp */; }; + 47A006040AF7D51F0073C0D8 /* CopyPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 47A006020AF7D51F0073C0D8 /* CopyPlugin.h */; }; + 47A0060D0AF7D5460073C0D8 /* PluginImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47A0060C0AF7D5460073C0D8 /* PluginImpl.cpp */; }; 47C262B60A90FF83003C8AF8 /* DivXMediaFileBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47C262B20A90FF83003C8AF8 /* DivXMediaFileBuilder.cpp */; }; 47C262B70A90FF83003C8AF8 /* DivXMediaFileBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 47C262B30A90FF83003C8AF8 /* DivXMediaFileBuilder.h */; }; 47C262B80A90FF83003C8AF8 /* MediaFileBuilderImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47C262B40A90FF83003C8AF8 /* MediaFileBuilderImpl.cpp */; }; @@ -391,6 +394,10 @@ 4784403B0A91214400475408 /* VersionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VersionChecker.cpp; path = ../../src/gui/VersionChecker.cpp; sourceTree = SOURCE_ROOT; }; 4784403C0A91214400475408 /* VersionChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VersionChecker.h; path = ../../src/gui/VersionChecker.h; sourceTree = SOURCE_ROOT; }; 478440430A9121F300475408 /* moc_VersionChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_VersionChecker.cpp; path = ../../src/gui/generated/moc_VersionChecker.cpp; sourceTree = SOURCE_ROOT; }; + 47A005FF0AF7D4F70073C0D8 /* copy_plugin.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = copy_plugin.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + 47A006010AF7D51F0073C0D8 /* CopyPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CopyPlugin.cpp; path = ../../src/copy_plugin/CopyPlugin.cpp; sourceTree = SOURCE_ROOT; }; + 47A006020AF7D51F0073C0D8 /* CopyPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CopyPlugin.h; path = ../../src/copy_plugin/CopyPlugin.h; sourceTree = SOURCE_ROOT; }; + 47A0060C0AF7D5460073C0D8 /* PluginImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginImpl.cpp; path = ../../src/util/PluginImpl.cpp; sourceTree = SOURCE_ROOT; }; 47C262AB0A90FF21003C8AF8 /* libbuilder.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libbuilder.a; sourceTree = BUILT_PRODUCTS_DIR; }; 47C262B20A90FF83003C8AF8 /* DivXMediaFileBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DivXMediaFileBuilder.cpp; path = ../../src/builder/DivXMediaFileBuilder.cpp; sourceTree = SOURCE_ROOT; }; 47C262B30A90FF83003C8AF8 /* DivXMediaFileBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DivXMediaFileBuilder.h; path = ../../src/builder/DivXMediaFileBuilder.h; sourceTree = SOURCE_ROOT; }; @@ -653,6 +660,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 47A005FD0AF7D4F70073C0D8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 47C262A90A90FF21003C8AF8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -736,6 +750,9 @@ 05596AB53D8D521C69802C27 /* gui */ = { isa = PBXGroup; children = ( + 47A0060C0AF7D5460073C0D8 /* PluginImpl.cpp */, + 47A006010AF7D51F0073C0D8 /* CopyPlugin.cpp */, + 47A006020AF7D51F0073C0D8 /* CopyPlugin.h */, 4714BBE60A8D05330042C8A7 /* analyzer */, 47F766A50A91082D00A89582 /* builder */, 47F766AA0A91087A00A89582 /* detector */, @@ -854,6 +871,7 @@ 47C263E30A910452003C8AF8 /* libproperty.a */, 47C264410A9104E4003C8AF8 /* libserializer.a */, 47C264540A91055E003C8AF8 /* libutil.a */, + 47A005FF0AF7D4F70073C0D8 /* copy_plugin.dylib */, ); name = Products; sourceTree = "<group>"; @@ -1261,6 +1279,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 47A005FB0AF7D4F70073C0D8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 47A006040AF7D51F0073C0D8 /* CopyPlugin.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 47C262A70A90FF21003C8AF8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1420,6 +1446,23 @@ productReference = 4714BBC80A8D04FE0042C8A7 /* libanalyzer.a */; productType = "com.apple.product-type.library.static"; }; + 47A005FE0AF7D4F70073C0D8 /* copy_plugin */ = { + isa = PBXNativeTarget; + buildConfigurationList = 47A006050AF7D51F0073C0D8 /* Build configuration list for PBXNativeTarget "copy_plugin" */; + buildPhases = ( + 47A005FB0AF7D4F70073C0D8 /* Headers */, + 47A005FC0AF7D4F70073C0D8 /* Sources */, + 47A005FD0AF7D4F70073C0D8 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = copy_plugin; + productName = copy_plugin; + productReference = 47A005FF0AF7D4F70073C0D8 /* copy_plugin.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; 47C262AA0A90FF21003C8AF8 /* builder */ = { isa = PBXNativeTarget; buildConfigurationList = 47C262AC0A90FF3F003C8AF8 /* Build configuration list for PBXNativeTarget "builder" */; @@ -1663,6 +1706,7 @@ 47C263E20A910452003C8AF8 /* property */, 47C264400A9104E4003C8AF8 /* serializer */, 47C264530A91055E003C8AF8 /* util */, + 47A005FE0AF7D4F70073C0D8 /* copy_plugin */, ); }; /* End PBXProject section */ @@ -1720,6 +1764,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 47A005FC0AF7D4F70073C0D8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 47A006030AF7D51F0073C0D8 /* CopyPlugin.cpp in Sources */, + 47A0060D0AF7D5460073C0D8 /* PluginImpl.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 47C262A80A90FF21003C8AF8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2449,6 +2502,62 @@ }; name = Release; }; + 47A006060AF7D51F0073C0D8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + Carbon, + ); + PREBINDING = NO; + PRODUCT_NAME = copy_plugin; + USER_HEADER_SEARCH_PATHS = ../../include; + ZERO_LINK = YES; + }; + name = Debug; + }; + 47A006070AF7D51F0073C0D8 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + Carbon, + ); + PREBINDING = NO; + PRODUCT_NAME = copy_plugin; + USER_HEADER_SEARCH_PATHS = ../../include; + ZERO_LINK = NO; + }; + name = Release; + }; 47C262AD0A90FF3F003C8AF8 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2951,6 +3060,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 47A006050AF7D51F0073C0D8 /* Build configuration list for PBXNativeTarget "copy_plugin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 47A006060AF7D51F0073C0D8 /* Debug */, + 47A006070AF7D51F0073C0D8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 47C262AC0A90FF3F003C8AF8 /* Build configuration list for PBXNativeTarget "builder" */ = { isa = XCConfigurationList; buildConfigurations = ( Modified: DrDivX/trunk/drdivx2/src/copy_plugin/CopyPlugin.cpp =================================================================== --- DrDivX/trunk/drdivx2/src/copy_plugin/CopyPlugin.cpp 2006-10-31 18:41:32 UTC (rev 788) +++ DrDivX/trunk/drdivx2/src/copy_plugin/CopyPlugin.cpp 2006-10-31 19:06:11 UTC (rev 789) @@ -25,6 +25,8 @@ #ifdef _WIN32 #include <windows.h> #include <tchar.h> +#else if defined __APPLE__ && defined __MACH__ +#include <CoreServices/CoreServices.h> #endif CopyPlugin::CopyPlugin() @@ -85,10 +87,31 @@ delete event; CoUninitialize(); +#elif defined __APPLE__ && defined __MACH__ + OSStatus status = noErr; + FSRef srcRef; + FSRef dstRef; + status = FSPathMakeRef((const UInt8 *) value, &srcRef, NULL); + + if (status != noErr) + goto clean_exit; + + status = FSPathMakeRef((const UInt8 *) info.properties[0].data.strVal, &dstRef, NULL); + + if (status != noErr) + goto clean_exit; + + status = FSCopyObjectSync(&srcRef, &dstRef, NULL, NULL, kFSFileOperationOverwrite); + + if (status != noErr) + goto clean_exit; + + status = PLUGIN_SUCCEEDED; + +clean_exit: #else #error "OS not supported" #endif - return (eventId == PLUGIN_SUCCEEDED) ? noPluginErr : runPluginErr; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |