Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating an installer via command line / through Jenkins "Execute Batch Command"

We use Jenkins for CI.

I have a project that is built in Windows, using CMake 2.8.4 and VS2010 (NMake Makefiles). Once the build is complete, we manually zip up the artefacts to give to people. I would like to create an installation package via Jenkins if possible, instead of having to zip up everything.

Does anyone know of an installer that can work completely command line, so I can put the command in the Jenkins "Execute Batch Command" window? Has anyone done this? What installer-creator are you using? Hopefully looking for something in the free/open-source arena.

like image 813
Sagar Avatar asked Aug 15 '11 20:08

Sagar


3 Answers

I've used Inno Setup through Jenkins with much success. It is a free installer for Windows. Installation files are created via scripts and command-line arguments can be used when executing these scripts to create installation files. Inno Setup scripts can be added to your source control repository for tracking changes, while also making them accessible to Jenkins.

like image 166
Bernard Avatar answered Nov 15 '22 21:11

Bernard


We use Nullsoft Scriptable Install System (NSIS), and have Jenkins call a batch file in the repository to build our installer. The NSIS binaries are also stored in the repository, no need to install anything on the build server. The NSIS configuration is a text file, looking something like this (from NSIS Simple Tutorials):

# name the installer
outFile "Installer.exe"

# default section start; every NSIS script has at least one section.
section

# default section end
sectionEnd

So far it has been working perfectly. The configuration language is a little unusual, but it is not too hard to grasp and the result is stable and predictable. There are plenty of examples and tutorials in the installation and on the web site.

like image 27
Anders Lindahl Avatar answered Nov 15 '22 21:11

Anders Lindahl


We used WiX Toolset to create an Windows Installer package (MSI). It is open source.

All the tools are command line and we called them from an Ant script. MSI can be installed without user being involved, which could be used for testing.

WiX Toolset also has a plugin to Visual Studio – Votive.

There's a good tutorial on how to create installs using WiX.

like image 4
Alexey Ivanov Avatar answered Nov 15 '22 21:11

Alexey Ivanov