contants.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import os
  2. from print_log import printlog
  3. sdk_notify_url = "gamesdk.yyxxgame.com:9001/api/update_gcp_resource_msg/run"
  4. sdk_sp_notify_url = "gamesdk.yyxxgame.com:9001/api/update_sp_resource_msg/run"
  5. sdk_notify_test_url = "testgamesdk.yyxxgame.com/api/update_gcp_resource_msg/run"
  6. sdk_sp_notify_test_url = "testgamesdk.yyxxgame.com/api/update_sp_resource_msg/run"
  7. # 本地输出目录,正式打包机需改为"/opt/new_packing_tool/output"
  8. # out_put_dir = "/Users/kaiweicai/Documents/Project/PackKit/YYXXPackKit/output" //本地测试
  9. out_put_dir = "/opt/new_packing_tool/output"
  10. sp_out_put_dir = "/opt/new_packing_tool/sp_output"
  11. # 打包日志输出目录,正式打包机需改为"/opt/package_log"
  12. sdk_log_path = "/opt/package_log"
  13. is_use_aapt2 = True
  14. is_use_apk_v2_sign = False
  15. # 本地java目录,正式打包机需改为对应绝对路径
  16. key_tool_path = "/usr/java/jdk-12.0.1/bin/keytool"
  17. jar_signer_tool_path = "/usr/java/jdk-12.0.1/bin/jarsigner"
  18. javac_path = "/usr/java/jdk-12.0.1/bin/javac"
  19. ignore_package_path = "com/yyrh"
  20. tool_jar_home = "/opt/mixsdk/tool/tool_jar"
  21. channel_sdk_path = "/opt/mixsdk/channelsdk"
  22. ad_sdk_path = "/opt/mixsdk/adsdk"
  23. def get_notify_url():
  24. if get_local_ip() == "10.255.3.8":
  25. return sdk_notify_test_url
  26. else:
  27. return sdk_notify_url
  28. def get_sp_notify_url():
  29. if get_local_ip() == "10.255.3.8":
  30. return sdk_sp_notify_test_url
  31. else:
  32. return sdk_sp_notify_url
  33. def get_local_ip():
  34. ip = os.popen("/sbin/ifconfig | grep 'inet addr' | awk '{print $2}'").read()
  35. ip = ip[ip.find(':') + 1:ip.find('\n')]
  36. return ip
  37. def isTestEnvironment():
  38. if get_local_ip() == "10.255.3.8":
  39. return True
  40. else:
  41. return False