Skip to content

Commit

Permalink
Merge pull request #692 from nazar-pc/windows-support-fixes
Browse files Browse the repository at this point in the history
Improve Windows support with some fixes
  • Loading branch information
nazar-pc authored Oct 24, 2021
2 parents 67be67e + 7a9170f commit e18f9a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
14 changes: 1 addition & 13 deletions npm-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,7 @@ function execute(command)

try
{
// Set MSVC compiler as default on Windows
const env = isWindows ? {
CC : process.env.CC || 'cl',
CXX : process.env.CXX || 'cl',
...process.env
} : process.env;

execSync(
command,
{
env : env,
stdio : [ 'ignore', process.stdout, process.stderr ]
});
execSync(command, { stdio: [ 'ignore', process.stdout, process.stderr ] });
}
catch (error)
{
Expand Down
10 changes: 8 additions & 2 deletions worker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ ifeq ($(OS),Windows_NT)
# Windows is, of course, special.
export NINJA = $(PIP_DIR)/bin/ninja.exe
else
export NINJA = $(PIP_DIR)/bin/ninja
export NINJA = $(PIP_DIR)/bin/ninja
endif

# Instruct Python where to look for modules it needs, such that `meson` actually runs from installed location.
export PYTHONPATH := $(PIP_DIR):${PYTHONPATH}
# For some reason on Windows adding `:${PYTHONPATH}` breaks things.
ifeq ($(OS),Windows_NT)
export PYTHONPATH := $(PIP_DIR)
else
export PYTHONPATH := $(PIP_DIR):${PYTHONPATH}
endif

.PHONY: \
default meson-ninja setup clean clean-pip clean-subprojects clean-all mediasoup-worker xcode lint format test tidy \
Expand Down

0 comments on commit e18f9a1

Please sign in to comment.