contants.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import os
  2. SDK_NOTIFY_URL = "gamesdk.yyxxgame.com:9001/api/update_gcp_resource_msg/run"
  3. SDK_SP_NOTIFY_URL = "gamesdk.yyxxgame.com:9001/api/update_sp_resource_msg/run"
  4. SDK_NOTIFY_TEST_URL = "testgamesdk.yyxxgame.com/api/update_gcp_resource_msg/run"
  5. SDK_SP_NOTIFY_TEST_URL = "testgamesdk.yyxxgame.com/api/update_sp_resource_msg/run"
  6. IGNORE_PACKAGE_PATH = "cn/yyxx"
  7. # 本地输出目录,正式打包机需改为"/opt/new_packing_tool/output"
  8. OUT_PUT_DIR = "/Users/kaiweicai/Documents/Project/PackKit/YYXXPackKit/output"
  9. SP_OUT_PUT_DIR = "/Users/kaiweicai/Documents/Project/PackKit/YYXXPackKit/sp_output"
  10. IS_USE_AAPT2 = True
  11. IS_USE_APK_V2_SIGN =False
  12. def get_notify_url():
  13. if get_local_ip() == "10.255.3.8":
  14. return SDK_NOTIFY_TEST_URL
  15. else:
  16. return SDK_NOTIFY_URL
  17. def get_sp_notify_url():
  18. if get_local_ip() == "10.255.3.8":
  19. return SDK_SP_NOTIFY_TEST_URL
  20. else:
  21. return SDK_SP_NOTIFY_URL
  22. def get_out_put_dir():
  23. return OUT_PUT_DIR
  24. def get_local_ip():
  25. ip = os.popen("/sbin/ifconfig | grep 'inet addr' | awk '{print $2}'").read()
  26. ip = ip[ip.find(':') + 1:ip.find('\n')]
  27. return ip