简体   繁体   English

如何使用户易于安装我的软件? 编程语言重要吗?

[英]How to make it easy for users to install my software? Does the programming language matter?

I'm a beginner to intermediate programmer and I've learned some java and C#. 我是中级程序员的初学者,我已经学习了一些Java和C#。 I want to start thinking about making some simple programs that I can release to the world. 我想开始考虑制作一些可以发布给全世界的简单程序。 Just some basic stuff like calendar software that will probably be free. 日历软件等一些基本内容可能是免费的。 Users want the install process to be quick and easy. 用户希望安装过程快速简便。 To install a java program, I have to tell them to have java installed. 要安装Java程序,我必须告诉他们已经安装了Java。 To install a C# program, I have to tell them to have .NET installed. 要安装C#程序,我必须告诉他们已安装.NET。 I'm worried this might put off some potential users who just want to double click an exe file, choose a directory and be pretty much done. 我担心这会推迟一些只想双击exe文件,选择目录并完成很多工作的潜在用户。

So, I guess this is an either/or two part question: 因此,我想这是一个或两个部分的问题:

1) Is there a programming language that makes it easier to set up an installer without requiring users to have other stuff installed? 1)是否有一种编程语言,可以使安装程序的安装更加轻松,而无需用户安装其他内容?

or: 要么:

2) Is there some way to set up an installer that checks the system to see if it has java/.NET/whatever, and then includes java/.Net/whatever in the installation if it's not already there? 2)是否可以通过某种方式设置安装程序,以检查系统是否具有java / .net / whatever,然后在安装中包含java / .net / whatever(如果尚未安装)?

With .NET if you grab your build version of the exe (and dlls and stuff that you need) and then use http://www.advancedinstaller.com/ to package them into an MSI. 如果使用.NET,则可以获取exe的构建版本(以及所需的dll和相关内容),然后使用http://www.advancedinstaller.com/将其打包为MSI。 This is a really good bit of free software that makes an easy and clean way to install and uninstall your software. 这是一款非常不错的免费软件,可让您轻松便捷地安装和卸载软件。

For .NET applications, you may want to look at Wix . 对于.NET应用程序,您可能需要查看Wix There are Wix projects built natively into VS2008 and up, and you can download the plugin for VS2005. 在VS2008及更高版本中内置有Wix项目,您可以下载VS2005的插件。

  1. Language is immaterial to the general user population. 语言对一般用户而言并不重要。
  2. You can check codesource for a tutorial on writing an installer package. 您可以检查的codesource的教程编写安装程序包。

Regarding the use of .Net and other tools required by your application: it's really up to you. 关于.Net和应用程序所需的其他工具的使用:这完全取决于您。 We have one application at work that requires .Net 2.0 to be installed prior to installing the printer driver. 我们有一个应用程序正在工作,需要在安装打印机驱动程序之前安装.Net 2.0。 I don't think this is very friendly to the general user population. 我认为这对一般用户群体不太友好。 In my opinion, it is more professional to check the system (via the registry, or other method) to see what is installed and what is not. 在我看来,检查系统(通过注册表或其他方法)以查看安装了什么以及未安装什么是更专业的。 Inform the user of what is needed and not installed and then, at the very least, provide a link. 告知用户需要什么并且没有安装什么,然后至少提供一个链接。 Where licensing allows, go ahead and provide the distribution and use your installer to install what is needed by your application. 在许可允许的情况下,继续提供分发,并使用安装程序来安装应用程序所需的内容。

A couple of other tips for gaining some experience in writing applications is to create some open-source projects. 获得一些编写应用程序经验的其他一些技巧是创建一些开源项目。 Then move on to some closed source projects. 然后转到一些封闭源代码项目。 Something like a calendar app would be a great way to start. 像日历应用程序之类的东西将是一个很好的开始。

If your program is as easy as you say, I can't see any reason to have an installer instead of a simple executable. 如果您的程序像您说的那样简单,我看不出有任何理由需要安装程序而不是简单的可执行文件。 If you run that executable I think you will be automagically prompted to download the .net framework. 如果您运行该可执行文件,我认为系统会自动提示您下载.net框架。 Not sure about java, but however you can include it in some very simple README file. 不确定Java,但是您可以将其包含在一些非常简单的 README文件中。

1) Other programming languages that are not interpreted like c or c++. 1)其他无法解释的编程语言,例如c或c ++。 2) Already answered. 2)已经回答。

I don't know about statistics but almost everybody that has windows, has .net framework and the java virtual machine installed. 我不了解统计信息,但几乎每个人都拥有Windows,安装了.net框架和Java虚拟机。

The direct answer to your question about languages is that yes, some languages (Eg, C, C++, Ada, Pascal/Delphi, Fortran, etc.) can produce programs that will run without a runtime environment like .NET or JRE. 您对语言的问题的直接答案是,是的,某些语言(例如,C,C ++,Ada,Pascal / Delphi,Fortran等)可以生成无需运行时环境(如.NET或JRE)即可运行的程序。 The bad news is that (depending on what code you write and how you write it) your program may still require a bit more than a single executable file, so installation may involve a bit of work, not just copying the file and double-clicking to get started. 坏消息是(取决于您编写的代码和编写方式),您的程序可能仍然需要比单个可执行文件更多的内容,因此安装可能需要一些工作,而不仅仅是复制文件并双击。开始。 OTOH, I should add that quite a few programs have far more dependencies that are usually necessary, so you can make installation a lot quicker and easier than it usually is if you're careful. OTOH,我应该补充一点,相当多的程序具有通常需要的更多依赖关系,因此,如果您要小心的话,可以使安装比通常更快,更容易。

