Commit 890befc6 authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

script: add ReleaseCompile config

Change-Id: I7ee6149ddff9e33808d2a7958f0fb8ebd2affde4
parent 4a7643fa
......@@ -20,9 +20,9 @@ win32-msvc {
DEFINES += UNICODE PROCESS_DPI_AWARE=1 QT_NO_DEBUG NDEBUG
# dependencies
LRC=../lrc
DRING=../daemon
QRENCODE=../client-windows/qrencode-win32/qrencode-win32
LRC= ../lrc
DRING= ../daemon
QRENCODE= qrencode-win32/qrencode-win32
# client deps
INCLUDEPATH += $${QRENCODE}
......@@ -47,6 +47,14 @@ win32-msvc {
RCC_DIR = obj/.rcc
UI_DIR = obj/.ui
# ReleaseCompile config
contains(CONFIG, ReleaseCompile) {
CONFIG(ReleaseCompile) {
message(ReleaseCompile config enabled)
Release: DEFINES += COMPILE_ONLY
}
}
# beta config
contains(CONFIG, Beta) {
CONFIG(Beta) {
......
......@@ -131,16 +131,26 @@ def deps(arch, toolset):
build(arch, '', '', 'Release-Lib', '\\qrencode-win32\\qrencode-win32\\vc8\\qrcodelib\\qrcodelib.vcxproj', '', False)
def build(arch, toolset, sdk_version, config_str, project_path_under_current_path, qtver, force_option=True):
configuration_type = 'StaticLibrary'
if (config_str == 'Release'):
print('Generating project using qmake ' + config_str + '|' + arch)
execute_cmd("C:\\Qt\\" + qtver + "\\msvc2017_64\\bin\\qmake.exe " + "-tp vc jami-qt.pro -o jami-qt.vcxproj")
configuration_type = 'Application'
elif (config_str == 'Beta'):
print('Generating project using qmake ' + config_str + '|' + arch)
execute_cmd("C:\\Qt\\" + qtver + "\\msvc2017_64\\bin\\qmake.exe " + "-tp vc jami-qt.pro -o jami-qt.vcxproj CONFIG+=Beta")
config_str = 'Release'
configuration_type = 'Application'
elif (config_str == 'ReleaseCompile'):
print('Generating project using qmake ' + config_str + '|' + arch)
if(execute_cmd("C:\\Qt\\" + qtver + "\\msvc2017_64\\bin\\qmake.exe " + "-tp vc jami-qt.pro -o jami-qt.vcxproj CONFIG+=ReleaseCompile")):
print("ReleaseCompile: Qmake vcxproj file generate error")
sys.exit(1)
config_str = 'Release'
# Note: If project is configured to Beta, the configuration name is still release,
# but will be outputted into x64/Beta folder
# Note: If project is configured to Beta or ReleaseCompile, the configuration name is still release,
# but will be outputted into x64/Beta folder (for Beta Only)
print('Building projects in ' + config_str + '|' + arch)
vs_env_vars = {}
......@@ -157,6 +167,7 @@ def build(arch, toolset, sdk_version, config_str, project_path_under_current_pat
'/maxcpucount:' + str(multiprocessing.cpu_count()),
'/p:Platform=' + arch,
'/p:Configuration=' + config_str,
'/p:ConfigurationType=' + configuration_type,
'/p:useenv=true']
if (toolset != ''):
msbuild_args.append('/p:PlatformToolset=' + toolset)
......@@ -190,6 +201,9 @@ def parse_args():
ap.add_argument(
'-bt', '--beta', action='store_true',
help='Build Qt Client in Beta Config')
ap.add_argument(
'-c', '--releasecompile', action='store_true',
help='Build Qt Client in ReleaseCompile Config')
ap.add_argument(
'-s', '--sdk', default=win_sdk_default, type=str,
help='Use specified windows sdk version')
......@@ -225,5 +239,8 @@ def main():
if parsed_args.beta:
build(parsed_args.arch, parsed_args.toolset, parsed_args.sdk, 'Beta', '\\jami-qt.vcxproj', parsed_args.qtver)
if parsed_args.releasecompile:
build(parsed_args.arch, parsed_args.toolset, parsed_args.sdk, 'ReleaseCompile', '\\jami-qt.vcxproj', parsed_args.qtver)
if __name__ == '__main__':
main()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment