diff --git a/README b/README index 34db6ff8..2f29003f 100644 --- a/README +++ b/README @@ -30,14 +30,13 @@ General dependencies - Mako, to generate help files. (http://www.makotemplates.org/) - PyYaml, for help files and the build system. (http://pyyaml.org/) - Nose, to run unit tests. (http://somethingaboutorange.com/mrl/projects/nose/) -- Python Imaging Library for dupeGuru PE. (http://www.pythonware.com/products/pil/) OS X prerequisites ----- - XCode 3.1 (http://developer.apple.com/TOOLS/xcode/) - Sparkle (http://sparkle.andymatuschak.org/) -- PyObjC. Although Tiger support has been dropped with dupeGuru 1.7, I still use PyObjC 1.4 because funky stuff happens with newer releases. However, it's mostly related to packaging with py2app. (http://pyobjc.sourceforge.net/) +- PyObjC 2.2. (http://pyobjc.sourceforge.net/) - py2app (http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html) Windows prerequisites @@ -45,6 +44,7 @@ Windows prerequisites - Visual Studio 2008 (Express is enough) is needed to build C extensions. (http://www.microsoft.com/Express/) - PyQt 4.6 (http://www.riverbankcomputing.co.uk/news) +- Python Imaging Library for dupeGuru PE. (http://www.pythonware.com/products/pil/) - PyInstaller, if you want to build a exe. You don't need it if you just want to run dupeGuru. (http://www.pyinstaller.org/) - Advanced Installer, if you want to build the installer file. (http://www.advancedinstaller.com/) @@ -55,7 +55,7 @@ First, make sure you meet the dependencies listed in the section above. Then you python configure.py -If you want, you can specify a UI to use with the `--ui` option. So, if you want to build dupeGuru with Qt on OS X, then you have to type `python configure.py --ui=qt`. You can also use the `--dev` flag to indicate a dev build (it will build `mg_cocoa.plugin` in alias mode). +If you want, you can specify a UI to use with the `--ui` option. So, if you want to build dupeGuru with Qt on OS X, then you have to type `python configure.py --ui=qt`. You can also use the `--dev` flag to indicate a dev build (it will build `dg_cocoa.plugin` in alias mode and use the "dev" config in XCode). Then, just build the thing and then run it with: @@ -65,3 +65,8 @@ Then, just build the thing and then run it with: If you want to create ready-to-upload package, run: python package.py + +64-bit on OS X +--- + +The "release" configuration of dupeGuru's XCode project build with archs "i386 x86_64 ppc". However there are currently problems with py2app and 64 bit. If you want to correctly build 64-bit apps, refer to http://www.hardcoded.net/articles/building-64-bit-pyobjc-applications-with-py2app.htm . \ No newline at end of file diff --git a/build.py b/build.py index bd5c3593..f26f8bb0 100644 --- a/build.py +++ b/build.py @@ -23,10 +23,7 @@ def main(): edition = conf['edition'] ui = conf['ui'] dev = conf['dev'] - build64 = conf['build64'] print "Building dupeGuru {0} with UI {1}".format(edition.upper(), ui) - if build64: - print "If possible, 64-bit builds will be made" if dev: print "Building in Dev mode" add_to_pythonpath('.') @@ -82,8 +79,10 @@ def main(): os.chdir(cocoa_project_path) print "Building the XCode project" args = [] - if build64: - args.append('ARCHS="x86_64 i386 ppc"') + if dev: + args.append('-configuration dev') + else: + args.append('-configuration release') args = ' '.join(args) os.system('xcodebuild {0}'.format(args)) os.chdir('..') diff --git a/cocoa/me/dupeguru.xcodeproj/project.pbxproj b/cocoa/me/dupeguru.xcodeproj/project.pbxproj index a1d67781..d8f12d2d 100644 --- a/cocoa/me/dupeguru.xcodeproj/project.pbxproj +++ b/cocoa/me/dupeguru.xcodeproj/project.pbxproj @@ -423,7 +423,7 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - C01FCF4C08A954540054247B /* Release */ = { + C01FCF4C08A954540054247B /* release */ = { isa = XCBuildConfiguration; buildSettings = { GCC_GENERATE_DEBUGGING_SYMBOLS = NO; @@ -433,21 +433,47 @@ PRODUCT_NAME = "dupeGuru ME"; WRAPPER_EXTENSION = app; }; - name = Release; + name = release; }; - C01FCF5008A954540054247B /* Release */ = { + C01FCF5008A954540054247B /* release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64; + ARCHS = ( + i386, + x86_64, + ppc, + ); GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.5; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; }; - name = Release; + name = release; + }; + CED596C5111AF56D00C0CF2B /* dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + }; + name = dev; + }; + CED596C6111AF56D00C0CF2B /* dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = "dupeGuru ME"; + WRAPPER_EXTENSION = app; + }; + name = dev; }; /* End XCBuildConfiguration section */ @@ -455,18 +481,20 @@ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dupeguru" */ = { isa = XCConfigurationList; buildConfigurations = ( - C01FCF4C08A954540054247B /* Release */, + C01FCF4C08A954540054247B /* release */, + CED596C6111AF56D00C0CF2B /* dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "dupeguru" */ = { isa = XCConfigurationList; buildConfigurations = ( - C01FCF5008A954540054247B /* Release */, + C01FCF5008A954540054247B /* release */, + CED596C5111AF56D00C0CF2B /* dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = release; }; /* End XCConfigurationList section */ }; diff --git a/cocoa/pe/dupeguru.xcodeproj/project.pbxproj b/cocoa/pe/dupeguru.xcodeproj/project.pbxproj index 9d12a722..eb852907 100644 --- a/cocoa/pe/dupeguru.xcodeproj/project.pbxproj +++ b/cocoa/pe/dupeguru.xcodeproj/project.pbxproj @@ -426,7 +426,7 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - C01FCF4C08A954540054247B /* Release */ = { + C01FCF4C08A954540054247B /* release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( @@ -444,20 +444,55 @@ PRODUCT_NAME = "dupeGuru PE"; WRAPPER_EXTENSION = app; }; - name = Release; + name = release; }; - C01FCF5008A954540054247B /* Release */ = { + C01FCF5008A954540054247B /* release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; + ARCHS = ( + i386, + x86_64, + ppc, + ); GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.5; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; }; - name = Release; + name = release; + }; + CEE00FF0111AF37400BC1A77 /* dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + }; + name = dev; + }; + CEE00FF1111AF37400BC1A77 /* dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + FRAMEWORK_SEARCH_PATHS = ( + "$(FRAMEWORK_SEARCH_PATHS)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = "dupeGuru PE"; + WRAPPER_EXTENSION = app; + }; + name = dev; }; /* End XCBuildConfiguration section */ @@ -465,18 +500,20 @@ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dupeguru" */ = { isa = XCConfigurationList; buildConfigurations = ( - C01FCF4C08A954540054247B /* Release */, + C01FCF4C08A954540054247B /* release */, + CEE00FF1111AF37400BC1A77 /* dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "dupeguru" */ = { isa = XCConfigurationList; buildConfigurations = ( - C01FCF5008A954540054247B /* Release */, + C01FCF5008A954540054247B /* release */, + CEE00FF0111AF37400BC1A77 /* dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = release; }; /* End XCConfigurationList section */ }; diff --git a/cocoa/se/dupeguru.xcodeproj/project.pbxproj b/cocoa/se/dupeguru.xcodeproj/project.pbxproj index fdaad559..9b49f2e2 100644 --- a/cocoa/se/dupeguru.xcodeproj/project.pbxproj +++ b/cocoa/se/dupeguru.xcodeproj/project.pbxproj @@ -403,7 +403,7 @@ /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ - C01FCF4C08A954540054247B /* Release */ = { + C01FCF4C08A954540054247B /* release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = ( @@ -418,20 +418,52 @@ PRODUCT_NAME = dupeGuru; WRAPPER_EXTENSION = app; }; - name = Release; + name = release; }; - C01FCF5008A954540054247B /* Release */ = { + C01FCF5008A954540054247B /* release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; + ARCHS = ( + i386, + x86_64, + ppc, + ); GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.5; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; }; - name = Release; + name = release; + }; + CE85E84F111AF63D00187B0D /* dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; + }; + name = dev; + }; + CE85E850111AF63D00187B0D /* dev */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../base/cocoa/build/Release\""; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = dupeGuru; + WRAPPER_EXTENSION = app; + }; + name = dev; }; /* End XCBuildConfiguration section */ @@ -439,18 +471,20 @@ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dupeguru" */ = { isa = XCConfigurationList; buildConfigurations = ( - C01FCF4C08A954540054247B /* Release */, + C01FCF4C08A954540054247B /* release */, + CE85E850111AF63D00187B0D /* dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "dupeguru" */ = { isa = XCConfigurationList; buildConfigurations = ( - C01FCF5008A954540054247B /* Release */, + C01FCF5008A954540054247B /* release */, + CE85E84F111AF63D00187B0D /* dev */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = release; }; /* End XCConfigurationList section */ }; diff --git a/configure.py b/configure.py index 99324873..1ecc4704 100644 --- a/configure.py +++ b/configure.py @@ -12,20 +12,17 @@ from optparse import OptionParser import yaml -def main(edition, ui, dev, build64): +def main(edition, ui, dev): if edition not in ('se', 'me', 'pe'): edition = 'se' if ui not in ('cocoa', 'qt'): ui = 'cocoa' if sys.platform == 'darwin' else 'qt' build_type = 'Dev' if dev else 'Release' print "Configuring dupeGuru {0} for UI {1} ({2})".format(edition.upper(), ui, build_type) - if build64: - print "If possible, 64-bit builds will be made" conf = { 'edition': edition, 'ui': ui, 'dev': dev, - 'build64': build64, } yaml.dump(conf, open('conf.yaml', 'w')) @@ -38,7 +35,5 @@ if __name__ == '__main__': help="Type of UI to build. 'qt' or 'cocoa'. Default is determined by your system.") parser.add_option('--dev', action='store_true', dest='dev', default=False, help="If this flag is set, will configure for dev builds.") - parser.add_option('--64bit', action='store_true', dest='build64', default=False, - help="Build 64-bit app if possible.") (options, args) = parser.parse_args() - main(options.edition, options.ui, options.dev, options.build64) + main(options.edition, options.ui, options.dev) diff --git a/run.py b/run.py index 148138c0..09a1350e 100644 --- a/run.py +++ b/run.py @@ -19,13 +19,15 @@ def main(): conf = yaml.load(open('conf.yaml')) edition = conf['edition'] ui = conf['ui'] + dev = conf['dev'] print "Running dupeGuru {0} with UI {1}".format(edition.upper(), ui) if ui == 'cocoa': + subfolder = 'dev' if dev else 'release' app_path = { - 'se': 'cocoa/se/build/Release/dupeGuru.app', - 'me': 'cocoa/me/build/Release/dupeGuru\\ ME.app', - 'pe': 'cocoa/pe/build/Release/dupeGuru\\ PE.app', - }[edition] + 'se': 'cocoa/se/build/{0}/dupeGuru.app', + 'me': 'cocoa/me/build/{0}/dupeGuru\\ ME.app', + 'pe': 'cocoa/pe/build/{0}/dupeGuru\\ PE.app', + }[edition].format(subfolder) os.system('open {0}'.format(app_path)) elif ui == 'qt': add_to_pythonpath('.')