You can include the correct installer to install a Java Runtime Environment or .NET on a client machine if and only if needed. 您可以包括正确的安装程序,以便仅在需要在客户端计算机上安装Java Runtime Environment.NET The hard way is to check for its existence, and run the appropriate installer if you can't find it. 困难的方法是检查它的存在,如果找不到,请运行适当的安装程序。 The easier way is to just run the installer, and let it figure out if it's already installed. 更简单的方法是只运行安装程序,并让其确定是否已安装。

Other than a few exceptional cases, the programming language doesn't make much difference. 除少数例外情况外,编程语言没有太大区别。

Currently the easiest way for a user to run your programs is to write them in JavaScript and post them on a web page. 当前,用户运行程序的最简单方法是用JavaScript编写程序并将其发布在网页上。 In just about every web browser, as soon as the user opens that web page, the program starts to run -- there's nothing else for a user to "download" or "install". 在几乎每个Web浏览器中,只要用户打开该网页,该程序就会开始运行-用户“下载”或“安装”没有其他条件。

The second-easiest (for the user) is, as Justin Ardini mentioned, make it a web app -- just about every language you've ever heard about can make CGI scripts. 正如贾斯汀·阿迪尼(Justin Ardini)所言,第二(对用户而言)最简单的方法是使其成为一个Web应用程序-几乎您听说过的每种语言都可以制作CGI脚本。

The third-easiest is to post it as a Java web applet. 第三个最简单的方法是将其发布为Java Web applet。 Most web browsers can run it directly, but you might have a few users that can't run it until they upgrade. 大多数网络浏览器都可以直接运行它,但是您可能会有一些用户在升级之前无法运行它。 (I've heard that Java web applets can be written in a dozen different languages, including a dialect of Python, which target the JVM -- users can't tell the difference). (我听说Java Web applet可以用十二种不同的语言编写,包括以JVM为目标的Python语言-用户无法分辨两者之间的差异)。

I know lots of people who don't mind running one of the above 3 kinds of programs, but are very, very reluctant to install new software on their computers, in an attempt to avoid viruses and malware. 我知道很多人不介意运行上述三种程序之一,但是非常非常不愿意在自己的计算机上安装新软件,以防止病毒和恶意软件。

Also, you'll probably run into users who use Macintosh, Windows, or Linux computers -- the above techniques will work on any of them, but if you use one of the below techniques, no matter which one you compile your program for, it won't work on the other two. 另外,您可能会遇到使用Macintosh,Windows或Linux计算机的用户-以上技术均可在其中任何一种上使用,但如果您使用以下技术之一,则无论您针对哪种程序进行编译,它对其他两个都不起作用。

The next-easiest is to make a single all-in-one executable that people can download, double-click, and run. 第二个最简单的方法是制作一个单一的多合一可执行文件,人们可以下载,双击和运行该可执行文件。 There are many programming languages that have development tools that can do this -- C, C++, Delphi, etc. -- and you user probably won't be able to tell the difference. 有许多具有开发工具可以执行此操作的编程语言-C,C ++,Delphi等-并且您的用户可能无法分辨出它们之间的区别。

The next-easiest is to make a single all-in-one package or installer that people can double-click to install your application; 第二个最简单的方法是制作一个单一的多合一软件包或安装程序,人们可以双击以安装您的应用程序。 and then later they can actually run it. 然后他们可以实际运行它。 Many development environments have a way to bundle up whatever it needs into a single installer. 许多开发环境都可以将所需的一切捆绑到一个安装程序中。 If your development environment doesn't have one built in, or if you are dissatisfied with the default installer, you might want to check out the question " Seeking an open source solution for a windows installer ". 如果您的开发环境没有内置的环境,或者您对默认安装程序不满意,则可能需要查看问题“ 为Windows安装程序寻求开源解决方案 ”。

I know this is not the aswer for your question but I'd recommend to you read this: 我知道这不是您提出的问题,但我建议您阅读以下内容:

http://37signals.com/webbased http://37signals.com/webbased

Maybe that is the easy way you are looking for. 也许那是您正在寻找的简单方法。

I'm surprised ClickOnce hasn't been mentioned yet, Microsoft's own setup project. 令我惊讶的是,微软自己的安装项目ClickOnce尚未被提及。 It's integrated in Visual Studio and checks for prerequisites, like the .Net framework. 它集成在Visual Studio中,并检查诸如.Net框架之类的先决条件。 Be warned though, it does not play too nice if you use certain third-party components (like reporting etc), but you probably won't worry about that at this time :) Oh and it installs EXE's in a weird location, not Program Files :/ 但是请注意,如果您使用某些第三方组件(如报告等),它的功能不太好,但是此时您可能不必担心:)哦,它将EXE安装在一个奇怪的位置,而不是程序文件:/

Personally I really love Nullsoft's Scriptable Install System ! 我个人真的很喜欢Nullsoft的可脚本安装系统 I don't worry too much about the .Net requirement, it comes with Windows Updates and most PC's have it nowadays, but there are NSIS scripts that can check for whatever requirements you need. 我不太担心.Net要求,它随Windows Update一起提供,当今大多数PC都具有。但是,有NSIS脚本可以检查您所需的任何要求。 Just make sure users know it's a requirement, with links to where they can get it if they need; 只需确保用户知道这是一项要求,并在需要时提供指向该链接的链接; Same for Java. Java也一样。

OT but of interest, have a look at http://smallestdotnet.com OT但很有趣,请访问http://smallestdotnet.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM