Просмотр исходного кода

correct a typo, implemented support to bytecode-generator

mikymod 12 лет назад
Родитель
Сommit
ac80435623
2 измененных файлов с 7 добавлено и 2 удалено
  1. 6 1
      tools/pycrown/Compiler.py
  2. 1 1
      tools/pycrown/Repository.py

+ 6 - 1
tools/pycrown/Compiler.py

@@ -23,7 +23,10 @@
 # OTHER DEALINGS IN THE SOFTWARE.
 
 import subprocess
+import os
 
+LUAJIT = "luajit-2.0.1"
+BC_G = "bytecode-generator.lua"
 TXT_C = "txt-compiler"
 TGA_C = "tga-compiler"
 LUA_C = "lua-compiler"
@@ -98,7 +101,9 @@ class Compiler:
 		if resource.endswith('.tga'):
 			p = subprocess.call([TGA_C, ROOT_P, root_path, DEST_P, self.m_dest_path, RES_IN, resource, SEED, str(self.m_perfect_seed)]);
 		if resource.endswith('.lua'):
-			p = subprocess.call([LUA_C, ROOT_P, root_path, DEST_P, self.m_dest_path, RES_IN, resource, SEED, str(self.m_perfect_seed)]);
+			path = os.path.normpath(root_path + "/" + resource)
+			f = subprocess.call([LUAJIT, BC_G, path]);
+			# p = subprocess.call([LUA_C, ROOT_P, root_path, DEST_P, self.m_dest_path, RES_IN, resource, SEED, str(self.m_perfect_seed)]);
 
 	
 

+ 1 - 1
tools/pycrown/Repository.py

@@ -32,7 +32,7 @@ LUA_EXTENSION = ('.lua')
 resource_extensions = ('.txt', '.tga', '.dae', '.lua')
 
 # Represents the folder containing the resources
-# Can filter resources by type and other useful suff
+# Can filter resources by type and other useful stuff
 class Repository:
 	def __init__(self, root_path):
 		self.m_root_path = root_path