From 31eb116d49a8648a560354c7caa895cc7a8661c5 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 22 Jul 2019 14:02:33 +0200 Subject: 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. --- scene/resources/default_theme/make_header.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scene') diff --git a/scene/resources/default_theme/make_header.py b/scene/resources/default_theme/make_header.py index bd5a723b23..cf0ccf1c3a 100755 --- a/scene/resources/default_theme/make_header.py +++ b/scene/resources/default_theme/make_header.py @@ -1,9 +1,14 @@ #!/usr/bin/env python import glob +import os 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 f = open("theme_data.h", "wb") -- cgit v1.2.3