theGreenCabbage
theGreenCabbage

Reputation: 4845

WiX to create a simple installer and merge module for my C# application

I am new to software development (though not programming). I am in the process of delivering my first application for commercial release, and I am in need of a single-click installer package. I looked into a number of solutions - I coded my own in C# (it basically just grabs my three folders to their respective destinations), but ran into some issues with bundling some IO libraries. Since I am using Visual Studio Express 2012, I cannot use the InstallShield module. I found WiX, and while it has some tutorials online, the learning curve of this service is pretty high - it's safe to say I am pretty confused.

I have three folders:

  1. myApplication2013 folder
  2. myApplication2014 folder
  3. System.Data.SQLite.dll

The logic of my C# code is the following:

public static void installer(){
        deleteLegacyFiles(); // deletes legacy myApplication directories and files
        moveSQLite(); // moves system.data.sqlite database to directory
        if(checkRevit2013()){ // install myApplication 2013 if Revit 2013 is installed
            moveMyApplication2013();
        }else if(checkRevit2014()){ // if Revit 2014 is installed, install myApplication 2014
            moveTally2014();
        }else{ // tell user both Revit 2014 and Revit 2013 is not installed
            System.out.println("It does not look like you have either Revit 2013 or Revit 2014 installed.");
        }
    }

The target location will be specified by the .msi, as for the target locations:

  1. myApplication-2013 is: C:\\ProgramData\\Autodesk\\REVIT\\Addins\\2013
  2. myApplication-2014 is: C:\\ProgramData\\Autodesk\\REVIT\\Addins\\2014
  3. System.Data.SQLite.dll is: C:\\Windows\\Microsoft.NET\\assembly\\GAC_64

What the installer really does is it takes the source folders/files (from the 3 above) and literally copies them to the target location. This is also what my C# script does (though it uses the IO library). What are the steps I need to for WiX? I am so confused.

I also need to create a merge module.

Thank you.

Upvotes: 0

Views: 2944

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55571

My open source tool ISWIX has project templates in Visual Studio to aid in stubbing out your installer. There is also a graphical UI for authoring the files into the merge module. Here' a article with steps and video that shows you what the experience is like.

Upvotes: 2

Related Questions