Two weeks ago I started a mini-project to write a simple piece of software in C#, package it up and release it. Although I had initially given myself two weeks, the actual time I spent on this project was less than a week due to a pest problem, a birthday, and a family visit. The purpose of this project was to learn the basics of a new programming language, and to learn how to package and release the initial version of a new piece of simple software.
Picking a language
I had never written a line of C# in my life but knew that it had similarities to both C++ and Java. I’ve been programming with C++ and Java professionally (by which I mean that someone pays me to do it) for many years so it seemed an interesting new language to experiment with.
I downloaded the free Microsoft Visual C# 2008 Express Edition and installed it. I followed the initial tutorial to learn how to build a very basic application and then started experimenting with adding new features.
The version control system that I am used to working with is Perforce. I therefore wanted to use a different version control system for this project (remember this is a learning exercise so I want to try new technologies!).
I picked the well known subversion as the version control tool with TortoiseSVN as the front end to subversion. Subversion is a popular choice and is easy to use if you are used to using something like Perforce. It has many differences but also many similarities.
What to write?
I had decided to write a Windows clipboard extender. There are loads of other clipboard extenders available but that didn’t worry me. My goal isn’t to create something original, just something that I would use myself.
The core features that I wanted to include was stack and queue support for the clipboard. Normally copying an item of text to the clipboard overwrites the previous item. I wanted the previous values to be stored in either a queue or a stack. e.g.
I copy (using Ctrl-C) the values ‘one’, ‘two’, ‘three’.
I then paste (using Ctrl-V) and the pasted values are ‘one’, ‘two’ and then ‘three’. This is the queue behaviour.
If using the stack the pasted values would be ‘three’, ‘two’ and finally ‘one’.
Online help with writing the software
As I was completely new to C# and its APIs, I had to do a lot of searching to find out how to do Clipboard operations. The Visual C# help system was also very good.
There is a huge amount of help for almost any C# problem you can think of on the internet so it wasn’t hard to find out how to solve any problem that I had. In particular the following articles were very helpful:
Writing a EULA
When releasing software you would normally ship an end-user licence agreement (EULA) along with the software. This tell the user what they can and can’t do with your software.
If you want to open source your software there is a good source of licensing information at the Free Software Foundation.
In my case I wanted the software to be free to use but proprietary (I’m not shipping the source). It is harder to find information on how to produce a licence in this case. One option is to look at existing licences and adapt any bits you like. I used the XS EULA Generator (update: sadly the tool no longer exists) and then adapted it for my needs.
Creating an install package
Once I had written my clipboard extender (which I named nbClipboard) I needed some way to package it up with a Windows installer.
After looking around the best option seemed to be Inno Setup combined with ISTool (a front end for Inno Setup). You can download both together by going to the Inno Setup website and downloading the QuickStart Pack.
This creates a professional looking software install executable which looks identical to the install tools used by many popular software applications.
Making a PAD file
To release software you can add it to your own website and in addition you may want it to be added to the many software download websites out there. Almost all software download websites require you to submit a PAD file (Portable Application Description). This file describes all the attributes of your software (purpose, author, screenshots, OS requirements etc) in a standard format which allows these download sites to stay up to date.
The format was created by the Association of Shareware Professionals (ASP) and they have a free PADGen tool that you can use to create the PAD file.
Releasing the software
After creating the install package and the PAD file I uploded both of them to my website and then submitted the PAD file to the ASP repository (a store of PAD files that many software download sites use as a data source).
Just two hours after making the submission nbClipboard had appeared on two download sites and was even appearing in the Google search results as a result of one of these download sites being indexed. In the next few days it appeared on other download sites as well. You may want to note that the sites that pick these PAD files up automatically seem to be the small download sites. If you want your software to appear on better known directories such as Tucows and download.com you’ll need to handle the submission manually.
nbClipboard is available from the below link and it might be available from some small software download sites as well – if you can find them!
It certainly won’t win any awards but then I was more interested in going through the whole process of writing and releasing a new software tool than creating something which was ground breaking.