If you use Apache Ant for building your projects, you can include the following section for building your binary installer.
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.
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:
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:
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.
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.
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.
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.
I also gave a lightning talk on how BitRock worked with Logical Awesome to develop an on-site version of GitHub that is easy to install. The video should be posted soon and I'll be sure to provide a link once it is available.
As promised, we raffled off an EeePC, which was won by Frank from New York. Congratulations, Frank!
If you're not already familiar with it, GitHub is a wildly popular web application for social coding, with over 80,000 developers already using the site. Built on top of the Git distributed version control system, it makes it easy for distributed teams to collaborate on software development projects.
Until now, GitHub was only available as a service, which made it inaccessible to companies that will not allow their code to be hosted outside of the corporate firewall for security reasons. After seeing increasing demand for an on-site version of their product, the Logical Awesome team approached BitRock to package the new version, GitHub:FI, for easy installation at customer sites.
BitRock developed a completely self-contained installer for GitHub:FI that enables new users to get up and running in just a few mouse clicks. The installer contains all of the software required to run GitHub: Ruby on Rails, JRuby, Solr, Java, Python, Perl, Git, Pygments, OpenSSL and over 30 additional components. It completely automates the installation and configuration process, so no manual setup steps are required. Logical Awesome is also taking advantage of the BitRock Network Service to better inform product development and support.
Want BitRock to make your software that easy to install?
Whether your software is built on PHP, Rails, Java, Perl or Python, we can deliver a complete package that enables even non-technical end users to have it up and running in minutes on Windows, Linux, OS X or Solaris. To learn more, contact our sales team.
The WhyFLOSS event is being held in Madrid on May 21st and registration is free, although all of the talks will be in Spanish.
BitRock has been elected as a finalist of the 2009 Internet Awards in the category of best company. This nomination recognizes our work on BitNami and how it enables users of different backgrounds to quickly have up and running blogs, wikis and other web based programs. You can find more information at Dia de Internet website
BitRock will be exhibiting and demoing InstallBuilder, our cross platform installer development tool, at JavaOne, and you’re invited! If you’re not familiar with JavaOne, it is one of the leading events for Java developers. Held June 2-5 at the
To sign up and get $100 off of your full conference pass, visit: cplan.com/javaone2009/externalregistration/reg.html and enter the code EXHBCEK5.
If you do attend the conference, be sure to drop by the BitRock kiosk to enter our drawing for a very cool prize!
The new BitRock Custom Stacks for PostBooks are self-contained installers that fully automate the installation and configuration process for PostBooks ERP, making it easy for even non-technical people to take the freely-available software for a spin.
To download PostBooks or sign up for a demo of the Standard or Manufacturing editions, visit xTuple.com.
In addition to the new easy to use installers (known as Custom Stacks), xTuple is also leveraging BitRock's Network Service to better service its large and growing user base. The Network Service enables xTuple to communicate new releases and other important messages to users while getting better visibility into how PostBooks is being deployed to improve product development and support.
Please take a look at the video and let us know what you think!
Nice work, Yago!
We have also added another feature that sets InstallBuilder apart from other cross platform installation tools: automatic update functionality. So, you can now use InstallBuilder not only to package your software, but to deliver updates to it once installed. The automatic update tool currently supports Windows and Linux, with OS X support to be added shortly. It is included with InstallBuilder at no additional cost, so everyone with an active maintenance contract can take advantage of this new functionality.
In addition to the above improvements, support for right to left languages has been implemented. InstallBuilder 6.0 now supports Arabic, with more right to left languages to come. We want to thank our customers and in particular Mohammed El Mehdi for their help implementing this feature . If you are interested in a language not currently supported by InstallBuilder, please let us know by contacting support at bitrock .com
In connection with the new InstallBuilder release, we have created a new website just for InstallBuilder-related information, which simplifies navigation and makes it easier to access InstallBuilder information. You can click through to the site from bitrock.com, or visit it directly at installbuilder.bitrock.com.
To take the latest InstallBuilder release for a spin, download it and let us know what you think.