diff --git a/gen_resources.py b/gen_resources.py index b73cfa715e5bd3c4889ec59ed3c91df88195eaad..699fdd81cd5e52a4a01b53ace7ddbde12e265279 100644 --- a/gen_resources.py +++ b/gen_resources.py @@ -3,9 +3,8 @@ import sys, os, multiprocessing, subprocess -sakia = os.path.abspath(os.path.join(os.path.dirname(__file__))) +root_path = os.path.abspath(os.path.join(os.path.dirname(__file__))) resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'res')) -gen_ui = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src', 'sakia', 'gen_resources')) gen_resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')) def convert_ui(args, **kwargs): @@ -14,14 +13,11 @@ def convert_ui(args, **kwargs): def build_resources(): try: to_process = [] - for root, dirs, files in os.walk(sakia): + for root, dirs, files in os.walk(root_path): for f in files: if f.endswith('.ui'): source = os.path.join(root, f) - if os.path.commonpath([resources, root]) == resources: - dest = os.path.join(gen_ui, os.path.splitext(os.path.basename(source))[0]+'_uic.py') - else: - dest = os.path.join(root, os.path.splitext(os.path.basename(source))[0]+'_uic.py') + dest = os.path.join(root, os.path.splitext(os.path.basename(source))[0]+'_uic.py') exe = 'pyuic5' elif f.endswith('.qrc'):