1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2024-10-18 08:43:08 +00:00
dupeguru/package.py
hsoft 70af8541da Fixed packaging, which didn't work on windows.
--HG--
extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40286
2009-12-30 16:52:46 +00:00

46 lines
1.3 KiB
Python

# -*- coding: utf-8 -*-
# Created By: Virgil Dupras
# Created On: 2009-12-30
# $Id$
# Copyright 2009 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 sys
import os
import os.path as op
import yaml
from hsutil.build import build_dmg, add_to_pythonpath
def main():
conf = yaml.load(open('conf.yaml'))
edition = conf['edition']
ui = conf['ui']
dev = conf['dev']
if dev:
print "You can't package in dev mode"
return
print "Packaging dupeGuru {0} with UI {1}".format(edition.upper(), ui)
if ui == 'cocoa':
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]
build_dmg(app_path, '.')
elif ui == 'qt':
if sys.platform != "win32":
print "Qt packaging only works under Windows."
return
add_to_pythonpath('.')
add_to_pythonpath('qt')
os.chdir(op.join('qt', edition))
os.system('python build.py')
os.chdir(op.join('..', '..'))
if __name__ == '__main__':
main()