是否可以在Github上提供ClickOnce安装程序? [英] Is it possible to offer a ClickOnce installer on Github?

查看:201
本文介绍了是否可以在Github上提供ClickOnce安装程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以为项目创建ClickOnce安装程序,然后在GitHub上(通过下载页面)托管安装文件夹?



我猜默认的ClickOnce将安装文件发布到一个我认为在Github下载页面不支持的子文件夹中,但也许有另一种方式。

p>是的,你可以。



实际上,我认为这是一种比FTP更方便的方式。 b $ b

  • 确保您的Git设置为按原样提交,这样您就可以避免一些签名问题。

  • 将您的ClickOnce应用程序发布到git中的目录存储库(你可能需要另一个分支),将Github上的原始URL作为下载/更新URL。例如。对于存储库xxx,分支master,用户vilic的目录clickonce,URL应该是https://raw.github.com/vilic/xxx/master/clickonce/。

  • 提交并推送您的应用程序。

  • 顺便说一下,您将能够下载exe文件,检查并下载更新,因为您直接使用raw.github.com。但是,您可能无法从浏览器打开xml文件,因为xml文件的MIME类型为text / plain。但我认为你可以尝试使用Github Pages来构建这个服务器,它应该使用正确的MIME类型。


    I'm wondering if you can create a ClickOnce installer for a project and then host the installation folder on GitHub (via the downloads page)?

    I guess by default ClickOnce publishes the installation files to a subfolder which I think is not supported on the Github downloads page but maybe there is another way.

    解决方案

    Yes you can.

    And actually I think it's a more convenient way comparing to FTP.

    1. Make sure your Git is set to "commit as-is", so that you can avoid some signature issues.
    2. Publish your ClickOnce application to a directory in your git repository (you may want another branch for that) with the url of raw on Github as the download/update url. E.g. for repository "xxx", branch "master", directory "clickonce" of user "vilic", the url should be "https://raw.github.com/vilic/xxx/master/clickonce/"
    3. Commit and push your application.

    BTW, you will be able to download exe file and the application is able to check and download update as you are directly using raw.github.com. However, you may not open the xml file from your browser because the MIME type of xml file would be "text/plain". But I think you can try to use Github Pages to build this server, which should response with the right MIME type.

    这篇关于是否可以在Github上提供ClickOnce安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