diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-04 03:07:44 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-04 03:07:44 +0000 |
| commit | dd7da2fae96b9ba6bdbc28f7b26469373801f21e (patch) | |
| tree | 9faf6aa7f2fa2900dcabc3d88d11e87285693e9b /macosx/plugins/DFNet | |
| parent | a012af37d7bd3a972d2b3fbb7ed09bc8662e91eb (diff) | |
| download | pcsxr-dd7da2fae96b9ba6bdbc28f7b26469373801f21e.tar.gz | |
Make the plug-ins use ARC in 64-bit mode.
Change how the preprocessor macros are managed on OS X.
Set the name of the product to the target name.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85795 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFNet')
| -rwxr-xr-x | macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj | 26 | ||||
| -rw-r--r-- | macosx/plugins/DFNet/macsrc/ARCBridge.h | 36 | ||||
| -rwxr-xr-x | macosx/plugins/DFNet/macsrc/PluginConfigController.m | 8 | ||||
| -rwxr-xr-x | macosx/plugins/DFNet/macsrc/SockDialog.m | 6 |
4 files changed, 66 insertions, 10 deletions
diff --git a/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj b/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj index d5d6b8e3..3e0d4984 100755 --- a/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj +++ b/macosx/plugins/DFNet/DFNet.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 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 */; }; + 558600731785139C00CB3D85 /* ARCBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 558600721785139C00CB3D85 /* ARCBridge.h */; }; 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 */; }; @@ -33,6 +34,7 @@ 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 = "<group>"; }; + 558600721785139C00CB3D85 /* ARCBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCBridge.h; sourceTree = "<group>"; }; 559DACB2146C64B800C5DF71 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = plugins/DFNet/English.lproj/DFNet.xib; sourceTree = "<group>"; }; 559DACB7146C64D600C5DF71 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = plugins/DFNet/English.lproj/SockDialog.xib; sourceTree = "<group>"; }; 55F79D6D1475B252007C856E /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; }; @@ -122,6 +124,7 @@ 71F3C32111F3CCEF007B9F12 /* macsrc */ = { isa = PBXGroup; children = ( + 558600721785139C00CB3D85 /* ARCBridge.h */, 55278DC112C8141600288CD8 /* cfg.c */, 71F3C32611F3CD0B007B9F12 /* PluginConfigController.h */, 71F3C32711F3CD0B007B9F12 /* PluginConfigController.m */, @@ -141,6 +144,7 @@ 71F3C32A11F3CD0B007B9F12 /* PluginConfigController.h in Headers */, 55278DBE12C813AC00288CD8 /* dfnet.h in Headers */, 551ED70C130F209C00D19D11 /* SockDialog.h in Headers */, + 558600731785139C00CB3D85 /* ARCBridge.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -291,13 +295,13 @@ GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREPROCESSOR_DEFINITIONS = ( "PCSXRPLUG=DFNet", - "_MACOSX=1", + "$(inherited)", ); GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; GCC_WARN_UNKNOWN_PRAGMAS = NO; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; - PRODUCT_NAME = DFNet; + PRODUCT_NAME = "$(TARGET_NAME)"; SYMROOT = ../../build; WRAPPER_EXTENSION = psxplugin; }; @@ -314,13 +318,13 @@ GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREPROCESSOR_DEFINITIONS = ( "PCSXRPLUG=DFNet", - "_MACOSX=1", + "$(inherited)", ); GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO; GCC_WARN_UNKNOWN_PRAGMAS = NO; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; - PRODUCT_NAME = DFNet; + PRODUCT_NAME = "$(TARGET_NAME)"; SYMROOT = ../../build; WRAPPER_EXTENSION = psxplugin; }; @@ -330,8 +334,13 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES; + DEBUG_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_MACOSX=1", + "$(DEBUG_PREPROCESSOR_DEFINITIONS)", + ); HEADER_SEARCH_PATHS = ( ../../../libpcsxcore, ../.., @@ -349,7 +358,12 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_PREPROCESSOR_DEFINITIONS = "_MACOSX=1"; + "CLANG_ENABLE_OBJC_ARC[arch=x86_64]" = YES; + DEBUG_PREPROCESSOR_DEFINITIONS = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "_MACOSX=1", + "$(DEBUG_PREPROCESSOR_DEFINITIONS)", + ); HEADER_SEARCH_PATHS = ( ../../../libpcsxcore, ../.., diff --git a/macosx/plugins/DFNet/macsrc/ARCBridge.h b/macosx/plugins/DFNet/macsrc/ARCBridge.h new file mode 100644 index 00000000..ea274b84 --- /dev/null +++ b/macosx/plugins/DFNet/macsrc/ARCBridge.h @@ -0,0 +1,36 @@ +// +// ARCBridge.h +// PPMacho +// +// Created by C.W. Betts on 12/23/12. +// +// + +#ifndef PPMacho_ARCBridge_h +#define PPMacho_ARCBridge_h + +#if __has_feature(objc_arc) + +#define SUPERDEALLOC +#define RELEASEOBJ(obj) +#define RETAINOBJ(obj) obj +#define RETAINOBJNORETURN(obj) +#define AUTORELEASEOBJ(obj) obj +#define AUTORELEASEOBJNORETURN(obj) +#define BRIDGE(toType, obj) (__bridge toType)(obj) +#define __arcweak __weak + +#else + +#define SUPERDEALLOC [super dealloc] +#define RELEASEOBJ(obj) [obj release] +#define RETAINOBJ(obj) [obj retain] +#define RETAINOBJNORETURN(obj) [obj retain] +#define AUTORELEASEOBJ(obj) [obj autorelease] +#define AUTORELEASEOBJNORETURN(obj) [obj autorelease] +#define BRIDGE(toType, obj) (toType)obj +#define __arcweak + +#endif + +#endif diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m index 063e83e6..ddd3e8c7 100755 --- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m @@ -21,6 +21,7 @@ #import "PluginConfigController.h" #include "dfnet.h" +#import "ARCBridge.h" NSString * const kIPADDRKEY = @"IP Address"; NSString * const kIPPORT = @"IP Port"; @@ -41,10 +42,11 @@ void AboutDlgProc() NSString *path = [bundle pathForResource:@"Credits" ofType:@"rtf"]; NSAttributedString *credits; if (path) { - credits = [[[NSAttributedString alloc] initWithPath: path - documentAttributes:NULL] autorelease]; + credits = [[NSAttributedString alloc] initWithPath: path + documentAttributes:NULL]; + AUTORELEASEOBJNORETURN(credits); } else { - credits = [[[NSAttributedString alloc] initWithString:@""] autorelease]; + credits = AUTORELEASEOBJ([[NSAttributedString alloc] initWithString:@""]); } // Get Application Icon diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.m b/macosx/plugins/DFNet/macsrc/SockDialog.m index feee77d8..f175e7fa 100755 --- a/macosx/plugins/DFNet/macsrc/SockDialog.m +++ b/macosx/plugins/DFNet/macsrc/SockDialog.m @@ -10,6 +10,7 @@ #include "dfnet.h" #import "EmuThread.h" +#import "ARCBridge.h" void SysMessage(const char *fmt, ...) { @@ -72,7 +73,8 @@ void sockDestroyWaitDlg() dispatch_sync(dispatch_get_main_queue(), ^{ if (globalSock != nil) { [globalSock close]; - [globalSock release]; + + RELEASEOBJ(globalSock); globalSock = nil; } }); @@ -92,10 +94,12 @@ void sockDestroyWaitDlg() return self; } +#if !__has_feature(objc_arc) -(void)dealloc { [super dealloc]; } +#endif @end |
