Straightened out qt's build process.

This commit is contained in:
Virgil Dupras 2010-02-09 15:32:52 +01:00
parent 5db0f09b43
commit 7c9e836572
4 changed files with 58 additions and 90 deletions

View File

@ -18,30 +18,7 @@ import yaml
from hsdocgen import generate_help, filters
from hsutil.build import add_to_pythonpath, print_and_do, build_all_qt_ui, copy_packages
def main():
conf = yaml.load(open('conf.yaml'))
edition = conf['edition']
ui = conf['ui']
dev = conf['dev']
print "Building dupeGuru {0} with UI {1}".format(edition.upper(), ui)
if dev:
print "Building in Dev mode"
add_to_pythonpath('.')
print "Generating Help"
windows = sys.platform == 'win32'
tix = filters.tixgen("https://hardcoded.lighthouseapp.com/projects/31699-dupeguru/tickets/{0}")
help_dir = 'help_{0}'.format(edition)
dest_dir = 'dupeguru_{0}_help'.format(edition) if edition != 'se' else 'dupeguru_help'
help_basepath = op.abspath(help_dir)
help_destpath = op.abspath(op.join(help_dir, dest_dir))
generate_help.main(help_basepath, help_destpath, force_render=not dev, tix=tix, windows=windows)
print "Building dupeGuru"
if edition == 'pe':
os.chdir('core_pe')
os.system('python gen.py')
os.chdir('..')
if ui == 'cocoa':
def build_cocoa(edition, dev):
if not dev:
print "Building help index"
os.system('open -a /Developer/Applications/Utilities/Help\\ Indexer.app {0}'.format(help_destpath))
@ -86,10 +63,44 @@ def main():
args = ' '.join(args)
os.system('xcodebuild {0}'.format(args))
os.chdir('..')
elif ui == 'qt':
def build_qt(edition, dev):
build_all_qt_ui(op.join('qtlib', 'ui'))
build_all_qt_ui(op.join('qt', 'base'))
build_all_qt_ui(op.join('qt', edition))
print_and_do("pyrcc4 {0} > {1}".format(op.join('qt', 'base', 'dg.qrc'), op.join('qt', 'base', 'dg_rc.py')))
if edition == 'pe':
os.chdir(op.join('qt', edition))
os.system('python gen.py')
os.chdir(op.join('..', '..'))
def main():
conf = yaml.load(open('conf.yaml'))
edition = conf['edition']
ui = conf['ui']
dev = conf['dev']
print "Building dupeGuru {0} with UI {1}".format(edition.upper(), ui)
if dev:
print "Building in Dev mode"
add_to_pythonpath('.')
print "Generating Help"
windows = sys.platform == 'win32'
tix = filters.tixgen("https://hardcoded.lighthouseapp.com/projects/31699-dupeguru/tickets/{0}")
help_dir = 'help_{0}'.format(edition)
dest_dir = 'dupeguru_{0}_help'.format(edition) if edition != 'se' else 'dupeguru_help'
help_basepath = op.abspath(help_dir)
help_destpath = op.abspath(op.join(help_dir, dest_dir))
generate_help.main(help_basepath, help_destpath, force_render=not dev, tix=tix, windows=windows)
print "Building dupeGuru"
if edition == 'pe':
os.chdir('core_pe')
os.system('python gen.py')
os.chdir('..')
if ui == 'cocoa':
build_cocoa(edition, dev)
elif ui == 'qt':
build_qt(edition, dev)
if __name__ == '__main__':
main()

View File

@ -1,18 +0,0 @@
#!/usr/bin/env python
# Created By: Virgil Dupras
# Created On: 2009-05-22
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "HS" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/hs_license
import os
import os.path as op
from hsutil.build import print_and_do, build_all_qt_ui
build_all_qt_ui(op.join('..', '..', 'qtlib', 'ui'))
build_all_qt_ui(op.join('..', 'base'))
build_all_qt_ui('.')
print_and_do("pyrcc4 {0} > {1}".format(op.join('..', 'base', 'dg.qrc'), op.join('..', 'base', 'dg_rc.py')))

View File

@ -10,13 +10,6 @@
import os
import os.path as op
from hsutil.build import print_and_do, build_all_qt_ui
build_all_qt_ui(op.join('..', '..', 'qtlib', 'ui'))
build_all_qt_ui(op.join('..', 'base'))
build_all_qt_ui('.')
print_and_do("pyrcc4 {0} > {1}".format(op.join('..', 'base', 'dg.qrc'), op.join('..', 'base', 'dg_rc.py')))
def move(src, dst):
if not op.exists(src):
return

View File

@ -1,18 +0,0 @@
#!/usr/bin/env python
# Created By: Virgil Dupras
# Created On: 2009-05-24
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "HS" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/hs_license
import os
import os.path as op
from hsutil.build import print_and_do, build_all_qt_ui
build_all_qt_ui(op.join('..', '..', 'qtlib', 'ui'))
build_all_qt_ui(op.join('..', 'base'))
build_all_qt_ui('.')
print_and_do("pyrcc4 {0} > {1}".format(op.join('..', 'base', 'dg.qrc'), op.join('..', 'base', 'dg_rc.py')))