diff options
| author | ruki <[email protected]> | 2024-05-28 10:03:02 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-28 10:03:02 +0800 |
| commit | 6975cf5ff7c120bd537211ea167c157b45780d0a (patch) | |
| tree | 22f1aa0d71a7a3d0a23f78756667c90d3cd1d879 /xmake/modules | |
| parent | 707bfc36f9b4a14c42bde2cb115d86b33218bcc9 (diff) | |
| parent | eb4ad9b4c028807d8bfddff1a7834c0069ba49b3 (diff) | |
Merge pull request #5153 from xmake-io/wix
Xpack: wix toolset support
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/private/action/require/impl/packagenv.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xmake/modules/private/action/require/impl/packagenv.lua b/xmake/modules/private/action/require/impl/packagenv.lua index 06a70df91..01eb20d2a 100644 --- a/xmake/modules/private/action/require/impl/packagenv.lua +++ b/xmake/modules/private/action/require/impl/packagenv.lua @@ -19,17 +19,21 @@ -- -- imports +import("core.base.hashset") import("core.package.package", {alias = "core_package"}) -- enter the package environments -function _enter_package(package_name, envs, installdir) +function _enter_package(package_name, envs, pathenvs, installdir) + if pathenvs then + pathenvs = hashset.from(pathenvs) + end for name, values in pairs(envs) do - if name == "PATH" or name == "LD_LIBRARY_PATH" or name == "DYLD_LIBRARY_PATH" then + if pathenvs and pathenvs:has(name) then for _, value in ipairs(values) do if path.is_absolute(value) then os.addenv(name, value) else - os.addenv(name, path.join(installdir, value)) + os.addenv(name, path.normalize(path.join(installdir, value))) end end else @@ -45,7 +49,7 @@ function enter(...) for _, manifest_file in ipairs(os.files(path.join(core_package.installdir(), name:sub(1, 1), name, "*", "*", "manifest.txt"))) do local manifest = io.load(manifest_file) if manifest and manifest.plat == os.host() and manifest.arch == os.arch() then - _enter_package(name, manifest.envs, path.directory(manifest_file)) + _enter_package(name, manifest.envs, manifest.pathenvs, path.directory(manifest_file)) end end end |
