修改程序逻辑,准备批量打包
This commit is contained in:
1 parent
aab73b978f
commit
55528e5109
30 files changed
+297
-150
No files matched your search
@@ -320,7 +320,7 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
|
||||
// while (true)
|
||||
{
|
||||
string updatefilepath = System.Environment.CurrentDirectory + "\\Update.exe";
|
||||
var url = BaseClass.BuildObjString("update/get_update");
|
||||
var url = BaseClass.BuildDefaultObjString("update/get_update_new");
|
||||
var data = UserLogin.GetSignaturex();
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
@@ -329,8 +329,10 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
|
||||
var updateExeChk = BaseRegex.GetStringJson(ref html, "exe_check").ParseToString();
|
||||
var updateExeAddress = BaseRegex.GetStringJson(ref html, "exe_address");
|
||||
var updateFileAddress = BaseRegex.GetStringJson(ref html, "file_address");
|
||||
updateFileAddress = updateFileAddress.Replace("/Update", "/Update" + BaseClass.MainPath);
|
||||
var newVersion = BaseRegex.GetIntJson(ref html, "next_version").ParseToInt();
|
||||
|
||||
|
||||
if (File.Exists(updatefilepath))
|
||||
{
|
||||
string fc = BaseClass.GetFileMd5(updatefilepath);
|
||||
@@ -348,13 +350,13 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
|
||||
{
|
||||
if (File.Exists(updatefilepath))
|
||||
{
|
||||
File.WriteAllText(System.Environment.CurrentDirectory + "\\UpdateConfig.ini",
|
||||
"TemuKJD\r\n" +
|
||||
BaseClass.VersionCount + "\r\n" +
|
||||
newVersion + "\r\n" +
|
||||
updateFileAddress);
|
||||
string fileName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
|
||||
|
||||
Process.Start(updatefilepath);
|
||||
string arguments = "-" + fileName + "\r\n" + BaseClass.VersionCount + "\r\n" + newVersion + "\r\n" + updateFileAddress;
|
||||
|
||||
File.WriteAllText(System.Environment.CurrentDirectory + "\\UpdateConfig.ini", arguments);
|
||||
|
||||
Process.Start(updatefilepath, arguments);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in new issue
Block a user