| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Want to get organized in 2022? Let Dokkio put your cloud files (Drive, Dropbox, and Slack and Gmail attachments) and documents (Google Docs, Sheets, and Notion) in order. Try Dokkio (from the makers of PBworks) for free. Available on the web, Mac, and Windows.

View
 

Homer installer for Windows

Page history last edited by juliano 10 years, 4 months ago

    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:

 

  • ImageMagick, open source software suite for manipulating images (official Windows binary installer version 6.7.0–10-Q16):


           C:\opt\ImageMagick\

  • jpegtran, loseless jpeg transformations (as found inside the GNUWin32 build of JPEG 6b–4 library for Windows):


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


           C:\opt\bin\jbig2.exe

  • Tesseract-ORC, free open source OCR engine sponsored by Google, with Leptonica library for enhanced image processing (version 3.00):


           C:\opt\Tesseract-OCR\

  • RubyInstaller, the easy way to install the Ruby programming language on Windows (includes the Development Kit to build native C/C++ extensions or “gems” - Ruby version 1.87):


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


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

  • RMagick, interface between the Ruby programming language and ImageMagick:


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

  • pdfbeads, Ruby utility to create searchable PDF:


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

  • cmdow.exe, command-line utility used in Homer batch script to activate the Command Prompt window upon completion:


           C:\opt\bin\cmdow.exe

  • Scan Tailor, interactive post-processing tool for scanned pages (version 1.0.0beta11 with experimental “Dewarping” support):


           C:\Program Files\ScanTailor\

  • Homer, command-line bash script (controlled via a Windows batch file) for renaming, rotating and binding scanned pages:


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

 

Back to Front Page or List of content.

Comments (0)

You don't have permission to comment on this page.