| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 # A script to generate a windows installer for the editor bundle. | 7 # A script to generate a windows installer for the editor bundle. |
| 8 # As input the script takes a zip file, a version and the location | 8 # As input the script takes a zip file, a version and the location |
| 9 # to store the resulting msi file in. | 9 # to store the resulting msi file in. |
| 10 # | 10 # |
| 11 # Usage: ./tools/create_windows_installer.py --version <version> | 11 # Usage: ./tools/create_windows_installer.py --version <version> |
| 12 # --zip_file_location <zip_file> --msi_location <output> | 12 # --zip_file_location <zip_file> --msi_location <output> |
| 13 # [--wix_bin <wix_bin_location>] | 13 # [--wix_bin <wix_bin_location>] |
| 14 # [--print_wxs] | 14 # [--print_wxs] |
| 15 # | 15 # |
| 16 # This script assumes that wix is either in path or passed in as --wix_bin. | 16 # This script assumes that wix is either in path or passed in as --wix_bin. |
| 17 # You can get wix from http://wixtoolset.org/. | 17 # You can get wix from http://wixtoolset.org/. |
| 18 | 18 |
| 19 import optparse | 19 import optparse |
| 20 import os | 20 import os |
| 21 import shutil | |
| 22 import subprocess | 21 import subprocess |
| 23 import sys | 22 import sys |
| 24 import utils | 23 import utils |
| 25 import zipfile | 24 import zipfile |
| 26 | 25 |
| 27 # This should _never_ change, please don't change this value. | 26 # This should _never_ change, please don't change this value. |
| 28 UPGRADE_CODE = '7bacdc33-2e76-4f36-a206-ea58220c0b44' | 27 UPGRADE_CODE = '7bacdc33-2e76-4f36-a206-ea58220c0b44' |
| 29 | 28 |
| 30 # The content of the xml | 29 # The content of the xml |
| 31 xml_content = [] | 30 xml_content = [] |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 # We have only one feature and that consist of all the | 382 # We have only one feature and that consist of all the |
| 384 # files=components we have listed above" | 383 # files=components we have listed above" |
| 385 ComponentRefs() | 384 ComponentRefs() |
| 386 xml = GetContent() | 385 xml = GetContent() |
| 387 if options.print_wxs: | 386 if options.print_wxs: |
| 388 print xml | 387 print xml |
| 389 GenerateInstaller(xml, options, temp_dir) | 388 GenerateInstaller(xml, options, temp_dir) |
| 390 | 389 |
| 391 if __name__ == '__main__': | 390 if __name__ == '__main__': |
| 392 sys.exit(Main(sys.argv)) | 391 sys.exit(Main(sys.argv)) |
| OLD | NEW |