Files
Toolbox/installer/coder.py
Yadciel f49d8874c1 Add Cython setup and enhance installer functionality
Introduced a Cython-based setup to compile Python files for performance improvements. Updated installer scripts with customtkinter modifications for better UI, added support for additional content loading, and enhanced project structure. Adjusted build commands, streamlined file paths, and integrated new UI elements in the HTML resources.
2024-12-22 20:24:23 +01:00

18 lines
628 B
Python

import base64
def encode_file_to_base64(file_path):
with open(file_path, 'rb') as file:
return base64.b64encode(file.read()).decode('utf-8')
# Base64-kodierte Strings generieren
exe_base64 = encode_file_to_base64("../cmake-build-minsizerel-visual-studio/Toolbox.exe")
icon_base64 = encode_file_to_base64("../res/ico/Toolbox.ico")
# Base64-Strings in eine Python-Datei schreiben
with open("base64_strings.py", 'w') as py_file:
py_file.write(f'exe_base64 = """{exe_base64}"""\n\n')
py_file.write(f'icon_base64 = """{icon_base64}"""\n\n')
print("Base64-Daten erfolgreich in die Python-Datei gespeichert.")