build: make is_mas_build a generated header instead of config (#43737)
This commit is contained in:
		
					parent
					
						
							
								b83810982e
							
						
					
				
			
			
				commit
				
					
						c1c8fbfd9a
					
				
			
		
					 28 changed files with 601 additions and 306 deletions
				
			
		
							
								
								
									
										17
									
								
								script/generate-mas-config.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								script/generate-mas-config.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| import sys | ||||
| 
 | ||||
| def main(is_mas_build, out_file): | ||||
|   is_mas_num = 0 | ||||
|   if is_mas_build: | ||||
|     is_mas_num = 1 | ||||
|   with open(out_file, 'w', encoding="utf-8") as f: | ||||
|     content = '' | ||||
|     content += '#ifndef ELECTRON_GEN_MAS_BUILD_H_\n' | ||||
|     content += '#define ELECTRON_GEN_MAS_BUILD_H_\n' | ||||
|     content += '#define IS_MAS_BUILD() ' + str(is_mas_num) + '\n' | ||||
|     content += '#endif\n' | ||||
| 
 | ||||
|     f.write(content) | ||||
| 
 | ||||
| if __name__ == '__main__': | ||||
|   sys.exit(main(sys.argv[1] == "true", sys.argv[2])) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Samuel Attard
				Samuel Attard