예제 #1
0
		continue
	
	# append all requested .as files
	cmd += sys.argv[i] + " "
	
	file_list = files.search(sys.argv[i])
	
	for file in file_list:
		mod_date = os.path.getmtime(file)
		build_required = build_required or mod_date >= outfile_mod_date
	
	i = i + 1

# only continue if we need to
if build_required:
	colors.printf("r", outfile + ":")
	colors.println("d", "\tbuild required...")
else:
	colors.printf("g", outfile + ":")
	colors.println("d", "\tup to date...")
	exit()

# a small hack for asc.jar to navigate back to the correct working directory
# otherwise the output file wouldn't be placed correctly
dummy_file = open("dummy_file.as", "w")
dummy_file.close()

# invoke the ActionScript compiler
result = os.system(cmd + " dummy_file.as")

# remove the dummy file
예제 #2
0
outfile_mod_date = 0

# get the modification timestamps of the output files
if os.path.exists(outfile_cpp):
	outfile_mod_date = os.path.getmtime(outfile_cpp)
	
if os.path.exists(outfile_h):
	mod_date = os.path.getmtime(outfile_h)
	if mod_date > outfile_mod_date:
		outfile_mod_date = mod_date

gen_required = infile_mod_date >= outfile_mod_date

# only continue if we need to
if gen_required:
	colors.printf("r", infile + ":")
	colors.println("d", "\tglue generation required...")
else:
	colors.printf("g", infile + ":")
	colors.println("d", "\tup to date...")
	exit()

for i in range(2, len(sys.argv)):
	# append all imported .abc files
	cmd += sys.argv[i] + " "

# use the first argument as output filename
cmd += infile_abc

#if len(sys.argv) > 2:
#	cmd += " --native-id-namespace " + sys.argv[2] + " "
예제 #3
0
def build_config(config):
    colors.printf("d", "build the ")
    colors.printf("r", config)
    colors.println("d", " configuration? [y/n]")
    return raw_input("")