Ejemplo n.º 1
0
def get_installer_record(installer_path, product_names):
    record = {}
    lv_info = get_lv_info(os.path.join(installer_path, 'buildInfo.txt'))
    record.update(lv_info)
    msi_path = os.path.join(installer_path, r'Products\NI-RIO_cRIO_Firmware_RT\cRIO_Firmware.msi')
    safemodes = get_versions_from_msi(msi_path, product_names)
    safemode_str = reduce(lambda ret_str, product_name: ret_str + r'/' + safemodes[product_name],
                    product_names[1:], safemodes[product_names[0]])
    record['safemode'] = safemode_str
    record['installer_path'] = installer_path
    return record
Ejemplo n.º 2
0
def construct_record_dict(stackUrl):
    stackRecord = {}
    stackRecord['stackUrl'] = stackUrl
    stackName = stackUrl.split('/')[-1].replace('+',' ')
    stackRecord['Validated Stack'] = stackName
    installerLocationDict = extract_installer_locations(stackUrl)

    # Get the LabVIEW infomation(i.e. lvVersion and lvAPIVersion)
    configFilePath = os.path.join(installerLocationDict['LV_Core'], 'buildInfo.txt')
    lvInfoDict = get_lv_info(configFilePath)
    stackRecord.update(lvInfoDict)

    # Get the myRIO/roboRIO safemode version from NIRIO msi file
    rioPath = installerLocationDict['cRIO']                                                         
    msiPath = os.path.join(rioPath,r'Products\NI-RIO_cRIO_Firmware_RT\cRIO_Firmware.msi')
    productNames = ('myRIO-1900','myRIO-1950','roboRIO')                                           
    safemodeVersionDict = get_versions_from_msi(msiPath,productNames)
    stackRecord['Safemode'] = safemodeVersionDict['myRIO-1900']+'/'+safemodeVersionDict['roboRIO']
    return stackRecord