mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Added support for 64 bit in the build script.
This commit is contained in:
parent
9b870ad863
commit
812b914b70
9
build.py
9
build.py
@ -23,7 +23,10 @@ def main():
|
|||||||
edition = conf['edition']
|
edition = conf['edition']
|
||||||
ui = conf['ui']
|
ui = conf['ui']
|
||||||
dev = conf['dev']
|
dev = conf['dev']
|
||||||
|
build64 = conf['build64']
|
||||||
print "Building dupeGuru {0} with UI {1}".format(edition.upper(), ui)
|
print "Building dupeGuru {0} with UI {1}".format(edition.upper(), ui)
|
||||||
|
if build64:
|
||||||
|
print "If possible, 64-bit builds will be made"
|
||||||
if dev:
|
if dev:
|
||||||
print "Building in Dev mode"
|
print "Building in Dev mode"
|
||||||
add_to_pythonpath('.')
|
add_to_pythonpath('.')
|
||||||
@ -78,7 +81,11 @@ def main():
|
|||||||
open(pthpath, 'w').write(op.abspath('.'))
|
open(pthpath, 'w').write(op.abspath('.'))
|
||||||
os.chdir(cocoa_project_path)
|
os.chdir(cocoa_project_path)
|
||||||
print "Building the XCode project"
|
print "Building the XCode project"
|
||||||
os.system('xcodebuild')
|
args = []
|
||||||
|
if build64:
|
||||||
|
args.append('ARCHS="x86_64 i386 ppc"')
|
||||||
|
args = ' '.join(args)
|
||||||
|
os.system('xcodebuild {0}'.format(args))
|
||||||
os.chdir('..')
|
os.chdir('..')
|
||||||
elif ui == 'qt':
|
elif ui == 'qt':
|
||||||
os.chdir(op.join('qt', edition))
|
os.chdir(op.join('qt', edition))
|
||||||
|
@ -12,17 +12,20 @@ from optparse import OptionParser
|
|||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
def main(edition, ui, dev):
|
def main(edition, ui, dev, build64):
|
||||||
if edition not in ('se', 'me', 'pe'):
|
if edition not in ('se', 'me', 'pe'):
|
||||||
edition = 'se'
|
edition = 'se'
|
||||||
if ui not in ('cocoa', 'qt'):
|
if ui not in ('cocoa', 'qt'):
|
||||||
ui = 'cocoa' if sys.platform == 'darwin' else 'qt'
|
ui = 'cocoa' if sys.platform == 'darwin' else 'qt'
|
||||||
build_type = 'Dev' if dev else 'Release'
|
build_type = 'Dev' if dev else 'Release'
|
||||||
print "Configuring dupeGuru {0} for UI {1} ({2})".format(edition.upper(), ui, build_type)
|
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 = {
|
conf = {
|
||||||
'edition': edition,
|
'edition': edition,
|
||||||
'ui': ui,
|
'ui': ui,
|
||||||
'dev': dev,
|
'dev': dev,
|
||||||
|
'build64': build64,
|
||||||
}
|
}
|
||||||
yaml.dump(conf, open('conf.yaml', 'w'))
|
yaml.dump(conf, open('conf.yaml', 'w'))
|
||||||
|
|
||||||
@ -35,5 +38,7 @@ if __name__ == '__main__':
|
|||||||
help="Type of UI to build. 'qt' or 'cocoa'. Default is determined by your system.")
|
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,
|
parser.add_option('--dev', action='store_true', dest='dev', default=False,
|
||||||
help="If this flag is set, will configure for dev builds.")
|
help="If this flag is set, will configure for dev builds.")
|
||||||
|
parser.add_option('--64bit', action='store_false', dest='build64', default=False,
|
||||||
|
help="Build 64-bit app if possible.")
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
main(options.edition, options.ui, options.dev)
|
main(options.edition, options.ui, options.dev, options.build64)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user