构建可以在Windows和OS X上运行的.NET应用程序的安装程序? [英] Build an installer for .NET app that can run on Windows and OS X?

查看:151
本文介绍了构建可以在Windows和OS X上运行的.NET应用程序的安装程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很惊讶,我找不到这个问题已经问了,所以如果我错过了,请立即通知。



我需要写一个非常小的,相当简单的.NET中的应用程序将由终端用户下载并安装在其系统上。 Silverlight的沙箱模型将无法正常工作 - 它必须是一个完整的下载安装的可执行文件。



这是我知道的:




  • 我已经开发了在受控桌面环境中运行的应用程序 - 例如,运行在一百台内部计算机上的IT应用程序。

  • 我开发了使用Mono的应用程序



我不知道:




  • 如何创建一个灵活而强大的安装程序,可以在无数台桌面配置和环境中工作。

  • 如何使用针对Mac的Mono OSX。

  • 安装广泛分布的最终用户应用程序以及如何减轻其中的常见问题是什么?



我正在寻找最佳资源来填补我的知识空白


相关



等效于OSX与Windows的Windows服务



解决方案

对于Windows,请考虑 Windows Installer XML(WiX )。对于OSX,您需要生成.app包。 以下是使用 Monobjc 项目。



以下是您将面临的一些主要问题:



在Windows上:




  • 您的安装程序必须检测
    以前/旧版本和
    关闭/卸载/迁移为
    适当。 NSIS和WiX都有
    机制。

  • 您的安装程序/应用程序必须是
    与不同版本的
    兼容Windows(XP,Vista) ,7)和不同的
    版本的.NET(2.0,3.0,3.5
    ,最终)。实际测试是

    面对的更繁琐的任务之一。我强烈建议为此提供一个
    的一个干净的虚拟机
    图像。



在OSX上: / p>


  • 您最有可能要发送独立的应用程序包,这意味着mono会在.app中捆绑。这将为您的可分发添加约50MB。

  • 您将不得不引用Monobjc的不同版本来支持OSX 10.4和10.5,您将需要配置您的构建以执行此操作,以及测试两个版本。

  • 确保您的c#代码不使用Windows / .NET特定的调用,方法是运行rel =noreferrer> Mono Migration Analyzer(MoMA)在您的代码库。



升级: p>

您没有提到如何计划提供升级。 NSIS和WiX有能力处理升级。在部署初始版本之前,请确保您的构建版本控制方案已经完成。在OSX上,Monobjc可以与 Sparkle 集成。


I am surprised I could not find this question already asked, so if I simply missed it please notify promptly.

I need to write a very small, fairly simple application in .NET that will be downloaded by end-consumers and installed on their system. Silverlight's sandbox model will not work - it has to be a full-on downloaded, installed executable.

Here's what I know:

  • I've developed applications which run in a controlled desktop environment - for example, an IT app that runs on a hundred internal computers.
  • I've developed applications using Mono

What I do not know:

  • How to create a flexible, robust installer that will work on a myriad of uncontrolled desktop configurations and environments.
  • How to do the same with Mono targeted for Mac OSX.
  • What are the common issues in installing a widely-distributed end-user application and how to mitigate them?

I am looking for the best resources to fill in my knowledge gaps.

Related

Equivalent of a Windows Service on OSX with Mono

解决方案

For Windows, consider Windows Installer XML (WiX). For OSX, you need to generate a .app bundle. Here is an example using the nant tasks included with the Monobjc project.

Here are some of the major issues you will face:

On Windows:

  • Your installer will have to detect previous/old versions and close/uninstall/migrate as appropriate. Both NSIS and WiX have mechanisms for this.
  • Your installer/app will have to be compatible with different versions of Windows (XP, Vista, 7), and different versions of .NET (2.0, 3.0, 3.5 eventually). Actually testing this is one of the more tedious tasks you face. I strongly recommend having a handful of clean virtual machine images around for this.

On OSX:

  • You will most likely want to ship a standalone application bundle, meaning mono will be bundled within your .app. This will add ~50mb to your distributable.
  • You will have to reference different versions of Monobjc to support OSX 10.4 and 10.5, you will need to configure your build to do this, as well as test both versions.
  • Make sure that your c# code isn't using Windows/.NET specific calls by running the Mono Migration Analyzer (MoMA) on your codebase.

Upgrading:

You haven't mentioned how you plan to offer upgrades. NSIS and WiX have the capability to handle upgrades. Make sure you have your build versioning scheme worked out before your deploy the initial version. On OSX, Monobjc can integrate with Sparkle.

这篇关于构建可以在Windows和OS X上运行的.NET应用程序的安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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