|
|
@ -1987,12 +1987,9 @@ class Backend: |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
|
|
|
|
|
|
|
|
def get_devenv(self) -> mesonlib.EnvironmentVariables: |
|
|
|
def get_devenv(self) -> mesonlib.EnvironmentVariables: |
|
|
|
env = mesonlib.EnvironmentVariables() |
|
|
|
|
|
|
|
extra_paths = set() |
|
|
|
extra_paths = set() |
|
|
|
library_paths = set() |
|
|
|
library_paths = set() |
|
|
|
build_machine = self.environment.machines[MachineChoice.BUILD] |
|
|
|
|
|
|
|
host_machine = self.environment.machines[MachineChoice.HOST] |
|
|
|
host_machine = self.environment.machines[MachineChoice.HOST] |
|
|
|
need_wine = not build_machine.is_windows() and host_machine.is_windows() |
|
|
|
|
|
|
|
for t in self.build.get_targets().values(): |
|
|
|
for t in self.build.get_targets().values(): |
|
|
|
in_default_dir = t.should_install() and not t.get_install_dir()[2] |
|
|
|
in_default_dir = t.should_install() and not t.get_install_dir()[2] |
|
|
|
if t.for_machine != MachineChoice.HOST or not in_default_dir: |
|
|
|
if t.for_machine != MachineChoice.HOST or not in_default_dir: |
|
|
@ -2012,24 +2009,7 @@ class Backend: |
|
|
|
# LD_LIBRARY_PATH. This allows running system applications using |
|
|
|
# LD_LIBRARY_PATH. This allows running system applications using |
|
|
|
# that library. |
|
|
|
# that library. |
|
|
|
library_paths.add(tdir) |
|
|
|
library_paths.add(tdir) |
|
|
|
if need_wine: |
|
|
|
return self.environment.get_env_for_paths(library_paths, extra_paths) |
|
|
|
# Executable paths should be in both PATH and WINEPATH. |
|
|
|
|
|
|
|
# - Having them in PATH makes bash completion find it, |
|
|
|
|
|
|
|
# and make running "foo.exe" find it when wine-binfmt is installed. |
|
|
|
|
|
|
|
# - Having them in WINEPATH makes "wine foo.exe" find it. |
|
|
|
|
|
|
|
library_paths.update(extra_paths) |
|
|
|
|
|
|
|
if library_paths: |
|
|
|
|
|
|
|
if need_wine: |
|
|
|
|
|
|
|
env.prepend('WINEPATH', list(library_paths), separator=';') |
|
|
|
|
|
|
|
elif host_machine.is_windows() or host_machine.is_cygwin(): |
|
|
|
|
|
|
|
extra_paths.update(library_paths) |
|
|
|
|
|
|
|
elif host_machine.is_darwin(): |
|
|
|
|
|
|
|
env.prepend('DYLD_LIBRARY_PATH', list(library_paths)) |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
env.prepend('LD_LIBRARY_PATH', list(library_paths)) |
|
|
|
|
|
|
|
if extra_paths: |
|
|
|
|
|
|
|
env.prepend('PATH', list(extra_paths)) |
|
|
|
|
|
|
|
return env |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def compiler_to_generator_args(self, target: build.BuildTarget, |
|
|
|
def compiler_to_generator_args(self, target: build.BuildTarget, |
|
|
|
compiler: 'Compiler', output: str = '@OUTPUT@', |
|
|
|
compiler: 'Compiler', output: str = '@OUTPUT@', |
|
|
|