@@ -146,6 +146,9 @@ def main():
146146 create_dir (os .path .join (installer_path_exec , "scripts" ))
147147 create_dir (os .path .join (installer_path_exec , "aslib" ))
148148
149+ shutil .copyfile (version_file_src , os .path .join (
150+ installer_path_exec , "VERSION" ))
151+
149152 shutil .copytree (os .path .join (installer_path , "share" ),
150153 os .path .join (installer_path_exec , "share" ), dirs_exist_ok = True )
151154
@@ -180,8 +183,10 @@ def main():
180183 Fore .RED + "[Error] dynamic linker/loader can not be determined!" + Style .RESET_ALL )
181184 exit (- 3 )
182185
186+ ld_exec = ld_execs [0 ]
187+
183188 ret = run_command_interactive (
184- ["patchelf" , "--set-interpreter" , f"./lib/{ ld_execs [ 0 ] } " , exemain_src ])
189+ ["patchelf" , "--set-interpreter" , f"./lib/{ ld_exec } " , exemain_src ])
185190 if (ret != 0 ):
186191 print (
187192 Fore .RED + "[Error] patchelf error!" + Style .RESET_ALL )
@@ -201,10 +206,12 @@ def main():
201206
202207 print (Fore .GREEN + ">> Deployment finished..." + Style .RESET_ALL )
203208
204- ld_path = os .path .join (installer_path_exec , "lib" , ld_execs [ 0 ] )
209+ ld_path = os .path .join (installer_path_exec , "lib" , ld_exec )
205210 if (os .access (ld_path , os .X_OK ) == False ):
206- print (Fore .YELLOW + f"[Warn] {
207- ld_execs [0 ]} has no executable permission! You should set it for running a deployed program!" + Style .RESET_ALL )
211+ print (Fore .YELLOW + f"[Warn] { ld_exec } has no executable permission! You should set it for running a deployed program!" + Style .RESET_ALL )
212+
213+ with open (os .path .join (installer_path_exec , "LD_PATH" ), "w" ) as ld_file :
214+ ld_file .write (ld_exec )
208215
209216 exit (0 )
210217
0 commit comments