Homer installer for Windows


    view code: Homer-Install.au3

The installation script Homer-install-exe for Windows was made using AutoIT v3, a freeware BASIC-like scripting language designed for automating the Windows GUI. The installation script for Windows takes longer to complete than its Mac counterpart, as some of the programs to install need in this case to be compiled from source. Also, the script may require administrative privileges to run depending on the installed Windows OS version (“User Account Control” is enabled by default on Windows Vista and Windows 7).

AutoIT scripts allows to interact with the Windows GUI in the same way a user would do with his or her cursor and keyboard. We could have told the user to download each program and install through its own installer (when available, like in most cases for Windows programs). But we decided to make the procedure even easier, by automating the whole setup trough a “unattended” installation script. The user will only need to click “Install” once and then wait for the installation to complete.

The Homer script was originally written in Bash, which comes pre-installed in OSX and Linux, but not in Windows. Moreover, PDFbeads – the utility to convert the images into PDF – requires Ruby, which again is not pre-installed on Windows. Finally, PDFbeads requires two other Ruby gems (hpricot and RMagick) which need to be compiled from source with the developer tools. The solution to these problems is to install the Development Kit provided by the RubyInstaller project: the Ruby DevKit for Windows is based upon MSYS and MinGW, which not only provide development tools to build native Ruby extensions or “gem”, but also include the Bash command line interpreter system. This allows Windows users to run the same[8] Homer bash script inside Windows Command Prompt.

The installer copy most of the software in an newly created C:\opt folder (except Scan Tailor which is installed in the default C:\Program Files). This is necessary because the command-line utilities work easily if they reside in a path without spaces.

Finally, the script also update the %PATH% environmental variable to include all the folders in C:\opt that contains binaries, thus making their execution smoother. Moreover, another variable is added to the registry for the current user: it’s called %DESKTOPDIR%, and returns the path to the user’s Desktop directory (e.g., C:\Documents and Settings\cosimolupo\Desktop). The latter is used by the Homer script to save the final PDF document in that location. It is simply trick to overcome the issue of Windows system folders’ labels being dependent from the language currently in use: thus, the same folder is called “Desktop” in the English version, while “Scrivania” in the Italian one.

If you have already installed any of the following programs, and still wish to use the automatic installer, we advise you to uninstall all those programs before running the automated installation script, in order to avoid any possible conflict. Otherwise, it is better to install all the applications manually and then download the standalone Homer bash script from here.
Software included

The script install the following programs into the specified locations:

 


           C:\opt\ImageMagick\


           C:\opt\bin\jpegtran.exe
           C:\opt\bin\jpeg62.dll


           C:\opt\bin\jbig2.exe


           C:\opt\Tesseract-OCR\


           C:\opt\Ruby187\
          C:\opt\DevKit\


           C:\opt\Ruby187\lib\ruby\gems\1.8\gems\hpricot-0.8.4\


           C:\opt\Ruby187\lib\ruby\gems\1.8\gems\rmagick-2.13.1\


           C:\opt\Ruby187\lib\ruby\gems\1.8\gems\pdfbeads-1.0.3\


           C:\opt\bin\cmdow.exe


           C:\Program Files\ScanTailor\


           C:\opt\bin\homer.cmd
           C:\opt\bin\homer.sh
           C:\Program Files\Homer\Homer.bat

 

Back to Front Page or List of content.