Пример #1
0
def CheckEnvironment():
    txPath = 'tx'
    txError = 0

    try:
        exe_dir, fdkSharedDataDir = FDKUtils.findFDKDirs()
    except FDKUtils.FDKEnvError:
        logMsg(
            "Please re-install the FDK. Cannot find the FDK/Tools/SharedData directory."
        )
        raise FDKEnvironmentError

    command = "%s -u 2>&1" % (txPath)
    report = FDKUtils.runShellCmd(command)
    if "options" not in report:
        txError = 1

    if txError:
        logMsg(
            "Please re-install the FDK. The executable directory \"%s\" is missing the tool: < %s >."
            % (exe_dir, txPath))
        logMsg("or the files referenced by the shell script is missing.")
        raise FDKEnvironmentError

    return txPath, fdkSharedDataDir
Пример #2
0
def CheckEnvironment():
    if curSystem == "Windows":
        tx_path = subprocess.check_output(["where", "tx.exe"]).strip()
    else:
        tx_path = subprocess.check_output(["which", "tx"]).strip()
    txError = 0

    try:
        exe_dir, _ = FDKUtils.findFDKDirs()
    except FDKUtils.FDKEnvError:
        logMsg("Please re-install the afdko. Cannot find the "
               "afdko/Tools/SharedData directory.")
        raise FDKEnvironmentError

    command = "%s -u 2>&1" % tx_path
    report = FDKUtils.runShellCmd(command)
    if "options" not in report:
        txError = 1

    if txError:
        logMsg("Please re-install the afdko. The executable directory \"%s\" "
               "is missing the tool: < %s >." % (exe_dir, tx_path))
        logMsg("or the files referenced by the shell script is missing.")
        raise FDKEnvironmentError

    return tx_path
Пример #3
0
def CheckEnvironment():
	txPath = 'tx'
	txError = 0

	try:
		exe_dir, fdkSharedDataDir = FDKUtils.findFDKDirs()
	except FDKUtils.FDKEnvError:
		logMsg("Please re-install the FDK. Cannot find the FDK/Tools/SharedData directory.")
		raise FDKEnvironmentError

	command = "%s -u 2>&1" % (txPath)
	report = FDKUtils.runShellCmd(command)
	if "options" not in report:
			txError = 1
	
	if  txError:
		logMsg("Please re-install the FDK. The executable directory \"%s\" is missing the tool: < %s >." % (exe_dir, txPath ))
		logMsg("or the files referenced by the shell script is missing.")
		raise FDKEnvironmentError

	return txPath, fdkSharedDataDir