Collecting includes, getting shader type from extension:

This commit is contained in:
Noah Santschi-Cooney 2018-06-16 19:55:57 +01:00
parent 7259283c6e
commit 960597e324
No known key found for this signature in database
GPG key ID: 3B22282472C8AE48
4 changed files with 29 additions and 10 deletions

View file

@ -20,14 +20,15 @@ def main():
os_choice = int(input('Choose your OS:\n - 0: Windows\n - 1: Linux\n - 2: OSX\n> '))
if os_choice not in os:
print('Invalid OS. Please only choose a value between 0 and 2')
exit(1)
print('Downloading...')
with urllib.request.urlopen(url[os_choice]) as respone:
with BytesIO(respone.read()) as zipped:
with zipfile.ZipFile(zipped) as zip_file:
zip_file.extract('bin/glslangValidator')
o.rename('bin/glslangValidator', 'glslangValidator')
o.rmdir('bin')
print('glslangValidator downloaded. Set mclglsl')
print('glslangValidator downloaded. Add this line to your VSCode settings:\n"mcglsl.glslangValidatorPath": "' + o.getcwd() + '/' + 'glslangValidator"')
return
print('There was an error :(')
main()