generate-mas-config.py 470 B

1234567891011121314151617
  1. import sys
  2. def main(is_mas_build, out_file):
  3. is_mas_num = 0
  4. if is_mas_build:
  5. is_mas_num = 1
  6. with open(out_file, 'w', encoding="utf-8") as f:
  7. content = ''
  8. content += '#ifndef ELECTRON_GEN_MAS_BUILD_H_\n'
  9. content += '#define ELECTRON_GEN_MAS_BUILD_H_\n'
  10. content += '#define IS_MAS_BUILD() ' + str(is_mas_num) + '\n'
  11. content += '#endif\n'
  12. f.write(content)
  13. if __name__ == '__main__':
  14. sys.exit(main(sys.argv[1] == "true", sys.argv[2]))