views:

127

answers:

8

I'm a beginner to intermediate programmer and I've learned some java and 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. To install a C# program, I have to tell them to have .NET installed. 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.

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?

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?

A: 

For .NET applications, you may want to look at Wix. There are Wix projects built natively into VS2008 and up, and you can download the plugin for VS2005.

JasCav
A: 
  1. Language is immaterial to the general user population.
  2. You can check codesource for a tutorial on writing an installer package.

Regarding the use of .Net and other tools required by your application: it's really up to you. We have one application at work that requires .Net 2.0 to be installed prior to installing the printer driver. 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.

dboarman
+5  A: 

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. This is a really good bit of free software that makes an easy and clean way to install and uninstall your software.

Chief17
A: 

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. Not sure about java, but however you can include it in some very simple README file.

1) Other programming languages that are not interpreted like c or c++. 2) Already answered.

I don't know about statistics but almost everybody that has windows, has .net framework and the java virtual machine installed.

Matias
A: 

The direct answer to your question about languages is that yes, some languages (E.g., C, C++, Ada, Pascal/Delphi, Fortran, etc.) can produce programs that will run without a runtime environment like .NET or 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.

You can include the correct installer to install a Java Runtime Environment or .NET on a client machine if and only if needed. 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.

Jerry Coffin
A: 

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. 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".

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.

The third-easiest is to post it as a 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).

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.

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.

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".

David Cary
A: 

I know this is not the aswer for your question but I'd recommend to you read this:

http://37signals.com/webbased

Maybe that is the easy way you are looking for.

Erik Escobedo
A: 

I'm surprised ClickOnce hasn't been mentioned yet, Microsoft's own setup project. It's integrated in Visual Studio and checks for prerequisites, like the .Net framework. 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 :/

Personally I really love Nullsoft's Scriptable Install System! 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. Just make sure users know it's a requirement, with links to where they can get it if they need; Same for Java.

OT but of interest, have a look at http://smallestdotnet.com

Wez
A small addition about ClickOnce: it is installed per user and it can handle prerequisites, updates, uninstall and file associations for you (in .NET 3.5). I haven't had problems with it not being in Program Files (yet) and it's a good solution if you don't want to work too much on installers.
Rox