1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-04-21 21:52:03 +02:00

build: windows: optionally use pywinmake

Change-Id: Ib0b41428f00945c9bcab2f7d68355c2128c0e68f
This commit is contained in:
Andreas Traczyk 2023-10-27 18:39:31 -04:00
parent 6360e52eb5
commit 92be4fa7dc
5 changed files with 21 additions and 10 deletions

View file

@ -376,7 +376,6 @@ if(MSVC)
# daemon # daemon
set(JAMID_SRC_PATH ${DAEMON_DIR}/contrib/msvc/include) set(JAMID_SRC_PATH ${DAEMON_DIR}/contrib/msvc/include)
set(JAMID_LIB ${DAEMON_DIR}/build/x64/ReleaseLib_win32/bin/libjami.lib)
set(GNUTLS_LIB ${DAEMON_DIR}/contrib/msvc/lib/x64/libgnutls.lib) set(GNUTLS_LIB ${DAEMON_DIR}/contrib/msvc/lib/x64/libgnutls.lib)
# Beta config # Beta config
@ -572,7 +571,7 @@ if(MSVC)
WIN32_EXECUTABLE TRUE) WIN32_EXECUTABLE TRUE)
list(APPEND CLIENT_LIBS list(APPEND CLIENT_LIBS
${JAMID_LIB} ${LIBJAMI_LIB}
${GNUTLS_LIB} ${GNUTLS_LIB}
${LIBCLIENT_NAME} ${LIBCLIENT_NAME}
${QT_LIBS} ${QT_LIBS}

View file

@ -363,10 +363,16 @@ def cwd(path):
def run_install(args): def run_install(args):
# Platforms with special compilation scripts # Platforms with special compilation scripts
if args.distribution == WIN32_DISTRIBUTION_NAME: if args.distribution == WIN32_DISTRIBUTION_NAME:
with cwd('daemon/compat/msvc'): if args.pywinmake:
execute_script( with cwd('daemon'):
['python winmake.py -iv ' execute_script(['git submodule update --init'])
f'-s {args.sdk} -b daemon']) execute_script(['python -m pip install extras/scripts/pywinmake'])
execute_script(['python extras/scripts/winmake.py'])
execute_script(['python extras/scripts/winmake.py --base-dir compat/msvc'])
else:
with cwd('daemon/compat/msvc'):
execute_script([f'python winmake.py -iv -s {args.sdk} -b daemon'])
build_windows = 'extras/scripts/build-windows.py' build_windows = 'extras/scripts/build-windows.py'
execute_script([f'python {build_windows} --init']) execute_script([f'python {build_windows} --init'])
execute_script([f'python {build_windows} --qt={args.qt}']) execute_script([f'python {build_windows} --qt={args.qt}'])
@ -730,6 +736,9 @@ def parse_args():
ap.add_argument('--clean-contribs', nargs='+', ap.add_argument('--clean-contribs', nargs='+',
help='Clean the specified contribs (space separated) or \ help='Clean the specified contribs (space separated) or \
"all" to clean all contribs before building.') "all" to clean all contribs before building.')
ap.add_argument('--pywinmake', dest='pywinmake',
default=False, action='store_true',
help='Build Jami for Windows using pywinmake')
dist = choose_distribution() dist = choose_distribution()

2
daemon

@ -1 +1 @@
Subproject commit a5a46c0385a224f27456c9b0d271cede9622ea72 Subproject commit eab986321590a5812fea67d3a2baacd95e26173c

View file

@ -65,6 +65,7 @@ if(WITH_DAEMON_SUBMODULE)
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/bin PATHS ${CMAKE_INSTALL_PREFIX}/bin
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/build/bin
NO_DEFAULT_PATH) NO_DEFAULT_PATH)
else() else()
# Search only in these given PATHS. # Search only in these given PATHS.
@ -75,6 +76,7 @@ else()
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/bin PATHS ${CMAKE_INSTALL_PREFIX}/bin
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/build/bin
NO_DEFAULT_PATH) NO_DEFAULT_PATH)
# Search elsewhere as well (e.g. system-wide). # Search elsewhere as well (e.g. system-wide).
@ -94,6 +96,7 @@ if(NOT LIBJAMI_LIB)
PATHS ${CMAKE_INSTALL_PREFIX}/lib PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/build/lib
NO_DEFAULT_PATH) NO_DEFAULT_PATH)
else() else()
# Search only in these given PATHS. # Search only in these given PATHS.
@ -104,6 +107,7 @@ if(NOT LIBJAMI_LIB)
PATHS ${CMAKE_INSTALL_PREFIX}/lib PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib PATHS ${CMAKE_INSTALL_PREFIX}/daemon/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec PATHS ${CMAKE_INSTALL_PREFIX}/libexec
PATHS ${CMAKE_INSTALL_PREFIX}/daemon/build/lib
NO_DEFAULT_PATH) NO_DEFAULT_PATH)
# Search elsewhere as well (e.g. system-wide). # Search elsewhere as well (e.g. system-wide).

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" """
Build, test, and package the project. Build, test, and package the project.
@ -264,8 +264,7 @@ def build(config_str, qt_dir, tests):
# Get the daemon bin/include directories. # Get the daemon bin/include directories.
daemon_dir = os.path.join(repo_root_dir, "daemon") daemon_dir = os.path.join(repo_root_dir, "daemon")
daemon_bin_dir = os.path.join( daemon_bin_dir = os.path.join(daemon_dir, "build", "lib")
daemon_dir, "build", "x64", "ReleaseLib_win32", "bin")
# We need to update the minimum SDK version to be able to # We need to update the minimum SDK version to be able to
# build with system theme support # build with system theme support