Islandora 7 and Windows: Patches and Tips

219 views
Skip to first unread message

slanger

unread,
Dec 29, 2013, 3:21:13 PM12/29/13
to isla...@googlegroups.com
If you search Google Groups, you'll find lots of people struggling to get Islandora to work on a Windows server. Even though Islandora should technically be Windows-compatible, it's been developed in a Linux environment and tested exclusively on Linux servers ("Building Digital Collections Using Islandora." (June 22, 2012). ALA Annual Conference. Anaheim, CA). Now, this isn't so unusual when it comes to Drupal module development, as Drupal creates a nice abstraction layer to ensure that all custom code is OS agnostic.

That said: Islandora interacts with a lot of third-party software; so much so that the idiosyncrasies of the operating system start to become important again. Here are just a few examples of Windows-incompatibilities that have crept into the Islandora codebase:
  • Command-line syntax that is Linux-specific;
  • Code that gets tripped up by the backslashes used in Windows paths;
  • References to Unix shell scripts, even though the Windows environment uses batch files instead, etc.
After a lot of struggle and trial-and-error, my organization now has an Islandora 7 installation successfully running on a Windows server. Some of the modules needed to be patched in order to address the problems mentioned earlier. The site (still under development) has remained stable long enough that it seems safe to share these patches with the Islandora community.

Important information about these patches:
  • They have only been tested with Islandora 7.x-1.2.
  • Once applied, the patched modules should work in both Linux and Windows environments.
  • I'm sure there are better, cleaner and more efficient ways to solve some of the problems being addressed here. Revised patches and improvements are welcome.
  • At the very least, these patches will hopefully draw attention to the problem areas and spark better, more creative solutions from members of the community.
  • My hope is that the Islandora development team will review these patches and consider incorporating them into the next version of Islandora.
The Islandora patches are posted below.

slanger

unread,
Dec 29, 2013, 3:26:42 PM12/29/13
to isla...@googlegroups.com
Patch: Islandora Repository module

This patch introduces a new function -- one that identifies the server's operating system. Several other [patched] modules make use of this function, so apply this patch before any of the others.
islandora.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:30:18 PM12/29/13
to isla...@googlegroups.com
Patch: Tuque library

Windows seems to have a problem with some of the php:// I/O streams in this library, resulting in a flurry of Drupal error messages, such as:
  • Warning: curl_setopt(): DrupalTemporaryStreamWrapper::stream_cast is not implemented!
  • Warning: curl_setopt(): cannot represent a stream of type Output as a STDIO FILE* in CurlConnection->getRequest()
  • Warning: curl_setopt(): cannot represent a stream of type MEMORY as a STDIO FILE* in CurlConnection->putRequest()
This patch attempts to correct that. Read the patch comments for more information.

On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
tuque.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:36:30 PM12/29/13
to isla...@googlegroups.com
Patch: Audio Solution Pack


When LAME is called through the command line, the quotes around the filenames cause the command to fail.

On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_sp_audio.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:39:22 PM12/29/13
to isla...@googlegroups.com
Patch: Large Image Solution Pack
When Kakadu is being called through the command line, some of the syntax is very Linux-specific and fails under Windows. This patch ensures the appropriate syntax is used based on the server's operating system.


On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_sp_large_image.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:42:00 PM12/29/13
to isla...@googlegroups.com
Patch: FITS Extractor module

When the FITS processor is called through the command line, some of the syntax is very Linux-specific and fails under Windows. This patch corrects that.


On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_fits.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:45:13 PM12/29/13
to isla...@googlegroups.com
Patch: Islandora Paged Content module

I believe I discovered a typo -- or possibly a relic left over from a previous version of this module. Twice, the module tries to call a variable named 'islandora_book_gs', but that doesn't seem to exist. This patch changes the variable name to 'islandora_paged_content_gs' instead.

For some reason, when complex syntax {$...} is used, the code inside the curly braces sometimes doesn't get processed, resulting in error messages like: "The file {$page->id}_TN.{$ext} cannot be found." Concatenating the variables instead seemed to fix this problem. Theories as to why this might be happening are welcome.


On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_paged_content.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:47:18 PM12/29/13
to isla...@googlegroups.com
Patch: Compound Solution Pack

For some reason, when complex syntax {$...} is used, the code inside the curly braces sometimes doesn't get processed, resulting in error messages like: "The file {$child->id}_TN.{$ext} cannot be found." Concatenating the variables instead seemed to fix this problem. Theories as to why this might be happening are welcome.


On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_sp_compound.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:48:40 PM12/29/13
to isla...@googlegroups.com
Patch: PDF Solution Pack

Some minor changes were made to prevent the code from getting tripped up by the backslashes used in Windows paths.


On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_sp_pdf.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:50:47 PM12/29/13
to isla...@googlegroups.com
Patch: OpenSeadragon module

The viewer caches the JP2 file in the tomcat temp directory. However, in Windows, the path to this file contains backslashes, which jQuery is mistaking as escaped characters. As a result, the viewer loads, but the JP2 image never loads inside of it. This patch converts all the backslashes in the path to forwardslashes, which fixes the problem. (NOTE: There may be a more efficient way to make this path conversion happen.)


On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_openseadragon.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:52:53 PM12/29/13
to isla...@googlegroups.com
Patch: Internet Archive Book Viewer module

The viewer caches the JP2 file in the tomcat temp directory. However, in Windows, the path to this file contains backslashes, which jQuery is mistaking as escaped characters. As a result, the viewer loads, but the JP2 image never loads inside of it. This patch converts all the backslashes in the path to forwardslashes, which fixes the problem. (NOTE: There may be a more efficient way to make this conversion happen.)


On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_internet_archive_bookreader.windows_compatibility.20131226.patch

slanger

unread,
Dec 29, 2013, 3:54:56 PM12/29/13
to isla...@googlegroups.com
Patch: Islandora OCR module
This is a bit of a hack, but I'm not sure what else to do.

For some reason, the Windows version of Tesseract identifies itself incorrectly. Despite downloading and installing the "3.02.02" version, running "tesseract -v" gives the incorrect response ("tesseract 3.02"). This hack makes it possible to use OCR under Windows despite this.


On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:
islandora_ocr.windows_compatibility.20131226.patch

Josh Wilson

unread,
Jan 2, 2014, 8:53:35 AM1/2/14
to isla...@googlegroups.com
Wow, this is outstanding! Terrific work and a great service to the community.



On Sunday, December 29, 2013 3:21:13 PM UTC-5, slanger wrote:

Melissa Anez

unread,
Jan 6, 2014, 8:13:17 AM1/6/14
to isla...@googlegroups.com
This is awesome! Thanks so much for sharing this with the community! This is the kind of thing that we're trying to recognize with goodies, so if you'd contact me at ma...@islandora.ca with your details, I'd like to send you an Islandora Foundation t-shirt to show our appreciation.

- Melissa Anez
Islandora Foundation

slanger

unread,
Jan 9, 2014, 6:21:41 PM1/9/14
to isla...@googlegroups.com
 Wow -- thanks, Melissa! I'll happily accept an Islandora Foundation t-shirt. :-) I'll send you an email right now.

slanger

unread,
Jan 9, 2014, 6:33:03 PM1/9/14
to isla...@googlegroups.com
FYI: Work has continued on these patches over here:
Reply all
Reply to author
Forward
0 new messages