| 
									
										
										
										
											2016-02-01 14:19:29 -05:00
										 |  |  | class Keg | 
					
						
							| 
									
										
										
										
											2016-09-20 17:37:08 -04:00
										 |  |  |   def change_dylib_id(id, file) | 
					
						
							| 
									
										
										
										
											2016-09-22 14:36:24 -04:00
										 |  |  |     @require_relocation = true | 
					
						
							| 
									
										
										
										
											2016-09-20 17:37:08 -04:00
										 |  |  |     puts "Changing dylib ID of #{file}\n  from #{file.dylib_id}\n    to #{id}" if ARGV.debug? | 
					
						
							|  |  |  |     MachO::Tools.change_dylib_id(file, id, strict: false) | 
					
						
							|  |  |  |   rescue MachO::MachOError | 
					
						
							|  |  |  |     onoe <<-EOS.undent
 | 
					
						
							|  |  |  |       Failed changing dylib ID of #{file} | 
					
						
							|  |  |  |         from #{file.dylib_id} | 
					
						
							|  |  |  |           to #{id} | 
					
						
							|  |  |  |     EOS | 
					
						
							|  |  |  |     raise | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   def change_install_name(old, new, file) | 
					
						
							| 
									
										
										
										
											2016-09-22 14:36:24 -04:00
										 |  |  |     @require_relocation = true | 
					
						
							| 
									
										
										
										
											2016-09-20 17:37:08 -04:00
										 |  |  |     puts "Changing install name in #{file}\n  from #{old}\n    to #{new}" if ARGV.debug? | 
					
						
							|  |  |  |     MachO::Tools.change_install_name(file, old, new, strict: false) | 
					
						
							|  |  |  |   rescue MachO::MachOError | 
					
						
							|  |  |  |     onoe <<-EOS.undent
 | 
					
						
							|  |  |  |       Failed changing install name in #{file} | 
					
						
							|  |  |  |         from #{old} | 
					
						
							|  |  |  |           to #{new} | 
					
						
							|  |  |  |     EOS | 
					
						
							|  |  |  |     raise | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2016-02-01 14:19:29 -05:00
										 |  |  | end |