From ca2c327c74ae189e539929a07a619cd708ae7390 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 12 Mar 2017 22:53:10 -0400 Subject: [PATCH] Make xcodebuild the last build step This way, once we've built dupeGuru using "make" a first time, we can work on XCode stuff and build from XCode directly without having to go through the whole build again. --- build.py | 10 +++------- dupeGuru.xcodeproj/project.pbxproj | 4 ++++ hscommon | 2 +- run.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.py b/build.py index d9f774f..0f4d1ef 100644 --- a/build.py +++ b/build.py @@ -118,13 +118,7 @@ def build_cocoa(dev): os.symlink(op.dirname(sysconfig.get_config_h_filename()), 'build/PythonHeaders') build_help() - print_and_do('xcodebuild') - if op.exists('build/dupeGuru.app'): - shutil.rmtree('build/dupeGuru.app') - shutil.copytree('build/Release/dupeGuru.app', 'build/dupeGuru.app') - - app = cocoa_app() - pydep_folder = op.join(app.resources, 'py') + pydep_folder = op.join('build', 'py') if not op.exists(pydep_folder): os.mkdir(pydep_folder) shutil.copy(op.join(cocoa_project_path, 'dg_cocoa.py'), 'build') @@ -147,6 +141,8 @@ def build_cocoa(dev): delete_files_with_pattern(pydep_folder, '*.py') delete_files_with_pattern(pydep_folder, '__pycache__') + print_and_do('xcodebuild') + def build_help(): print("Generating Help") current_path = op.abspath('dupeguru') diff --git a/dupeGuru.xcodeproj/project.pbxproj b/dupeGuru.xcodeproj/project.pbxproj index 6d88de4..37111a9 100644 --- a/dupeGuru.xcodeproj/project.pbxproj +++ b/dupeGuru.xcodeproj/project.pbxproj @@ -84,6 +84,7 @@ CE97215D1E74E41D00A598C9 /* PyTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9721381E74E41D00A598C9 /* PyTextField.m */; }; CE97215E1E74E41D00A598C9 /* ResultWindow_UI.m in Sources */ = {isa = PBXBuildFile; fileRef = CE97213A1E74E41D00A598C9 /* ResultWindow_UI.m */; }; CE97215F1E74E41D00A598C9 /* XiblessSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = CE97213C1E74E41D00A598C9 /* XiblessSupport.m */; }; + CED88C1F1E763F2700C9B98C /* py in Resources */ = {isa = PBXBuildFile; fileRef = CED88C1E1E763F2700C9B98C /* py */; }; CEFC8A251E74F23000965F37 /* dg_cocoa.py in Resources */ = {isa = PBXBuildFile; fileRef = CEFC8A231E74F23000965F37 /* dg_cocoa.py */; }; CEFC8A261E74F23000965F37 /* dupeguru.icns in Resources */ = {isa = PBXBuildFile; fileRef = CEFC8A241E74F23000965F37 /* dupeguru.icns */; }; CEFC8A281E74F28100965F37 /* help in Resources */ = {isa = PBXBuildFile; fileRef = CEFC8A271E74F28100965F37 /* help */; }; @@ -316,6 +317,7 @@ CE97213B1E74E41D00A598C9 /* XiblessSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XiblessSupport.h; path = cocoa/autogen/XiblessSupport.h; sourceTree = ""; }; CE97213C1E74E41D00A598C9 /* XiblessSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XiblessSupport.m; path = cocoa/autogen/XiblessSupport.m; sourceTree = ""; }; CE9C2E9D1E74E1640099B9FB /* dupeGuru.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = dupeGuru.app; sourceTree = BUILT_PRODUCTS_DIR; }; + CED88C1E1E763F2700C9B98C /* py */ = {isa = PBXFileReference; lastKnownFileType = folder; name = py; path = build/py; sourceTree = ""; }; CEFC8A231E74F23000965F37 /* dg_cocoa.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = dg_cocoa.py; path = cocoa/dg_cocoa.py; sourceTree = ""; }; CEFC8A241E74F23000965F37 /* dupeguru.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = dupeguru.icns; path = cocoa/dupeguru.icns; sourceTree = ""; }; CEFC8A271E74F28100965F37 /* help */ = {isa = PBXFileReference; lastKnownFileType = folder; name = help; path = build/help; sourceTree = ""; }; @@ -568,6 +570,7 @@ CE7CA6011E76336000874874 /* cocoalib */, CEFC8A271E74F28100965F37 /* help */, CE0559911E7626E7008EB4F8 /* locale */, + CED88C1E1E763F2700C9B98C /* py */, CEFC8A231E74F23000965F37 /* dg_cocoa.py */, CEFC8A241E74F23000965F37 /* dupeguru.icns */, ); @@ -648,6 +651,7 @@ buildActionMask = 2147483647; files = ( CE0559921E7626E7008EB4F8 /* locale in Resources */, + CED88C1F1E763F2700C9B98C /* py in Resources */, CE05598E1E76217C008EB4F8 /* Localizable.strings in Resources */, CEFC8A251E74F23000965F37 /* dg_cocoa.py in Resources */, CE7CA6061E76337700874874 /* about.xib in Resources */, diff --git a/hscommon b/hscommon index 0370e47..04adb62 160000 --- a/hscommon +++ b/hscommon @@ -1 +1 @@ -Subproject commit 0370e471bf6d771173d40af2c21e64955106f277 +Subproject commit 04adb620fae86eb9ca5cd6aad2afc61e4186f386 diff --git a/run.py b/run.py index 6e52930..9b79ac1 100644 --- a/run.py +++ b/run.py @@ -4,7 +4,7 @@ import sys import os def main(): - return os.system('open "build/dupeGuru.app"') + return os.system('open "build/Release/dupeGuru.app"') if __name__ == '__main__': sys.exit(main()) \ No newline at end of file