Browse Source

Fix build for Windows path edge case

vanilla_fb_2.0.x
Victor Oliveira 4 years ago
committed by GitHub
parent
commit
2a72f491e4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      buildroot/share/PlatformIO/scripts/common-features-dependencies.py

14
buildroot/share/PlatformIO/scripts/common-features-dependencies.py

@ -127,17 +127,11 @@ def install_features_dependencies():
def search_compiler():
if env['PLATFORM'] == 'win32':
# the first path have the compiler
compiler_path = None
for path in env['ENV']['PATH'].split(';'):
if re.search(r'platformio\\packages.*\\bin', path):
compiler_path = path
break
if compiler_path == None:
print("Could not find the g++ path")
return None
print(compiler_path)
for file in os.listdir(compiler_path):
if not re.search(r'platformio\\packages.*\\bin', path):
continue
#print(path)
for file in os.listdir(path):
if file.endswith("g++.exe"):
return file
print("Could not find the g++")

Loading…
Cancel
Save