import os SDK_NOTIFY_URL = "gamesdk.yyxxgame.com:9001/api/update_gcp_resource_msg/run" SDK_SP_NOTIFY_URL = "gamesdk.yyxxgame.com:9001/api/update_sp_resource_msg/run" SDK_NOTIFY_TEST_URL = "testgamesdk.yyxxgame.com/api/update_gcp_resource_msg/run" SDK_SP_NOTIFY_TEST_URL = "testgamesdk.yyxxgame.com/api/update_sp_resource_msg/run" IGNORE_PACKAGE_PATH = "cn/yyxx" # 本地输出目录,正式打包机需改为"/opt/new_packing_tool/output" OUT_PUT_DIR = "/Users/kaiweicai/Documents/Project/PackKit/YYXXPackKit/output" SP_OUT_PUT_DIR = "/Users/kaiweicai/Documents/Project/PackKit/YYXXPackKit/sp_output" IS_USE_AAPT2 = True IS_USE_APK_V2_SIGN =False def get_notify_url(): if get_local_ip() == "10.255.3.8": return SDK_NOTIFY_TEST_URL else: return SDK_NOTIFY_URL def get_sp_notify_url(): if get_local_ip() == "10.255.3.8": return SDK_SP_NOTIFY_TEST_URL else: return SDK_SP_NOTIFY_URL def get_out_put_dir(): return OUT_PUT_DIR def get_local_ip(): ip = os.popen("/sbin/ifconfig | grep 'inet addr' | awk '{print $2}'").read() ip = ip[ip.find(':') + 1:ip.find('\n')] return ip