From 957116658dbe66171bc78b6eb0caa80a900e782d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 18 Sep 2015 22:33:50 +0200 Subject: [PATCH] Clean up freeze.py. --- scripts/dev/freeze.py | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/scripts/dev/freeze.py b/scripts/dev/freeze.py index b04d951e7..cad260092 100755 --- a/scripts/dev/freeze.py +++ b/scripts/dev/freeze.py @@ -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()