# -*- coding:utf-8 -*- import os SDK_MAIN = "/opt/mixsdk" SDK_CONFIG = "%s/sdk_config"%SDK_MAIN SDK_LOG = "/opt/package_log" SDK_SCRIPT = "%s/script2.0"%SDK_MAIN #socket常量 CONNECTFILE = '%s/cutsdk'%SDK_SCRIPT LOCKFILE = '%s/lockFile'%SDK_SCRIPT IGNORE_PACKAGE_PATH = "com/yyrh" SDK_CHANNEL_ID = "channel_id" 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" def getSdkMain(): return SDK_MAIN def getSdkConfig(): return SDK_CONFIG def getSdkScript(): return SDK_SCRIPT def getSdkLog(): return SDK_LOG def getConnectFile(): return CONNECTFILE def getLockFilePath(): return LOCKFILE def getIgnorePackagePath(): return IGNORE_PACKAGE_PATH def getSdkChannelid(): return SDK_CHANNEL_ID def getAapt2ToolPath(): return "%s/tool/Android/Sdk/build-tools/28.0.3/aapt2"%SDK_MAIN def getSdkNotifyUrl(): if(getIp() == "10.255.3.8"): return SDK_NOTIFY_TEST_URL else: return SDK_NOTIFY_URL def getSdkSpNotifyUrl(): if(getIp() == "10.255.3.8"): return SDK_SP_NOTIFY_TEST_URL else: return SDK_SP_NOTIFY_URL def getIp(): 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(getIp() == "10.255.3.8"): return True else: return False