Skip to content
Snippets Groups Projects
Commit 297ad484 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

build: fix Windows build

Makes build.py commands work for Windows.

Change-Id: Ie21314b090106286348ad51d6137fac84fa651df
parent ada7c4f0
Branches
Tags
No related merge requests found
build.py 100755 → 100644
......@@ -212,6 +212,7 @@ UNINSTALL_DAEMON_SCRIPT = [
ASSUME_YES_FLAG = ' -y'
ASSUME_YES_FLAG_PACMAN = ' --noconfirm'
def run_powershell_cmd(cmd):
p = subprocess.Popen(["powershell.exe", cmd], stdout=sys.stdout)
p.communicate()
......@@ -354,13 +355,13 @@ def cwd(path):
def run_install(args):
# Platforms with special compilation scripts
if args.distribution == WIN32_DISTRIBUTION_NAME:
winmake = 'daemon/compat/msvc/winmake.py'
with cwd(os.path.dirname(winmake)):
with cwd('daemon/compat/msvc'):
execute_script(
f'python {winmake} -iv -s {args.sdk} -b daemon')
['python winmake.py -iv '
f'-s {args.sdk} -b daemon'])
build_windows = 'extras/scripts/build-windows.py'
execute_script(f'python {build_windows} init')
execute_script(f'python {build_windows}')
execute_script([f'python {build_windows} init'])
execute_script([f'python {build_windows}'])
return True
# Unix-like platforms
......@@ -393,7 +394,8 @@ def run_install(args):
environ['CMAKE_PREFIX_PATH'] = proc.stdout.rstrip("\n")
environ['CONFIGURE_FLAGS'] = '--without-dbus'
if not args.qt:
raise Exception('provide the Qt path using --qt=/qt/install/prefix')
raise Exception(
'provide the Qt path using --qt=/qt/install/prefix')
install_args += ("-Q", args.qt)
else:
if args.distribution in ZYPPER_BASED_DISTROS:
......@@ -518,8 +520,8 @@ def execute_script(script, settings=None, fail=True):
line = line % settings
rv = os.system(line)
if rv and fail:
print('Error executing script! Exit code: %s' %
rv, file=sys.stderr)
print('Error executing script! Exit code: %s (%s)' %
(rv, script), file=sys.stderr)
sys.exit(1)
......
......@@ -81,6 +81,7 @@ if(NOT LIBJAMI_LIB)
if(WITH_DAEMON_SUBMODULE)
find_library(LIBJAMI_LIB NAMES jami ring
PATHS ${DAEMON_DIR}/src/.libs
PATHS ${CMAKE_INSTALL_PREFIX}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
NO_DEFAULT_PATH)
......@@ -89,6 +90,7 @@ if(NOT LIBJAMI_LIB)
find_library(LIBJAMI_LIB NAMES jami ring
PATHS ${LIBJAMI_BUILD_DIR}/.libs
PATHS ${RING_BUILD_DIR}/.libs
PATHS ${CMAKE_INSTALL_PREFIX}
PATHS ${CMAKE_INSTALL_PREFIX}/lib
PATHS ${CMAKE_INSTALL_PREFIX}/libexec
NO_DEFAULT_PATH)
......
......@@ -207,12 +207,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(repo_root_dir) + '\\daemon'
daemon_bin_dir = daemon_dir + '\\build\\x64\\ReleaseLib_win32\\bin'
daemon_dir = os.path.join(repo_root_dir, 'daemon')
daemon_bin_dir = os.path.join(daemon_dir, 'build/x64/ReleaseLib_win32/bin')
# We need to update the minimum SDK version to be able to
# build with system theme support
cmake_options = [
'-DWITH_DAEMON_SUBMODULE=ON',
'-DCMAKE_PREFIX_PATH=' + qt_dir,
'-DCMAKE_INSTALL_PREFIX=' + daemon_bin_dir,
'-DLIBJAMI_INCLUDE_DIR=' + daemon_dir + '\\src\\jami',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment