如何更新使用Python制造的软件?
免责声明:我仍在学习,是Python的新手,所以我对Python的了解少于大多数编码器。
我正在制作一个简单的桌面应用程序,并且已经在 .exe .exe 中文件格式。
如何将更新发送给拥有该应用程序的人?
我在想,当用户打开文件时,我是否可以从网站(例如Pastebin)加载一些GitHub代码或原始代码,以便每次他们一次打开我的应用程序,他们具有最新版本。我基本上是从GitHub存储库和Python代码中对其进行更新的,它只会从Github加载文件,因此我可以像大多数桌面应用程序一样进行更改(Steam,Spotify,Microsoft,Microsoft Apps,Adobe Apps等)。我可以进一步解释我是否没有意义。
这是可能的吗?
Disclaimer: I am still learning and am new to python so I have less knowledge of python than most coders.
I am making a simple desktop app and it is already in .exe file format.
How can I send updates to people who have the app?
I was thinking if I could load some GitHub code or raw code from a website (like Pastebin) when a user opens the file so that every time they open my app they have the latest version of it. I am basically updating it from the GitHub repository and in the python code, it only loads the file from GitHub so I can make changes like most desktop apps (Steam, Spotify, Microsoft Apps, Adobe apps etc). I can explain further if I don't make sense.
Is this possible? If so how can I do this? Are there any ways?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将必须拥有一个不同的网站,上面有当前版本。我通常要更新的事情是我在某个地方存储了一个.html文件(例如Dropbox),并且程序检查是否为.html的内容(文件中没有实际的HTML,只有版本号)与其版本字符串匹配,以及是否匹配。不,它将HTML文件中的版本编号附加到字符串(EG example.com/version-1.0.0,1.0.0是已添加的版本)并下载。
您可以使用
urllib
进行HTML请求,并使用请求
下载文件。You would have to have a different website that has the current version on it. What I usually do for updating is I have a .html file stored somewhere (e.g. DropBox) and the program checks if that .html's contents (no actual HTML in the file, just the version number) match with its version string, and if it doesn't, it appends the version number in the HTML file to a string (e.g. example.com/version-1.0.0, 1.0.0 being the version appended) and downloads that.
You can do HTML requests with
urllib
and download files withrequests
.