Skip to content
Snippets Groups Projects
Commit bc02dc37 authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

project: use jami-qt.pro to generate vcxproj files

Change-Id: I3443e350daa9ba171a351e90da02dfb26b98fa10
parent 8ce1d629
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,33 @@ xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"> ...@@ -12,7 +12,33 @@ xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
</xsl:template> </xsl:template>
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'Jami.exe')]" use="@Id" /> <xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'Jami.exe')]" use="@Id" />
<xsl:key name="vc-service-search" match="wix:Component[contains(wix:File/@Source, 'vcredist_x64.exe')]" use="@Id" />
<xsl:key name="pdb-search" match="wix:Component[contains(wix:File/@Source, '.pdb')]" use="@Id" />
<xsl:key name="lib-search" match="wix:Component[contains(wix:File/@Source, 'Jami.lib')]" use="@Id" />
<xsl:key name="exp-search" match="wix:Component[contains(wix:File/@Source, 'Jami.exp')]" use="@Id" />
<xsl:key name="qmake-search" match="wix:Component[contains(wix:File/@Source, 'qmake')]" use="@Id" />
<xsl:key name="obj-search" match="wix:Component[contains(wix:File/@Source, '.obj')]" use="@Id" />
<xsl:key name="tlog-search" match="wix:Component[contains(wix:File/@Source, '.tlog')]" use="@Id" />
<xsl:key name="log-search" match="wix:Component[contains(wix:File/@Source, '.log')]" use="@Id" />
<xsl:template match="wix:Component[key('service-search', @Id)]" /> <xsl:template match="wix:Component[key('service-search', @Id)]" />
<xsl:template match="wix:Component[key('vc-service-search', @Id)]" />
<xsl:template match="wix:Component[key('pdb-search', @Id)]" />
<xsl:template match="wix:Component[key('lib-search', @Id)]" />
<xsl:template match="wix:Component[key('exp-search', @Id)]" />
<xsl:template match="wix:Component[key('qmake-search', @Id)]" />
<xsl:template match="wix:Component[key('obj-search', @Id)]" />
<xsl:template match="wix:Component[key('tlog-search', @Id)]" />
<xsl:template match="wix:Component[key('log-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('service-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('vc-service-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('pdb-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('lib-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('exp-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('qmake-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('obj-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('tlog-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('log-search', @Id)]" />
</xsl:stylesheet> </xsl:stylesheet>
\ No newline at end of file
...@@ -2,9 +2,13 @@ win32-msvc { ...@@ -2,9 +2,13 @@ win32-msvc {
TARGET = Jami TARGET = Jami
TEMPLATE = vcapp TEMPLATE = vcapp
QT += winextras widgets xml multimedia multimediawidgets network webenginewidgets svg sql QT += core winextras qml quickcontrols2 quick quickwidgets widgets xml multimedia multimediawidgets network webenginewidgets svg sql
CONFIG += suppress_vcproj_warnings CONFIG += suppress_vcproj_warnings c++17 qtquickcompiler
QML2_IMPORT_PATH = C:/Qt/5.9.4/msvc2017_64/qml
QTQUICK_COMPILER_SKIPPED_RESOURCES += ressources.qrc
# compiler options # compiler options
QMAKE_CXXFLAGS += /wd"4068" /wd"4099" /wd"4189" /wd"4267" /wd"4577" /wd"4467" /wd"4715" /wd"4828" QMAKE_CXXFLAGS += /wd"4068" /wd"4099" /wd"4189" /wd"4267" /wd"4577" /wd"4467" /wd"4715" /wd"4828"
...@@ -40,11 +44,28 @@ win32-msvc { ...@@ -40,11 +44,28 @@ win32-msvc {
LIBS += Shell32.lib Ole32.lib Advapi32.lib Shlwapi.lib User32.lib Gdi32.lib Crypt32.lib Strmiids.lib LIBS += Shell32.lib Ole32.lib Advapi32.lib Shlwapi.lib User32.lib Gdi32.lib Crypt32.lib Strmiids.lib
# output paths # output paths
DESTDIR = x64/Release
OBJECTS_DIR = obj/.obj OBJECTS_DIR = obj/.obj
MOC_DIR = obj/.moc MOC_DIR = obj/.moc
RCC_DIR = obj/.rcc RCC_DIR = obj/.rcc
UI_DIR = obj/.ui UI_DIR = obj/.ui
# beta config
contains(CONFIG, Beta) {
CONFIG(Beta) {
message(Beta config enabled)
Release: DESTDIR = x64/Beta
Release: DEFINES += BETA
}
} else {
Release: DESTDIR = x64/Release
}
Debug: DESTDIR = x64/Debug
# qt dir
QMAKE_INCDIR_QT=$(QTDIR)\include
QMAKE_LIBDIR=$(QTDIR)\lib
QMAKE_MOC=$(QTDIR)\bin\moc.exe
QMAKE_QMAKE=$(QTDIR)\bin\qmake.exe
} }
unix { unix {
... ...
......
...@@ -128,9 +128,20 @@ def deps(arch, toolset): ...@@ -128,9 +128,20 @@ def deps(arch, toolset):
execute_cmd("cd qrencode-win32 && git checkout d6495a2aa74d058d54ae0f1b9e9e545698de66ce && " + apply_cmd + ' ..\\qrencode-win32.patch', True) execute_cmd("cd qrencode-win32 && git checkout d6495a2aa74d058d54ae0f1b9e9e545698de66ce && " + apply_cmd + ' ..\\qrencode-win32.patch', True)
print('Building qrcodelib') print('Building qrcodelib')
build(arch, '', '', 'Release-Lib', '\\qrencode-win32\\qrencode-win32\\vc8\\qrcodelib\\qrcodelib.vcxproj', False) 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):
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")
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'
# Note: If project is configured to Beta, the configuration name is still release,
# but will be outputted into x64/Beta folder
def build(arch, toolset, sdk_version, config_str, project_path_under_current_path, force_option=True):
print('Building projects in ' + config_str + '|' + arch) print('Building projects in ' + config_str + '|' + arch)
vs_env_vars = {} vs_env_vars = {}
vs_env_vars.update(getVSEnv()) vs_env_vars.update(getVSEnv())
...@@ -176,9 +187,6 @@ def parse_args(): ...@@ -176,9 +187,6 @@ def parse_args():
ap.add_argument( ap.add_argument(
'-d', '--deps', action='store_true', '-d', '--deps', action='store_true',
help='Build Deps for Qt Client') help='Build Deps for Qt Client')
ap.add_argument(
'-c', '--complie', action='store_true',
help='Release Complie for Qt Client')
ap.add_argument( ap.add_argument(
'-bt', '--beta', action='store_true', '-bt', '--beta', action='store_true',
help='Build Qt Client in Beta Config') help='Build Qt Client in Beta Config')
...@@ -188,6 +196,9 @@ def parse_args(): ...@@ -188,6 +196,9 @@ def parse_args():
ap.add_argument( ap.add_argument(
'-t', '--toolset', default=win_toolset_default, type=str, '-t', '--toolset', default=win_toolset_default, type=str,
help='Use specified platform toolset version') help='Use specified platform toolset version')
ap.add_argument(
'-q', '--qtver', default='5.9.4',
help='Sets the version of Qmake')
parsed_args = ap.parse_args() parsed_args = ap.parse_args()
...@@ -209,13 +220,10 @@ def main(): ...@@ -209,13 +220,10 @@ def main():
deps(parsed_args.arch, parsed_args.toolset) deps(parsed_args.arch, parsed_args.toolset)
if parsed_args.build: if parsed_args.build:
build(parsed_args.arch, parsed_args.toolset, parsed_args.sdk, 'Release', '\\ring-client-windows.vcxproj') build(parsed_args.arch, parsed_args.toolset, parsed_args.sdk, 'Release', '\\jami-qt.vcxproj', parsed_args.qtver)
if parsed_args.beta: if parsed_args.beta:
build(parsed_args.arch, parsed_args.toolset, parsed_args.sdk, 'Beta', '\\ring-client-windows.vcxproj') build(parsed_args.arch, parsed_args.toolset, parsed_args.sdk, 'Beta', '\\jami-qt.vcxproj', parsed_args.qtver)
if parsed_args.complie:
build(parsed_args.arch, parsed_args.toolset, parsed_args.sdk, 'ReleaseCompile', '\\ring-client-windows.vcxproj')
if __name__ == '__main__': if __name__ == '__main__':
main() main()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment