mirror of
				https://github.com/hedge-dev/XenonRecomp.git
				synced 2025-10-30 07:11:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			684 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			684 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "pch.h"
 | |
| #include "test_recompiler.h"
 | |
| 
 | |
| int main(int argc, char* argv[])
 | |
| {
 | |
|     const char* path = 
 | |
|     #ifdef CONFIG_FILE_PATH
 | |
|         CONFIG_FILE_PATH
 | |
|     #else
 | |
|         argv[1]
 | |
|     #endif
 | |
|         ;
 | |
| 
 | |
|     if (std::filesystem::is_regular_file(path))
 | |
|     {
 | |
|         Recompiler recompiler;
 | |
|         recompiler.LoadConfig(path);
 | |
|         recompiler.Analyse();
 | |
| 
 | |
|         auto entry = recompiler.image.symbols.find(recompiler.image.entry_point);
 | |
|         if (entry != recompiler.image.symbols.end())
 | |
|         {
 | |
|             entry->name = "_xstart";
 | |
|         }
 | |
| 
 | |
|         recompiler.Recompile();
 | |
|     }
 | |
|     else
 | |
|     {
 | |
|         TestRecompiler::RecompileTests(path, argv[2]);
 | |
|     }
 | |
| 
 | |
|     return 0;
 | |
| }
 | 
