"""
Q7Z: P7Zip GUI
Designed by Chris Giles

File:		Import.py
Purpose:	Importation handler
"""


### Imports

# Python
try :
	import	sys
except :
	#slException( "Python" )

	print ""
	print "Error: The required 'Python' modules could not be found.  See 'Doc/INSTALL.txt' for more info."
	print ""

	sys.exit()

# Q7Z
#import	Settings


# Exception
def slException( sAppName ) :

	print ""
	print "Error: The required '" + sAppName + "' modules could not be found.  See 'Doc/INSTALL.txt' for more info."
	print ""

	# Q7Z
	if sAppName == "Q7Z" :
	#if sAppName == Settings.Application.sName :
		print "You must run \"cd ../Build/ ; make ; cd ../Source/\" first."
		print ""

	sys.exit()


# PyQt4
try :
	from	PyQt4	import QtCore
except :
	Import.slException( "PyQt4" )


### Variables

# Visibility
Init				= QtCore.QObject()


### Slots

# Visibility
def slInvisible() :

	# Supplied arguments
	return ( len(sys.argv) >= 3 and "i" in sys.argv[1] )
	"""
	if len(sys.argv) >= 3 and "i" in sys.argv[1] :
			Init.bInvisible = True
	"""


### Execution

Init.bInvisible = slInvisible()
