From a4f36118dc3781fcee3e633d2db99127de919c68 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Fri, 18 Nov 2011 04:46:20 +0000 Subject: DFNet for Mac OS X. Note that DFNet is disabled by default, and there are still a few rough edges. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72400 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- .../plugins/DFNet/DFNet.xcodeproj/project.pbxproj | 388 +++++++++++++++ macosx/plugins/DFNet/English.lproj/Credits.rtf | 13 + macosx/plugins/DFNet/English.lproj/DFNet.xib | 520 +++++++++++++++++++++ .../plugins/DFNet/English.lproj/InfoPlist.strings | Bin 0 -> 450 bytes .../DFNet/English.lproj/Localizable.strings | 11 + macosx/plugins/DFNet/English.lproj/SockDialog.xib | 283 +++++++++++ macosx/plugins/DFNet/Info.plist | 24 + .../plugins/DFNet/macsrc/PluginConfigController.h | 16 + .../plugins/DFNet/macsrc/PluginConfigController.m | 145 ++++++ macosx/plugins/DFNet/macsrc/SockDialog.h | 16 + macosx/plugins/DFNet/macsrc/SockDialog.m | 85 ++++ macosx/plugins/DFNet/macsrc/cfg.c | 51 ++ macosx/plugins/DFNet/version.plist | 16 + 13 files changed, 1568 insertions(+) create mode 100755 macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj create mode 100644 macosx/plugins/DFNet/English.lproj/Credits.rtf create mode 100644 macosx/plugins/DFNet/English.lproj/DFNet.xib create mode 100755 macosx/plugins/DFNet/English.lproj/InfoPlist.strings create mode 100644 macosx/plugins/DFNet/English.lproj/Localizable.strings create mode 100644 macosx/plugins/DFNet/English.lproj/SockDialog.xib create mode 100644 macosx/plugins/DFNet/Info.plist create mode 100644 macosx/plugins/DFNet/macsrc/PluginConfigController.h create mode 100644 macosx/plugins/DFNet/macsrc/PluginConfigController.m create mode 100644 macosx/plugins/DFNet/macsrc/SockDialog.h create mode 100644 macosx/plugins/DFNet/macsrc/SockDialog.m create mode 100644 macosx/plugins/DFNet/macsrc/cfg.c create mode 100644 macosx/plugins/DFNet/version.plist (limited to 'macosx/plugins/DFNet') diff --git a/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj b/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj new file mode 100755 index 00000000..bddb0aff --- /dev/null +++ b/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj @@ -0,0 +1,388 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 551ED70C130F209C00D19D11 /* SockDialog.h in Headers */ = {isa = PBXBuildFile; fileRef = 551ED70A130F209C00D19D11 /* SockDialog.h */; }; + 551ED70D130F209C00D19D11 /* SockDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 551ED70B130F209C00D19D11 /* SockDialog.m */; }; + 55278DBD12C813AC00288CD8 /* dfnet.c in Sources */ = {isa = PBXBuildFile; fileRef = 55278DBA12C813AC00288CD8 /* dfnet.c */; }; + 55278DBE12C813AC00288CD8 /* dfnet.h in Headers */ = {isa = PBXBuildFile; fileRef = 55278DBB12C813AC00288CD8 /* dfnet.h */; }; + 55278DC212C8141600288CD8 /* cfg.c in Sources */ = {isa = PBXBuildFile; fileRef = 55278DC112C8141600288CD8 /* cfg.c */; }; + 55612EC912C965F500BD3D17 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 55278DBC12C813AC00288CD8 /* unix.c */; }; + 559DACB3146C64B800C5DF71 /* DFNet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 559DACB1146C64B800C5DF71 /* DFNet.xib */; }; + 559DACB8146C64D600C5DF71 /* SockDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 559DACB6146C64D600C5DF71 /* SockDialog.xib */; }; + 55F79D6C1475B252007C856E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55F79D6E1475B252007C856E /* Localizable.strings */; }; + 71F3C32A11F3CD0B007B9F12 /* PluginConfigController.h in Headers */ = {isa = PBXBuildFile; fileRef = 71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */; }; + 71F3C32B11F3CD0B007B9F12 /* PluginConfigController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71F3C32711F3CD0B007B9F12 /* PluginConfigController.m */; }; + 71F3C38611F3CFED007B9F12 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71F3C38511F3CFED007B9F12 /* AppKit.framework */; }; + 71F3C47A11F3D108007B9F12 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 71F3C47811F3D108007B9F12 /* Credits.rtf */; }; + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; }; + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; + 551ED70A130F209C00D19D11 /* SockDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SockDialog.h; sourceTree = ""; }; + 551ED70B130F209C00D19D11 /* SockDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SockDialog.m; sourceTree = ""; }; + 55278DBA12C813AC00288CD8 /* dfnet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dfnet.c; path = ../../../plugins/dfnet/dfnet.c; sourceTree = SOURCE_ROOT; }; + 55278DBB12C813AC00288CD8 /* dfnet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dfnet.h; path = ../../../plugins/dfnet/dfnet.h; sourceTree = SOURCE_ROOT; }; + 55278DBC12C813AC00288CD8 /* unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 2; name = unix.c; path = ../../../plugins/dfnet/unix.c; sourceTree = SOURCE_ROOT; }; + 55278DC112C8141600288CD8 /* cfg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cfg.c; sourceTree = ""; }; + 559DACB2146C64B800C5DF71 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = plugins/DFNet/English.lproj/DFNet.xib; sourceTree = ""; }; + 559DACB7146C64D600C5DF71 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = plugins/DFNet/English.lproj/SockDialog.xib; sourceTree = ""; }; + 55F79D6D1475B252007C856E /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; + 71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.h; path = PluginConfigController.h; sourceTree = ""; }; + 71F3C32711F3CD0B007B9F12 /* PluginConfigController.m */ = {isa = PBXFileReference; fileEncoding = 0; lastKnownFileType = sourcecode.c.objc; path = PluginConfigController.m; sourceTree = ""; }; + 71F3C38511F3CFED007B9F12 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 71F3C38711F3CFF7007B9F12 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + 71F3C47911F3D108007B9F12 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = ""; }; + 8D576316048677EA00EA77CD /* DFNet.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DFNet.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D576313048677EA00EA77CD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */, + 71F3C38611F3CFED007B9F12 /* AppKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* CdrDevMac */ = { + isa = PBXGroup; + children = ( + 08FB77AFFE84173DC02AAC07 /* Source Files */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, + 19C28FB6FE9D52B211CA2CBB /* Products */, + ); + name = CdrDevMac; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 71F3C38511F3CFED007B9F12 /* AppKit.framework */, + 71F3C38711F3CFF7007B9F12 /* Carbon.framework */, + 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 559DACB1146C64B800C5DF71 /* DFNet.xib */, + 71F3C47811F3D108007B9F12 /* Credits.rtf */, + 8D576317048677EA00EA77CD /* Info.plist */, + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + 55F79D6E1475B252007C856E /* Localizable.strings */, + 559DACB6146C64D600C5DF71 /* SockDialog.xib */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Source Files */ = { + isa = PBXGroup; + children = ( + 71F3C32111F3CCEF007B9F12 /* macsrc */, + 71F3C30911F3CC22007B9F12 /* src */, + ); + name = "Source Files"; + sourceTree = ""; + }; + 19C28FB6FE9D52B211CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D576316048677EA00EA77CD /* DFNet.psxplugin */, + ); + name = Products; + sourceTree = ""; + }; + 71F3C30911F3CC22007B9F12 /* src */ = { + isa = PBXGroup; + children = ( + 55278DBA12C813AC00288CD8 /* dfnet.c */, + 55278DBB12C813AC00288CD8 /* dfnet.h */, + 55278DBC12C813AC00288CD8 /* unix.c */, + ); + name = src; + sourceTree = ""; + }; + 71F3C32111F3CCEF007B9F12 /* macsrc */ = { + isa = PBXGroup; + children = ( + 55278DC112C8141600288CD8 /* cfg.c */, + 71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */, + 71F3C32711F3CD0B007B9F12 /* PluginConfigController.m */, + 551ED70A130F209C00D19D11 /* SockDialog.h */, + 551ED70B130F209C00D19D11 /* SockDialog.m */, + ); + path = macsrc; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 8D57630E048677EA00EA77CD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 71F3C32A11F3CD0B007B9F12 /* PluginConfigController.h in Headers */, + 55278DBE12C813AC00288CD8 /* dfnet.h in Headers */, + 551ED70C130F209C00D19D11 /* SockDialog.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 8D57630D048677EA00EA77CD /* DFNet */ = { + isa = PBXNativeTarget; + buildConfigurationList = 710735990FDEED75004AD098 /* Build configuration list for PBXNativeTarget "DFNet" */; + buildPhases = ( + 8D57630E048677EA00EA77CD /* Headers */, + 8D57630F048677EA00EA77CD /* Resources */, + 8D576311048677EA00EA77CD /* Sources */, + 8D576313048677EA00EA77CD /* Frameworks */, + 8D576315048677EA00EA77CD /* Rez */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DFNet; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = CdrDevMac; + productReference = 8D576316048677EA00EA77CD /* DFNet.psxplugin */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 7107359E0FDEED75004AD098 /* Build configuration list for PBXProject "DFNet" */; + compatibilityVersion = "Xcode 2.4"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* CdrDevMac */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D57630D048677EA00EA77CD /* DFNet */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D57630F048677EA00EA77CD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, + 71F3C47A11F3D108007B9F12 /* Credits.rtf in Resources */, + 559DACB3146C64B800C5DF71 /* DFNet.xib in Resources */, + 559DACB8146C64D600C5DF71 /* SockDialog.xib in Resources */, + 55F79D6C1475B252007C856E /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXRezBuildPhase section */ + 8D576315048677EA00EA77CD /* Rez */ = { + isa = PBXRezBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXRezBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D576311048677EA00EA77CD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 71F3C32B11F3CD0B007B9F12 /* PluginConfigController.m in Sources */, + 55278DBD12C813AC00288CD8 /* dfnet.c in Sources */, + 55278DC212C8141600288CD8 /* cfg.c in Sources */, + 55612EC912C965F500BD3D17 /* unix.c in Sources */, + 551ED70D130F209C00D19D11 /* SockDialog.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 559DACB1146C64B800C5DF71 /* DFNet.xib */ = { + isa = PBXVariantGroup; + children = ( + 559DACB2146C64B800C5DF71 /* English */, + ); + name = DFNet.xib; + path = ../..; + sourceTree = ""; + }; + 559DACB6146C64D600C5DF71 /* SockDialog.xib */ = { + isa = PBXVariantGroup; + children = ( + 559DACB7146C64D600C5DF71 /* English */, + ); + name = SockDialog.xib; + path = ../..; + sourceTree = ""; + }; + 55F79D6E1475B252007C856E /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 55F79D6D1475B252007C856E /* English */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 71F3C47811F3D108007B9F12 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 71F3C47911F3D108007B9F12 /* English */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7107359A0FDEED75004AD098 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRPLUG=DFNet", + "_MACOSX=1", + ); + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = DFNet; + SECTORDER_FLAGS = ""; + SYMROOT = ../../build; + WRAPPER_EXTENSION = psxplugin; + }; + name = Debug; + }; + 7107359B0FDEED75004AD098 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRPLUG=DFNet", + "_MACOSX=1", + ); + GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = NO; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; + OTHER_LDFLAGS = ""; + PRODUCT_NAME = DFNet; + SECTORDER_FLAGS = ""; + SYMROOT = ../../build; + WRAPPER_EXTENSION = psxplugin; + }; + name = Release; + }; + 7107359F0FDEED75004AD098 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)"; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1"; + HEADER_SEARCH_PATHS = ( + ../../../libpcsxcore, + ../.., + ../../../plugins/dfnet, + ); + MACOSX_DEPLOYMENT_TARGET = 10.6; + ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)"; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; + STRIP_INSTALLED_PRODUCT = NO; + }; + name = Debug; + }; + 710735A00FDEED75004AD098 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; + GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1"; + HEADER_SEARCH_PATHS = ( + ../../../libpcsxcore, + ../.., + ../../../plugins/dfnet, + ); + MACOSX_DEPLOYMENT_TARGET = 10.6; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 710735990FDEED75004AD098 /* Build configuration list for PBXNativeTarget "DFNet" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7107359A0FDEED75004AD098 /* Debug */, + 7107359B0FDEED75004AD098 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7107359E0FDEED75004AD098 /* Build configuration list for PBXProject "DFNet" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7107359F0FDEED75004AD098 /* Debug */, + 710735A00FDEED75004AD098 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/macosx/plugins/DFNet/English.lproj/Credits.rtf b/macosx/plugins/DFNet/English.lproj/Credits.rtf new file mode 100644 index 00000000..fef26c23 --- /dev/null +++ b/macosx/plugins/DFNet/English.lproj/Credits.rtf @@ -0,0 +1,13 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Original coder: +\b0 \ + linuzappz\ +\ + +\b Macintosh Port: +\b0 \ + C.W. "Madd the Sane" Betts} \ No newline at end of file diff --git a/macosx/plugins/DFNet/English.lproj/DFNet.xib b/macosx/plugins/DFNet/English.lproj/DFNet.xib new file mode 100644 index 00000000..5fddbcca --- /dev/null +++ b/macosx/plugins/DFNet/English.lproj/DFNet.xib @@ -0,0 +1,520 @@ + + + + 1060 + 11C74 + 1938 + 1138.23 + 567.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + NSTextField + NSView + NSWindowTemplate + NSTextFieldCell + NSButtonCell + NSButton + NSCustomObject + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + DFNetPlayPluginConfigController + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{196, 240}, {372, 270}} + 544735232 + Settings + NSWindow + + + + + 256 + + + + 268 + {{262, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Okay + + LucidaGrande + 13 + 1044 + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{126, 228}, {96, 22}} + + YES + + -1804468671 + 272630784 + 127.0.0.1 + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + + + + 268 + {{154, 12}, {96, 32}} + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 129 + + Gw + 200 + 25 + + + + + 268 + {{126, 198}, {96, 22}} + + YES + + -1804468671 + 272630784 + 33306 + + + YES + + + + + + + 268 + {{17, 230}, {75, 17}} + + YES + + 68288064 + 272630784 + IP Address: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + + + + 268 + {{17, 200}, {38, 17}} + + YES + + 68288064 + 272630784 + Port: + + + + + + + + + 268 + {{17, 170}, {101, 17}} + + YES + + 68288064 + 272630784 + Player Number: + + + + + + + + + 268 + {{126, 168}, {96, 22}} + + YES + + -1804468671 + 272630784 + 1 + + + YES + + + + + + {372, 270} + + {{0, 0}, {1680, 1028}} + {10000000000000, 10000000000000} + YES + + + + + + + window + + + + 3 + + + + ok: + + + + 8 + + + + cancel: + + + + 15 + + + + ipAddress + + + + 16 + + + + portNum + + + + 23 + + + + playerNum + + + + 28 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + + + + + + 2 + + + + + + + + + + + + + + + 6 + + + + + + + + 7 + + + + + 9 + + + + + + + + 10 + + + + + 13 + + + + + + + + 14 + + + + + 17 + + + + + + + + 18 + + + + + 19 + + + + + + + + 20 + + + + + 21 + + + + + + + + 22 + + + + + 24 + + + + + + + + 25 + + + + + 26 + + + + + + + + 27 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{577, 640}, {372, 270}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + 126 + 0 + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 28 + + + + + DFNetPlayPluginConfigController + NSWindowController + + NSTextField + NSTextField + NSTextField + + + + ipAddress + NSTextField + + + playerNum + NSTextField + + + portNum + NSTextField + + + + IBProjectSource + ./Classes/DFNetPlayPluginConfigController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + YES + 3 + + diff --git a/macosx/plugins/DFNet/English.lproj/InfoPlist.strings b/macosx/plugins/DFNet/English.lproj/InfoPlist.strings new file mode 100755 index 00000000..cf210c17 Binary files /dev/null and b/macosx/plugins/DFNet/English.lproj/InfoPlist.strings differ diff --git a/macosx/plugins/DFNet/English.lproj/Localizable.strings b/macosx/plugins/DFNet/English.lproj/Localizable.strings new file mode 100644 index 00000000..c42ce723 --- /dev/null +++ b/macosx/plugins/DFNet/English.lproj/Localizable.strings @@ -0,0 +1,11 @@ +/* + Localizable.strings + DFNet + + Created by C.W. Betts on 11/17/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"Error allocating memory!\n" = "Error allocating memory!\n"; +"error connecting to %s: %s\n" = "error connecting to %s: %s\n"; +"Socket Driver" = "Socket Driver"; diff --git a/macosx/plugins/DFNet/English.lproj/SockDialog.xib b/macosx/plugins/DFNet/English.lproj/SockDialog.xib new file mode 100644 index 00000000..d3d98dd5 --- /dev/null +++ b/macosx/plugins/DFNet/English.lproj/SockDialog.xib @@ -0,0 +1,283 @@ + + + + 1060 + 11C74 + 1938 + 1138.23 + 567.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + NSTextField + NSView + NSWindowTemplate + NSProgressIndicator + NSCustomObject + NSButtonCell + NSButton + NSTextFieldCell + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + SockDialog + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{196, 371}, {382, 139}} + 544735232 + Window + NSWindow + + + + + 256 + + + + 268 + {{17, 102}, {348, 17}} + + + YES + + 68288064 + 138413056 + Waiting for connections... + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 1292 + + {{104, 61}, {174, 20}} + + + 16394 + 100 + + + + 268 + {{143, 12}, {96, 32}} + + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 129 + + Gw + 200 + 25 + + + + {382, 139} + + + + {{0, 0}, {1680, 1028}} + {10000000000000, 10000000000000} + YES + + + + + + + window + + + + 9 + + + + cancel: + + + + 10 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + + + + + + 2 + + + + + + + + + + 3 + + + + + + + + 4 + + + + + 6 + + + + + 7 + + + + + + + + 8 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{322, 765}, {382, 139}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 10 + + + + + SockDialog + NSWindowController + + cancel: + id + + + cancel: + + cancel: + id + + + + IBProjectSource + ./Classes/SockDialog.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + YES + 3 + + diff --git a/macosx/plugins/DFNet/Info.plist b/macosx/plugins/DFNet/Info.plist new file mode 100644 index 00000000..8a57e31f --- /dev/null +++ b/macosx/plugins/DFNet/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + net.codeplex.pcsxr.DFNet + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + PsxP + CFBundleSignature + CdDI + CFBundleVersion + 1.0 + NSPrincipalClass + DFNetPlayPluginConfigController + + diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.h b/macosx/plugins/DFNet/macsrc/PluginConfigController.h new file mode 100644 index 00000000..f0986e76 --- /dev/null +++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.h @@ -0,0 +1,16 @@ +#define PluginConfigController DFNetPlayPluginConfigController + +#import + +@interface PluginConfigController : NSWindowController +{ + IBOutlet NSTextField *ipAddress; + IBOutlet NSTextField *portNum; + IBOutlet NSTextField *playerNum; +} +- (IBAction)cancel:(id)sender; +- (IBAction)ok:(id)sender; + +- (void)loadValues; + +@end diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m new file mode 100644 index 00000000..39ff984f --- /dev/null +++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2010, Wei Mingzhi . + * All Rights Reserved. + * + * Based on: Cdrom for Psemu Pro like Emulators + * By: linuzappz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#import "PluginConfigController.h" +#include "dfnet.h" + +#define kIPADDRKEY @"IP Address" +#define kIPPORT @"IP Port" +#define kPLAYERNUM @"Player Number" + +#define APP_ID @"net.codeplex.pcsxr.DFNet" +#define PrefsKey APP_ID @" Settings" + +static PluginConfigController *windowController; + +void AboutDlgProc() +{ + // Get parent application instance + NSApplication *app = [NSApplication sharedApplication]; + NSBundle *bundle = [NSBundle bundleWithIdentifier:APP_ID]; + + // Get Credits.rtf + NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; + NSAttributedString *credits; + if (path) { + credits = [[[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL] autorelease]; + } else { + credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + } + + // Get Application Icon + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[bundle bundlePath]]; + [icon setSize:NSMakeSize(64, 64)]; + + [app orderFrontStandardAboutPanelWithOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName", + icon, @"ApplicationIcon", + [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion", + [bundle objectForInfoDictionaryKey:@"CFBundleVersion"], @"Version", + [bundle objectForInfoDictionaryKey:@"NSHumanReadableCopyright"], @"Copyright", + credits, @"Credits", + nil]]; +} + +void ConfDlgProc() +{ + NSWindow *window; + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFNet"]; + } + window = [windowController window]; + + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; +} + +void ReadConfig() +{ + NSDictionary *keyValues; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + [defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: + [NSMutableDictionary dictionaryWithObjectsAndKeys: + @"127.0.0.1",kIPADDRKEY, + [NSNumber numberWithInt:33306], kIPPORT, + [NSNumber numberWithInt:1], kPLAYERNUM, + nil], PrefsKey, nil]]; + + keyValues = [defaults dictionaryForKey:PrefsKey]; + + conf.PortNum = [[keyValues objectForKey:kIPPORT] intValue]; + conf.PlayerNum = [[keyValues objectForKey:kPLAYERNUM] intValue]; + strcpy(conf.ipAddress, [[keyValues objectForKey:kIPADDRKEY] cString]); +} + +@implementation PluginConfigController + +- (IBAction)cancel:(id)sender +{ + [self close]; +} + +- (IBAction)ok:(id)sender +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + + NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:PrefsKey]]; + [writeDic setObject:[NSNumber numberWithInt:[portNum intValue]] forKey:kIPPORT]; + [writeDic setObject:[NSNumber numberWithInt:[playerNum intValue]] forKey:kPLAYERNUM]; + [writeDic setObject:[ipAddress stringValue] forKey:kIPADDRKEY]; + + // write to defaults + [defaults setObject:writeDic forKey:PrefsKey]; + [defaults synchronize]; + + // and set global values accordingly + ReadConfig(); + + [self close]; +} + +- (void)loadValues +{ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + ReadConfig(); + NSDictionary *keyValues = [defaults dictionaryForKey:PrefsKey]; + + [ipAddress setStringValue:[keyValues objectForKey:kIPADDRKEY]]; + [portNum setStringValue:[[keyValues objectForKey:kIPPORT] stringValue]]; + [playerNum setStringValue:[[keyValues objectForKey:kPLAYERNUM] stringValue]]; +} + +@end + +char* PLUGLOC(char *toloc) +{ + NSBundle *mainBundle = [NSBundle bundleForClass:[PluginConfigController class]]; + NSString *origString = nil, *transString = nil; + origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; + return [transString cStringUsingEncoding:NSUTF8StringEncoding]; +} + diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.h b/macosx/plugins/DFNet/macsrc/SockDialog.h new file mode 100644 index 00000000..2898ceec --- /dev/null +++ b/macosx/plugins/DFNet/macsrc/SockDialog.h @@ -0,0 +1,16 @@ +// +// SockDialog.h +// DFNet +// +// Created by C.W. Betts on 2/18/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + + +@interface SockDialog : NSWindowController { + +} +- (IBAction)cancel:(id)sender; +@end diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.m b/macosx/plugins/DFNet/macsrc/SockDialog.m new file mode 100644 index 00000000..e49ffc3d --- /dev/null +++ b/macosx/plugins/DFNet/macsrc/SockDialog.m @@ -0,0 +1,85 @@ +// +// SockDialog.m +// DFNet +// +// Created by C.W. Betts on 2/18/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "SockDialog.h" +#include "dfnet.h" + +void SysMessage(const char *fmt, ...) { + va_list list; + char msg[512]; + //char cmd[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + //sprintf(cmd, "message %s\n", msg); + NSString *errString = [NSString stringWithUTF8String:msg]; + fprintf(stderr, "%s", msg); + NSAlert *alert = [NSAlert alertWithMessageText:nil defaultButton:@"Exit" alternateButton:nil otherButton:nil informativeTextWithFormat:errString]; + [alert setAlertStyle:NSCriticalAlertStyle]; + //NSInteger result = NSRunAlertPanel(errString, nil, @"Okay", nil, nil); + NSInteger result = [alert runModal]; + if (result == NSAlertDefaultReturn) + { + //TODO: Handle closing the emulator, but not quitting the program. + } +} + + +static SockDialog *globalSock = nil; + +void sockCreateWaitDlg() { + if (globalSock == nil) { + globalSock = [[SockDialog alloc] init]; + } + [globalSock showWindow:nil]; + NSWindow *tempWindow = [globalSock window]; + [tempWindow center]; + [tempWindow makeKeyAndOrderFront:nil]; + +} + +void sockDlgUpdate() { + +} + +long sockOpen() +{ + return 0; +} + +void sockDestroyWaitDlg() { + if (globalSock != nil) { + [globalSock close]; + [globalSock release]; + globalSock = nil; + } +} + +@implementation SockDialog +- (IBAction)cancel:(id)sender { + WaitCancel = 1; + +} + +- (id)init { + if ((self = [super initWithWindowNibName:@"SockDialog"])) { + return self; + } else { + [self autorelease]; + return nil; + } +} + +-(void)dealloc { + + [super dealloc]; +} + +@end diff --git a/macosx/plugins/DFNet/macsrc/cfg.c b/macosx/plugins/DFNet/macsrc/cfg.c new file mode 100644 index 00000000..a61e6cd8 --- /dev/null +++ b/macosx/plugins/DFNet/macsrc/cfg.c @@ -0,0 +1,51 @@ +// +// DF Netplay Plugin +// +// Based on netSock 0.2 by linuzappz. +// The Plugin is free source code. +// + +#include +#include +#include + +#include "dfnet.h" + +#define CFG_FILENAME "dfnet.cfg" + +void AboutDlgProc(); +void ConfDlgProc(); + +void NETabout() { + AboutDlgProc(); +} + +long NETconfigure() { + ConfDlgProc(); + + return 0; +} + +void SaveConf() { + FILE *f; + + f = fopen(CFG_FILENAME, "w"); + if (f == NULL) return; + fwrite(&conf, 1, sizeof(conf), f); + fclose(f); +} + +void LoadConf() { + FILE *f; + + f = fopen(CFG_FILENAME, "r"); + if (f == NULL) { + conf.PlayerNum = 1; + conf.PortNum = 33306; + strcpy(conf.ipAddress, "127.0.0.1"); + return; + } + + fread(&conf, 1, sizeof(conf), f); + fclose(f); +} diff --git a/macosx/plugins/DFNet/version.plist b/macosx/plugins/DFNet/version.plist new file mode 100644 index 00000000..a9c51a62 --- /dev/null +++ b/macosx/plugins/DFNet/version.plist @@ -0,0 +1,16 @@ + + + + + BuildVersion + 38 + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + ProjectName + DFCdrom + SourceVersion + 2350000 + + -- cgit v1.2.3