@@ -55,7 +55,7 @@ def initialize(self, version, build_data):
5555 current_os = platform .system ().lower ()
5656 arch = platform .machine ().lower ()
5757 print (f"OS: { current_os } , arch: { arch } " )
58- lua_dir = os .path .join (os .path .dirname (__file__ ), "lua" )
58+ lua_dir = os .path .join (os .path .dirname (__file__ ), "python_lua_helper" , " lua" )
5959 # Build lua for linux
6060 lua_version = "5.4.8"
6161 lua_src = f"lua-{ lua_version } .tar.gz"
@@ -115,25 +115,18 @@ def initialize(self, version, build_data):
115115 print (
116116 f"Windows detected (architecture: { arch } ) - selecting pre-built Lua binary..."
117117 )
118- try :
119- if arch in ["x86_64" , "amd64" ]:
120- source_binary = os .path .join (lua_dir , "lua-windows-x86_64" )
121- target_binary = os .path .join (lua_dir , "lua.exe" )
122- elif arch in ["i686" , "x86" ]:
123- source_binary = os .path .join (lua_dir , "lua-windows-i686" )
124- target_binary = os .path .join (lua_dir , "lua.exe" )
125- else :
126- print (
127- f"Warning: Unsupported Windows architecture '{ arch } ' - no Lua binary available"
128- )
129- return
130- if os .path .exists (source_binary ):
131- shutil .copy2 (source_binary , target_binary )
132- print (f"Copied { source_binary } to { target_binary } " )
133- else :
134- print (f"Warning: Source binary not found at { source_binary } " )
135- except Exception as e :
136- print (f"Error copying Lua binary: { e } " )
118+ target_binary = os .path .join (lua_dir , "lua.exe" )
119+ if arch in ["x86_64" , "amd64" ]:
120+ source_binary = os .path .join (lua_dir , "lua-windows-x86_64" )
121+ elif arch in ["i386" , "i586" , "i686" , "x86" ]:
122+ source_binary = os .path .join (lua_dir , "lua-windows-i686" )
123+ else :
124+ print (
125+ f"Warning: Unsupported Windows architecture '{ arch } ' - no Lua binary available"
126+ )
127+ return
128+ shutil .copy2 (source_binary , target_binary )
129+ print (f"Copied { source_binary } to { target_binary } " )
137130 else :
138131 print (
139132 f"Warning: Unsupported operating system '{ current_os } ' - no Lua binary available"
0 commit comments