Commit 63646e6b authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

build: fix native Windows build

Change-Id: Icb9c82aea6eeb17f02353da58bb77fede79b3cb0
parent dc28cd5d
......@@ -303,12 +303,6 @@ if(MSVC)
set(QRENCODE_LIB
${QRENCODE_DIR}/vc8/qrcodelib/x64/Release-Lib/qrcodelib.lib)
# libjamiclient
set(LIBCLIENT_STATIC_LIB
${PROJECT_SOURCE_DIR}/build/release/${LIBCLIENT_NAME}.lib)
set(QTWRAPPER_LIB
${PROJECT_SOURCE_DIR}/build/src/qtwrapper/Release/qtwrapper.lib)
# daemon
set(DRING_SRC_PATH ${DRING}/contrib/msvc/include)
set(DRING_LIB ${DRING}/build/x64/ReleaseLib_win32/bin/jami.lib)
......@@ -468,8 +462,7 @@ if(MSVC)
PRIVATE
${DRING_LIB}
${GNUTLS_LIB}
${LIBCLIENT_STATIC_LIB}
${QTWRAPPER_LIB}
${LIBCLIENT_NAME}
${QT_LIBS}
${QRENCODE_LIB}
${WINDOWS_SYS_LIBS})
......
......@@ -29,7 +29,8 @@ qt_kit_path = 'msvc2019_64'
qt_root_path = os.getenv('QT_ROOT_DIRECTORY', qt_path)
# project path
installer_project = os.path.join(this_dir, 'JamiInstaller', 'JamiInstaller.wixproj')
installer_project = os.path.join(
this_dir, 'JamiInstaller', 'JamiInstaller.wixproj')
unit_test_project = os.path.join(build_dir, 'tests', 'unittests.vcxproj')
qml_test_project = os.path.join(build_dir, 'tests', 'qml_tests.vcxproj')
......@@ -205,10 +206,13 @@ def build(config_str, qtver, tests=False):
vs_env_vars.update(getVSEnv())
qt_dir = os.path.join(qt_root_path, qtver, qt_kit_path)
daemon_dir = os.path.dirname(this_dir) + '\\daemon'
daemon_bin_dir = daemon_dir + '\\build\\x64\\ReleaseLib_win32\\bin'
cmake_options = [
'-DCMAKE_PREFIX_PATH=' + qt_dir,
'-DCMAKE_BUILD_TYPE=' + 'Release'
'-DCMAKE_INSTALL_PREFIX=' + daemon_bin_dir,
'-DLIBJAMI_INCLUDE_DIR=' + daemon_dir + '\\src\\jami'
]
if tests:
cmake_options.append('-DENABLE_TESTS=true')
......@@ -262,6 +266,7 @@ def run_tests(mute_jamid, output_to_files):
test_result_code = 1
sys.exit(test_result_code)
def generate_msi_installer():
print('Generating application installer...')
......@@ -274,6 +279,7 @@ def generate_msi_installer():
build_project(msbuild, msbuild_args, installer_project, vs_env_vars)
def parse_args():
ap = argparse.ArgumentParser(description="Client qt build tool")
subparser = ap.add_subparsers(dest="subparser_name")
......@@ -299,8 +305,6 @@ def parse_args():
'-l', '--logtests', action='store_true', default=False,
help='Output tests log to files')
subparser.add_parser('msi')
parsed_args = ap.parse_args()
return parsed_args
......@@ -321,17 +325,14 @@ def main():
init_submodules()
build_deps()
elif parsed_args.subparser_name == 'pack':
print('Package generation is not yet implemented.')
generate_msi_installer()
sys.exit(1)
else:
config = ('Release', 'Beta')[parsed_args.beta]
build(config, qt_version_default, parsed_args.runtests)
build(config, parsed_args.qtver, parsed_args.runtests)
if parsed_args.runtests:
run_tests(parsed_args.mutejamid, parsed_args.outputtofiles)
if parsed_args.subparser_name == 'msi':
generate_msi_installer()
if __name__ == '__main__':
main()
This diff is collapsed.
......@@ -19,11 +19,9 @@
#include "instancemanager.h"
#ifndef _MSC_VER
#if !defined(ENABLE_LIBWRAP) && !defined(_MSC_VER)
#include <unistd.h>
#else
#include "../../daemon/compat/msvc/unistd.h"
#endif // !_MSC_VER
#endif
#include "../globalinstances.h"
#include "../interfaces/dbuserrorhandleri.h"
......
......@@ -21,11 +21,9 @@
#include <locale>
#ifndef _MSC_VER
#if !defined(ENABLE_LIBWRAP) && !defined(_MSC_VER)
#include <unistd.h>
#else
#include "../../daemon/compat/msvc/unistd.h"
#endif // !_MSC_VER
#endif
#include "call_const.h"
......
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