Comments (3)
你调用的参数贴出来看看
from generalupdate.
你调用的参数贴出来看看
public GeneralClientBootstrap Config(string url, string appSecretKey, string appName = "GeneralUpdate.Upgrade")
{
if (string.IsNullOrEmpty(url)) throw new Exception("Url cannot be empty !");
try
{
string basePath = System.Threading.Thread.GetDomain().BaseDirectory;
Packet.InstallPath = basePath;
Packet.AppSecretKey = appSecretKey;
//update app.
Packet.AppName = appName;
string clienVersion = GetFileVersion(Path.Combine(basePath, $"{Packet.AppName}.exe"));
Packet.ClientVersion = clienVersion;
Packet.AppType = AppType.UpgradeApp;
Packet.UpdateUrl = $"{url}/versions/{AppType.UpgradeApp}/{clienVersion}/{Packet.AppSecretKey}";
//main app.
string mainAppName = Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().MainModule.FileName);
string mainVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
Packet.MainUpdateUrl = $"{url}/versions/{AppType.ClientApp}/{mainVersion}/{Packet.AppSecretKey}";
Packet.MainAppName = mainAppName;
return this;
}
catch (Exception ex)
{
throw new GeneralUpdateException<ExceptionArgs>(ex.Message, ex.InnerException);
}
}
这是源代码的调用参数,用的是默认的Packet.AppType = AppType.UpgradeApp;这个参数传递到
switch (appType)
{
case AppType.ClientApp:
Process.Start(path, Packet.ProcessBase64);
Process.GetCurrentProcess().Kill();
break;
case AppType.UpgradeApp:
Process.Start(path);
break;
}
是无法成功唤起升级程序的,使用默认参数的情况下,只有更改此处才能正确启动升级程序
from generalupdate.
谢谢提交issue该问题已修复,可能是之前的PR修改错误了。
from generalupdate.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generalupdate.