Example #1
0
        // "%~dp0Update.exe" "[CONFIG]https://git.oschina.net/joymeng/apkTool/raw/master/files/updateFiles.txt" "E:\tmp2\Update_Files\\" "渠道计费包\0000001\\"
        /// <summary>
        /// 调用Update.exe,更新以perfix为前缀的配置文件
        /// </summary>
        public static void updateFiles(string perfix)
        {
            string update_EXE = curDir() + "tools\\" + "Update.exe";
            //string url0 = "https://git.oschina.net/joymeng/apkTool/raw/master/files/updateFiles.txt";
            string url0 = Update.apkMd5Url;
            string url  = "[CONFIG]" + url0;
            string path = ToolSetting.Instance().serverRoot;

            // 设置"渠道计费包\0000001\\"为默认渠道配置
            string configInfo = WebSettings.getWebData(url0);    // 获取更新配置信息 示例:scimence( Name1(6JSO-F2CM-4LQJ-JN8P) )scimence

            if (configInfo.Equals(""))
            {
                return;
            }
            if (!configInfo.Contains(perfix) && !configInfo.Contains(perfix.Replace("\\", "/")))
            {
                perfix = @"渠道计费包/0000001/->" + perfix;
            }

            url        = AddQuotation(url);
            path       = AddQuotation(path);
            perfix     = AddQuotation(perfix);
            update_EXE = AddQuotation(update_EXE);

            // 调用更新插件执行软件更新逻辑
            String arg = url + " " + path + " " + perfix;

            System.Diagnostics.Process.Start(update_EXE, arg);
        }
Example #2
0
        /// <summary>
        /// 在线获取网游,渠道列表信息
        /// </summary>
        public static Dictionary <String, String> getChannelList(Cmd.Callback call = null)
        {
            string url = "http://netunion.joymeng.com/index.php?m=Api&c=PackTool&a=channelList";

            if (call != null)
            {
                call("【I】 联网获取渠道列表信息...\r\n" + url);
            }
            string str = WebSettings.getWebData(url);

            if (str.Equals(""))
            {
                if (call != null)
                {
                    call("【E】 联网获取渠道列表信息失败!请点击链接查看网络是否正常");
                }
                return(new Dictionary <string, string>());
            }
            else
            {
                channelList_Data iteam = channelList_Data.Parse(str);

                if (call != null)
                {
                    call("【I】 获取渠道列表信息完成");
                }

                return(iteam.data);
            }
        }
Example #3
0
        /// <summary>
        /// 获取.keystore签名对应的alias和password信息
        /// </summary>
        public static String[] getKestoreInfo(String keysotreName)
        {
            String InfoPath = Form1.SinPath() + "\\" + "keystoreInfo.txt";
            string data     = "";

            // 若keystore对应的信息记录文件不存在、或无此签名则提示输入并记录
            if (!File.Exists(InfoPath))
            {
                new InputForm_keyStore(keysotreName, InfoPath).ShowDialog();
            }
            else
            {
                data = FileProcess.fileToString(InfoPath);
                if (data.Equals(""))
                {
                    new InputForm_keyStore(keysotreName, InfoPath).ShowDialog();
                }
            }

            // 读取keystoreName对应的签名配置信息
            data = FileProcess.fileToString(InfoPath);
            string SotreInfo = WebSettings.getNodeData(data, keysotreName, false);
            String alias     = WebSettings.getNodeData(SotreInfo, "alias", true);
            String password  = WebSettings.getNodeData(SotreInfo, "password", true);

            return(new String[] { alias, password });
        }