Clean up freeze.py.

This commit is contained in:
Florian Bruhin 2015-09-18 22:33:50 +02:00
parent 7d6c39d64b
commit 957116658d

View File

@ -85,23 +85,6 @@ def get_build_exe_options(skip_html=False):
}
bdist_msi_options = {
# random GUID generated by uuid.uuid4()
'upgrade_code': '{a7119e75-4eb7-466c-ae0d-3c0eccb45196}',
'add_to_path': False,
}
bdist_dmg_options = {
'applications_shortcut': True,
}
bdist_mac_options = {
'qt_menu_nib': os.path.join(BASEDIR, 'misc', 'qt_menu.nib'),
'iconfile': os.path.join(BASEDIR, 'icons', 'qutebrowser.icns'),
'bundle_name': 'qutebrowser',
}
def get_exe(base, target_name):
return cx.Executable('qutebrowser/__main__.py', base=base,
targetName=target_name, shortcutName='qutebrowser',
@ -110,7 +93,7 @@ def get_exe(base, target_name):
'qutebrowser.ico'))
if __name__ == '__main__':
def main():
if sys.platform.startswith('win'):
base = 'Win32GUI'
target_name = 'qutebrowser.exe'
@ -118,6 +101,22 @@ if __name__ == '__main__':
base = None
target_name = 'qutebrowser'
bdist_msi_options = {
# random GUID generated by uuid.uuid4()
'upgrade_code': '{a7119e75-4eb7-466c-ae0d-3c0eccb45196}',
'add_to_path': False,
}
bdist_dmg_options = {
'applications_shortcut': True,
}
bdist_mac_options = {
'qt_menu_nib': os.path.join(BASEDIR, 'misc', 'qt_menu.nib'),
'iconfile': os.path.join(BASEDIR, 'icons', 'qutebrowser.icns'),
'bundle_name': 'qutebrowser',
}
try:
setupcommon.write_git_file()
cx.setup(
@ -134,3 +133,7 @@ if __name__ == '__main__':
path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id')
if os.path.exists(path):
os.remove(path)
if __name__ == '__main__':
main()