Changeset 2e27cdb6 in sasview


Ignore:
Timestamp:
May 16, 2018 7:03:21 AM (5 months ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Pr_fixes, ESS_GUI_image_viewer, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_project_save
Children:
976978b
Parents:
b12404e
git-author:
Piotr Rozyczko <rozyczko@…> (05/16/18 05:50:24)
git-committer:
Piotr Rozyczko <rozyczko@…> (05/16/18 07:03:21)
Message:

Fixed runtime UI conversion

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • run.py

    r3c6ecd9 r2e27cdb6  
    141141    sys.path.append(build_path) 
    142142 
    143     # Run the UI conversion tool 
    144     import sas.qtgui.convertUI 
     143    # Run the UI conversion tool if executed from script 
     144    if os.path.splitext(sys.argv[0])[1].lower() == ".py": 
     145        import sas.qtgui.convertUI 
    145146 
    146147 
  • src/sas/qtgui/convertUI.py

    • Property mode changed from 100755 to 100644
    r4992ff2 r2e27cdb6  
    11# Convert all .ui files in all subdirectories of the current script 
    22import os 
     3import sys 
    34 
    45def pyrrc(in_file, out_file): 
     
    2122 
    2223# RC file in UI directory 
    23 ui_root = 'UI' 
     24execute_root = os.path.split(sys.modules[__name__].__file__)[0] 
     25ui_root = os.path.join(execute_root, 'UI') 
    2426rc_file = 'main_resources.qrc' 
    2527out_file = 'main_resources_rc.py' 
     28 
    2629pyrrc(os.path.join(ui_root, rc_file), os.path.join(ui_root, out_file)) 
    2730 
    2831# Images 
    29 images_root = 'images' 
     32images_root = os.path.join(execute_root, 'images') 
    3033rc_file = 'images.qrc' 
    3134out_file = 'images_rc.py' 
    32 pyrrc(os.path.join(images_root, rc_file), os.path.join(ui_root, out_file)) 
     35pyrrc(os.path.join(images_root, rc_file), os.path.join(images_root, out_file)) 
Note: See TracChangeset for help on using the changeset viewer.