Skip to content
runGenDevGui.py 871 B
Newer Older
Gino Tosti's avatar
Gino Tosti committed
from GenDevice import acsUtils, genDeviceGui

import os,sys

if __name__ =="__main__":
	pwd=os.getcwd()
	gendir=os.environ["PYGEN"]
	if gendir=="":
		print ("Please set the env variable PYGEN = the Geneartor root directory")
		exit()  
	if  not acsUtils.checkACS():
		print ("ACS Enviroment is not set")
		exit()
	introot = os.environ["INTROOT"]
	if introot=="":
		print("INTROOT variable is not set")
		exit()
	
	os.chdir(gendir)
	window=genDeviceGui.myWindow('Device Code Generator v1.0 by GT@astri')
	genDeviceGui.mainLoop(window)
	window.close()
	os.chdir(pwd)
	"""	
	    command ="make install"
	    if execACSCommand(command):
	       print ("ERROR executing: ",command)
	       os.chdir(pwd)
	       exit()
	  os.chdir(pwd)
	  
	  command="cdbChecker"
	  if execACSCommand(command):
	    print ("ERROR executing: ",command)
	    exit()
	"""
	print ("ALL Done")