Skip to content
Snippets Groups Projects
Commit 0dc9db36 authored by inso's avatar inso
Browse files

More generic gen_resources

parent 629b5be0
No related branches found
No related tags found
No related merge requests found
......@@ -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'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment