import os from print_log import printlog 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" # 本地输出目录,正式打包机需改为"/opt/new_packing_tool/output" # out_put_dir = "/Users/kaiweicai/Documents/Project/PackKit/YYXXPackKit/output" //本地测试 out_put_dir = "/opt/new_packing_tool/output" sp_out_put_dir = "/opt/new_packing_tool/sp_output" # 打包日志输出目录,正式打包机需改为"/opt/package_log" sdk_log_path = "/opt/package_log" is_use_aapt2 = True is_use_apk_v2_sign = False # 本地java目录,正式打包机需改为对应绝对路径 key_tool_path = "/usr/java/jdk-12.0.1/bin/keytool" jar_signer_tool_path = "/usr/java/jdk-12.0.1/bin/jarsigner" javac_path = "/usr/java/jdk-12.0.1/bin/javac" ignore_package_path = "com/yyrh" tool_jar_home = "/opt/mixsdk/tool/tool_jar" channel_sdk_path = "/opt/mixsdk/channelsdk" ad_sdk_path = "/opt/mixsdk/adsdk" 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_local_ip(): ip = os.popen("/sbin/ifconfig | grep 'inet addr' | awk '{print $2}'").read() ip = ip[ip.find(':') + 1:ip.find('\n')] return ip def isTestEnvironment(): if get_local_ip() == "10.255.3.8": return True else: return False