Skip to content

Commit 9d123ea

Browse files
authored
Install shell-based launchers on Windows in MSYS2 environment (#25992)
For more info see msys2/MINGW-packages#26928
1 parent 8c5cdc8 commit 9d123ea

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tools/install.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import sys
1919

2020
WINDOWS = sys.platform.startswith('win')
21+
MSYS2 = 'MSYSTEM' in os.environ
2122

2223
EXCLUDES = [os.path.normpath(x) for x in '''
2324
test/third_party
@@ -66,9 +67,9 @@ def copy_emscripten(target):
6667
excludes = EXCLUDES
6768
# We have a few launcher scripts that are checked into git still.
6869
# Exclude the ones not designed for the current platforms.
69-
if WINDOWS:
70+
if WINDOWS and not MSYS2:
7071
excludes += [os.path.splitext(l)[0] for l in LAUNCHER_BAT_SCRIPTS]
71-
else:
72+
elif not MSYS2:
7273
excludes += LAUNCHER_BAT_SCRIPTS
7374

7475
os.chdir(emscripten_root)

tools/maint/create_entry_points.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def make_executable(filename):
6868

6969
def main(all_platforms):
7070
is_windows = sys.platform.startswith('win')
71-
do_unix = all_platforms or not is_windows
71+
is_msys2 = 'MSYSTEM' in os.environ
72+
do_unix = all_platforms or not is_windows or is_msys2
7273
do_windows = all_platforms or is_windows
7374

7475
def generate_entry_points(cmd, path):

0 commit comments

Comments
 (0)