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" # 本地输出目录,正式打包机需改为"/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 = "/Users/kaiweicai/Documents/Project/PackKit/YYXXPackKit/sp_output" # 打包日志输出目录,正式打包机需改为"/opt/package_log" SDK_LOG = "/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" ZIPALIGN_PATH = "/opt/mixsdk/tool/Android/Sdk/build-tools/28.0.3/zipalign" SDK_CHANNEL_PATH = "/opt/mixsdk/script2.0/V2/channel" SDK_BASE_ABS_PATH = "/opt/mixsdk/script2.0" def get_notify_url(): if isTestEnvironment: return SDK_NOTIFY_TEST_URL else: return SDK_NOTIFY_URL def get_sp_notify_url(): if isTestEnvironment: 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 def isTestEnvironment(): if get_local_ip() == "10.255.3.8": return True else: return False