Make make_header.py functional when run from any location

This removes the need to `cd` to `scene/resources/default_theme/`
to get the expected result.
This commit is contained in:
Hugo Locurcio 2019-07-22 14:02:33 +02:00
parent 6b19da583d
commit 31eb116d49
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C

View file

@ -1,9 +1,14 @@
#!/usr/bin/env python #!/usr/bin/env python
import glob import glob
import os
enc = "utf-8" enc = "utf-8"
# Change to the directory where the script is located,
# so that the script can be run from any location
os.chdir(os.path.dirname(os.path.realpath(__file__)))
# Generate include files # Generate include files
f = open("theme_data.h", "wb") f = open("theme_data.h", "wb")