Example #1
0
    def launch(self):
        LOGGING.debug(self.manager.data)
        env.HZ_PROJECT_NAME.set(self.comboBox_project_list.currentText())
        self.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
        item = self.software_commands.currentItem()
        exe_path = item.path
        if exe_path.startswith('.'):
            exe_path = os.path.normpath(
                exe_path.replace('.', self.wrappers_dir, 1))
        else:
            exe_path = os.path.expandvars(exe_path)
        if not os.path.exists(exe_path):
            LOGGING.error(traceback.format_exc())
            MessageDisplay(
                NAME, 'Not Find \n%s \nin "software_profile.yaml"' % exe_path,
                MessageDisplay.CRITICAL)

        elif item.name.lower() in self.app_launchers:
            widget = self.software_commands.itemWidget(item)
            profile_name = widget.comboBox.currentText()
            try:
                profile_path = item.profiles[profile_name]
                LOGGING.info('load current profile: %s' % profile_path)
                if os.path.isdir(profile_path):
                    command = '{0} -lp {1}'.format(exe_path, profile_path)
                    LOGGING.info('run launcher: %s' % command)
                    htk.start(command)
            except:
                LOGGING.error(traceback.format_exc())
                MessageDisplay(NAME, traceback.format_exc(),
                               MessageDisplay.CRITICAL)
            finally:
                self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        else:
            command = '{0}'.format(exe_path)
            try:
                LOGGING.info(command)
                htk.start(command)
            except:
                LOGGING.error(traceback.format_exc())
                MessageDisplay(NAME, traceback.format_exc(),
                               MessageDisplay.CRITICAL)
            finally:
                self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
Example #2
0
    def launch(self):
        LOGGING.debug(self.manager.data)
        env.HZ_PROJECT_NAME.set(self.comboBox_project_list.currentText())
        self.setCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
        item = self.software_commands.currentItem()
        exe_path = item.path
        if exe_path.startswith('.'):
            exe_path = os.path.normpath(
                exe_path.replace('.', self.wrappers_dir, 1))
        else:
            exe_path = os.path.expandvars(exe_path)
        if not os.path.exists(exe_path):
            LOGGING.error(traceback.format_exc())
            MessageDisplay(NAME,
                           'Not Find \n%s \nin "software_profile.yaml"' % exe_path,
                           MessageDisplay.CRITICAL)

        elif item.name.lower() in self.app_launchers:
            widget = self.software_commands.itemWidget(item)
            profile_name = widget.comboBox.currentText()
            try:
                profile_path = item.profiles[profile_name]
                LOGGING.info('load current profile: %s' % profile_path)
                if os.path.isdir(profile_path):
                    command = '{0} -lp {1}'.format(exe_path, profile_path)
                    LOGGING.info('run launcher: %s' % command)
                    htk.start(command)
            except:
                LOGGING.error(traceback.format_exc())
                MessageDisplay(NAME, traceback.format_exc(),
                               MessageDisplay.CRITICAL)
            finally:
                self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
        else:
            command = '{0}'.format(exe_path)
            try:
                LOGGING.info(command)
                htk.start(command)
            except:
                LOGGING.error(traceback.format_exc())
                MessageDisplay(NAME, traceback.format_exc(),
                               MessageDisplay.CRITICAL)
            finally:
                self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
Example #3
0
 def explore_local_settings_folder(self):
     htk.start(self.local_profile_folder)
Example #4
0
 def go_to_log_folder():
     htk.start(htk.get_log_folder())
Example #5
0
 def to_publish(self, foleder_path):
     if self.checkBox_auto_open_file.isChecked():
         # foleder_path = r'X:\pipelinernd_rnd-0000\_library\assets\environment\env_jojohome'
         start(foleder_path)
     if self.checkBox_auto_send_email.isChecked():
         email.send_publish_email(foleder_path)
Example #6
0
 def explore_local_settings_folder(self):
     htk.start(self.local_profile_folder)
Example #7
0
 def go_to_log_folder():
     htk.start(htk.get_log_folder())