Add script for building external plugins for packaging

Also turn off PCH for building Qt Creator and add some more options for
local testing.

Change-Id: Ic05099ef1dd8e8c78b174d7cd07a83b2f4a9cbb5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Eike Ziller
2020-02-19 17:01:41 +01:00
parent 794f3a5f55
commit 05f746cfd0
2 changed files with 155 additions and 20 deletions
+25 -20
View File
@@ -83,6 +83,10 @@ def get_arguments():
action='store_true', default=(not common.is_windows_platform()))
parser.add_argument('--no-docs', help='Skip documentation generation',
action='store_true', default=False)
parser.add_argument('--no-dmg', help='Skip disk image creation (macOS)',
action='store_true', default=False)
parser.add_argument('--no-zip', help='Skip creation of 7zip files for install and developer package',
action='store_true', default=False)
return parser.parse_args()
def build_qtcreator(args, paths):
@@ -124,8 +128,7 @@ def build_qtcreator(args, paths):
'-DPYTHON_INCLUDE_DIR=' + os.path.join(args.python_path, 'include')]
# TODO this works around a CMake bug https://gitlab.kitware.com/cmake/cmake/issues/20119
if common.is_linux_platform():
cmake_args += ['-DBUILD_WITH_PCH=OFF']
cmake_args += ['-DBUILD_WITH_PCH=OFF']
ide_revision = common.get_commit_SHA(paths.src)
if ide_revision:
@@ -191,30 +194,32 @@ def deploy_qt(args, paths):
paths.build)
def package_qtcreator(args, paths):
common.check_print_call(['7z', 'a', '-mmt2', os.path.join(paths.result, 'qtcreator.7z'), '*'],
paths.install)
common.check_print_call(['7z', 'a', '-mmt2',
os.path.join(paths.result, 'qtcreator_dev.7z'), '*'],
paths.dev_install)
if common.is_windows_platform():
if not args.no_zip:
common.check_print_call(['7z', 'a', '-mmt2', os.path.join(paths.result, 'qtcreator.7z'), '*'],
paths.install)
common.check_print_call(['7z', 'a', '-mmt2',
os.path.join(paths.result, 'wininterrupt.7z'), '*'],
paths.wininterrupt_install)
if not args.no_cdb:
os.path.join(paths.result, 'qtcreator_dev.7z'), '*'],
paths.dev_install)
if common.is_windows_platform():
common.check_print_call(['7z', 'a', '-mmt2',
os.path.join(paths.result, 'qtcreatorcdbext.7z'), '*'],
paths.qtcreatorcdbext_install)
os.path.join(paths.result, 'wininterrupt.7z'), '*'],
paths.wininterrupt_install)
if not args.no_cdb:
common.check_print_call(['7z', 'a', '-mmt2',
os.path.join(paths.result, 'qtcreatorcdbext.7z'), '*'],
paths.qtcreatorcdbext_install)
if common.is_mac_platform():
if args.keychain_unlock_script:
common.check_print_call([args.keychain_unlock_script], paths.install)
common.check_print_call(['python', '-u',
os.path.join(paths.src, 'scripts', 'makedmg.py'),
'qt-creator.dmg',
'Qt Creator',
paths.src,
paths.install],
paths.result)
if not args.no_dmg:
common.check_print_call(['python', '-u',
os.path.join(paths.src, 'scripts', 'makedmg.py'),
'qt-creator.dmg',
'Qt Creator',
paths.src,
paths.install],
paths.result)
def get_paths(args):
Paths = collections.namedtuple('Paths',