2010/01/25

InstallBuilder 6.2.7 Released

We just released v6.2.7 of InstallBuilder which includes the following improvements:
  • New <useMSDOSPath> property in <runProgram> action to configure whether to use or not 8.3 format in the <program> path
  • Added encoding property in <addTextToFile> action and <fileContentTest> rule
  • New <unix2dos> action
  • Allow file type filters in <fileParameter> dialogs for xwindow, osx and win32 modes
  • Include InstallBuilder version by default in the generated installers version info
  • Fixed error with file selection crashing if third-party Explorer extensions change locale
  • Fixed unpacking error in some Windows environments due to antivirus software locking files
Check out our changelog and download the latest release to benefit from the new features and bug fixes.

    2010/01/04

    Handling Access Control List on Windows With BitRock InstallBuilder

    Access Control List (ACL) is the way in which Windows manages permissions on NTFS file systems.

    There are several command line tools on Windows for handling this: cacls, xcals, icacls. Unfortunately, these tools are not always present in a default Windows installation and depending on the Windows version, different tools may be required.

    BitRock InstallBuilder now provides you with <setWindowsACL> built-in actions. This powerful action for managing permissions allows you to modify ACL on Windows. It is based in the icacls windows tool (http://technet.microsoft.com/en-us/library/cc753525(WS.10).aspx).

    You can define the files you want to apply the permissions to. It allows you to specify if you want to "allow" or "deny" access. You can also match a list of users for which the permissions will be applied, and to specify any of the allowed permissions types.

    You can define the users either using names or SIDs. Please take into account that special users, like "Everyone" are localized so it is a good practice to use SIDs instead for these users. You can find a list of the well known SIDs in this article:

    http://support.microsoft.com/kb/243330

    The most common file permissions are also detailed below:

    http://msdn.microsoft.com/en-us/library/aa364399(VS.85).aspx


    http://support.microsoft.com/kb/243330

    Note that ACL are only supported on NFTS file systems.

    Example 1 - Basic:

    The following example will allow all users in the system to read, write and execute the files that match the pattern in <files>. For the directories that match that pattern, the users will be allowed to read the content and write new content in that directory.
    <setWindowsACL>
    <user>Everyone</users> 
    <permissions>file_read_data file_write_data file_execute</permissions>
    <files>c:\myfolder\*;c:\myfolder\*\*;c:\myfolder\*\*\*</files>
    <action>allow</action>
    </setWindowsACL>
    

    Example 2 – Inheritance:

    It is also possible to define the inheritance level:
    <setWindowsACL>
         <action>deny</action>
         <files>c:\some\folder</files>
         <permissions>file_read_data</permissions>
         <recurseContainers>0</recurseContainers>
         <recurseObjects>0</recurseObjects>
         <recurseOneLevelOnly>0</recurseOneLevelOnly>
         <self>1</self>
         <users>Everyone</users>
    </setWindowsACL>
    

    • <self> : determines if the objects specified in the <files> tag will be modified or just their children, if the recursion tags are enabled.
    • <recurseOneLevelOnly> : Only applies inheritance to the first level of hierarchy if one of the below are enabled.
    • <recurseObjects> : Applies inheritance to objects (files).
    • <recurseContainers> : Applies inheritance to containers (folders).


    Example 3 – Using InstallBuilder GUI:

    Of course this action is also available from the InstallBuilder GUI.



    How to use Custom Build Targets

    One of the most useful features of InstallBuilder is the ability to automate the build process. Installers can be built from a command line prompt such as:

    installbuilder-6.2.6/bin/builder build /path/to/project.xml linux

    The above describes the basic command line build process. You can also make changes to the project prior to the build process to adapt it to your needs using the --setvars flag.

    In most cases, this is used to modify project properties such as the <version>, the <fullName> or the <windowsExecutableIcon>:
    builder build project.xml --setvars version=1.2.3  project.fullName="New Installer Name"
    

    However, there is much more you can achieve using this functionality.

    2009/11/10

    How to Integrate InstallBuilder with Apache Ant and Apache Maven

    Apache Ant and Apache Maven are two of the most popular tools for building projects. This article explains how to integrate InstallBuilder with these two tools.

    If you use Apache Ant for building your projects, you can include the following section for building your binary installer.

    2009/10/20

    InstallBuilder Action Lists

    Creating an installer is not as straightforward as most people think. This is especially the case for more sophisticated configurations, such as when you need to execute different platform-specific actions at different stages of the installation process. You may need to check a registry value, create a configuration file, execute a particular command, make substitutions in text files or even connect to an external server via a HTTP POST request. BitRock InstallBuilder includes a number of useful built-in actions to facilitate adding complex functionality to your installer. Actions can be accessed by editing the XML project file directly or in the 'Advanced' section of the InstallBuilder GUI.

    InstallBuilder actions are organized in what are called action lists, which are executed at specific points of the installation process. It is important to understand how and when each action must be performed, what differences exist between action lists inside components and within the primary installer, how the installer will behave when you run it in different installation modes (GUI, text, or unattended) and what happens when you generate rpm or deb packages.

    2009/10/13

    Unattended Mode

    As you may know, installers generated with InstallBuilder provide different execution modes using the command line option "--mode". The mode "unattended" is particularly useful when we need to incorporate installations into an automated process. With this mode, the installer will not prompt the user for any information and will instead take the default settings configured for each of the parameters. That way, it is possible to incorporate the installer execution into scripts since no input is required from the user during the installation.

    Note that you are not forced to use only the default values when running the installer in this mode. You can also define the values through command line switches which are generated for each parameter definition inside the InstallBuilder project. If we want to use specific values, we should run the installation as follows:

    2009/10/07

    InstallBuilder 6.2.4 Now Available

    We just released version 6.2.4 of InstallBuilder our crossplatform installation and automatic update tool. The new release includes several enhancements, such as an improved builder tool on Mac OS X x86 and unattended install support for the autoupdate mechanism. The addition of unattended mode in the automatic update tool means that updates can be applied silently without user interaction. A complete list of improvements can be viewed in InstallBuilder's changelog.

    2009/09/24

    Bundle Tomcat in Your BitRock InstallBuilder installer

    If you develop a Java Web Application, you may want to create an installer and redistribute Tomcat together with your software. This allows your users to avoid the time-consuming process of installing and configuring Tomcat in order to use your software and guarantees that the optimal version is used. In this article, we explain how to bundle Tomcat into a BitRock installer. We also provide the code so you can start with that and create an installer that not only installs your software but also configures the Tomcat server according to your requirements.

    2009/09/23

    LinuxCon and JEI

    BitRock will be attending LinuxCon in Portland and the JEI Startup event in Zaragoza (Spain). Let us know if you are around and would like to chat with us.

    2009/07/24

    Managing Bundled Files

    In this entry we are going to discuss how to manage files bundled within an installer.

    It is common to have a separate tool or program that must be bundled with and run from the installer, but before the file copying part of the installation process has completed. A common example would be a license validation program. Typically, all files bundled within an installer are unpacked and then any tools would be run. In the case of a license validator, that is less than ideal because the user may end up waiting for the files to be unpacked only to find that the license is not valid. The user would then have to wait for the installation to be rolled back.

    InstallBuilder provides you with actions to deal with these situations. The most important are <unpackFile> and <unpackDirectory>. Let's assume we are in the situation detailed above. A typical project XML file would look something like:

    2009/07/21

    How to use Rules with InstallBuilder

    The installation of your application does not have to be a rigid, linear sequence of actions. For example, maybe you need to copy certain files only if the target platform is Mac or Linux, but not if it is Windows. Or you may want to modify or add some content to a file, but only if it is needed (you don't want to duplicate configuration settings). Here's another example of common functionality: You may want to discard or accept user input depending on whether it meets certain criteria.

    Rules in InstallBuilder allow you to determine when to perform certain actions depending on the circumstances, variables and user inputs that are involved in the installation. It allows you to set conditions related to an action or an action group at any step of the installation, and they will be performed only if the condition is met. You can set not only one, but a set of multiple conditions that can be evaluated with an AND/OR group logic statement.

    This article will explain how to implement conditional rules in your actions, how to select the appropriate rule for each case, and how this can help you to optimize your project and avoid duplicating code.

    2009/07/02

    How to Use the AutoUpdater in InstallBuilder

    In version 6.0 of InstallBuilder, we started shipping a new tool called AutoUpdater . This tool allows you to enable users to check for, download and apply updates for your software on their machines, getting the necessary files through HTTP or FTP. Although the Autoupdater is not yet available through the InstallBuilder GUI, it is very simple to configure.

    How Does it Work?

    There is a binary file which will poll the server to get information about the software versions available. The behavior of this binary is:
    • Read the INI file that contains information about where to contact the server and which version is currently installed (which should be delivered together with the binary)

    • Get the XML file from the server, which contains available versions for each platform.

    • If there's a newer version available (checking that the version ID received is higher than the current one stored in INI file), download and install it or notify the user (return code = 0) if it is run in unattended mode.
    This binary may be customized to fit your needs using the command line tool 'customize' which is available in the AutoUpdater directory after performing InstallBuilder installation. The binary may be generated for several platforms: windows, linux or linux-x64; and an XML file will be used to indicate the tool how should the updater be customized.

    2009/07/01

    How to Add Components and Make them Optional

    BitRock InstallBuilder allows you to create cross platform installers that make it easy for end users to install your software. Though users are often presented with a simple 5-click process, the software bundled inside and its configuration are typically very complex and difficult to set up manually. Examples of this are posted on BitNami.org, where stacks like Redmine, Alfresco or KnowledgeTree, which are fairly complex to install manually, can be installed in minutes thanks to installers that automate the process.

    All of the applications available via BitNami have many different dependencies, such as: libraries, databases, web servers, programming languages, run-times, etc. Apart from that, each of them has to be configured a certain way and then all of the pieces need to be integrated to work together. The installation process gets even more complicated if you want to make those 'modules' optional and allow the end user choose which ones should be installed and how they should be configured. BitRock InstallBuilder's components make the task easier.

    What is a Component?

    You can think of a component as a 'black box' you use to simplify the way you build the installer. It is kind of a partial installer inside the primary installer that only applies to a subset of the software you are packaging (such as Apache, MySQL, etc). This makes it very easy to re-use pieces of your installer and add and remove them as necessary. You can bundle files within components and add rules, scripts, actions, variables or parameter pages (which are used to ask the user how they want to configure that piece of software). Various components are then bundled inside the primary installer to present end users with a complete package. If you are familiar with DRY (Do not Repeat Yourself) or KISS (Keep It Simple Stupid) terms, then InstallBuilder components will surely make you happy.

    2009/06/16

    How To Integrate Bitrock InstallBuilder with Eclipse

    Did you know that it is possible to integrate InstallBuilder into your development environment?

    You may already be familiar with the advanced GUI builder that was added in InstallBuilder 6. You can access most InstallBuilder features from the GUI, so you can develop complex installers without writing a line of code. However, there are situations in which that is not the ideal way to work with InstallBuilder. In addition to the GUI builder, you can work directly with the XML project file or interact with the tool using the command line interface. Both the XML project file and the command line builder interface turn InstallBuilder into a powerful development tool that can be integrated into your development environment.

    There are a variety of Integrated Development Environments (IDEs) that support functions such as source code editing, compilation, automation and version control. You can also integrate the packaging functionality that BitRock InstallBuilder provides because most IDEs can be configured to use external tools.

    In this article, we'll explain how to configure Eclipse to package your software with InstallBuilder. The configuration with other IDEs would be similar to this. This article is focused only on the basics - more complex configuration can be done to further customize your environment.