Skip to content

Commit

Permalink
Merge pull request #5 from copyrat90/wonderful-toolchain
Browse files Browse the repository at this point in the history
Add wonderful toolchain support
  • Loading branch information
laqieer authored Jun 3, 2024
2 parents 5cc39f9 + f847b1a commit e24ee6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/butano/butano_fonts_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ def process_texts_files(texts_file_paths, characters_file_path):
for texts_file_path in texts_file_paths:
texts_file_ext = os.path.splitext(texts_file_path.lower())[1]
if texts_file_ext in ('.c', '.cpp', '.cc', '.cxx', '.c++', '.h', '.hpp', '.hh', '.hxx', '.h++', '.s', '.inc', '.asm'):
text = subprocess.check_output([os.environ['DEVKITARM'] + '/bin/arm-none-eabi-cpp', '-fpreprocessed', texts_file_path]).decode('utf-8')
if os.environ.get('DEVKITARM'):
text = subprocess.check_output([os.environ['DEVKITARM'] + '/bin/arm-none-eabi-cpp', '-fpreprocessed', texts_file_path]).decode('utf-8')
elif os.environ.get('WONDERFUL_TOOLCHAIN'):
text = subprocess.check_output([os.environ['WONDERFUL_TOOLCHAIN'] + '/toolchain/gcc-arm-none-eabi/bin/arm-none-eabi-cpp', '-fpreprocessed', texts_file_path]).decode('utf-8')
else:
raise Exception('DEVKITARM and WONDERFUL_TOOLCHAIN not found')
for char in text:
unique_characters.add(char)
continue
Expand Down

0 comments on commit e24ee6e

Please sign in to comment.