Table of Contents
Greenstone 2 can export collections to CD/DVD-ROMs.
Collections with Lucene as indexer and/or JDBM as database type won't work with Greenstone 2 collections exported to CD-ROM. Lucene and JDBM work with Java and Java is not part of the export, so searching (lucene) and browsing (jdbm) won't work.
We advise that collections built with lucene and/or jdbm are rebuilt with mgpp as indexer and gdbm as database before exporting.
cd C:\Users\<username>\Greenstone setup
In Linux, cd to Greenstone directory:
Move into the directory of the collection you want to export:
Creating CD/DVD-ROM Collections
Greenstone collections can be exported and written into a CD/DVD that can run independently on Windows machines.
Choose File → Write CD/DVD image…. In the resulting popup window, select the collection or collections that you wish to export by ticking their check boxes. You can optionally enter a name for the CD-ROM: this is the name that will appear in the menu when the CD-ROM is run. If a name is not entered, the default Greenstone Collections will be used. You can also specify whether the resulting CD-ROM will install files onto the host machine when used or not. Click <Write CD/DVD image> to start the export process.
The necessary files for export are written to:
Greenstone → tmp → exported_xxx
where xxx will be similar to the name you have entered. If you didn't specify a name for the CD-ROM, then the folder name will be exported_collections.
You need to use your own computer's software to write these on to CD-ROM. On Windows XP this ability is built into the operating system: assuming you have a CD-ROM or DVD writer insert a blank disk into the drive and drag the contents of exported_xxx into the folder that represents the disk.
The result will be a self-installing Windows Greenstone CD-ROM or DVD, which starts the installation process as soon as it is placed in the drive.
Can Greenstone3 export to CD/DVD-ROM Collections?
The objectives versus what has been implemented so far
- GS2 can export to CDROMs/DVDs that run on Windows. The linux and mac GS2 binaries will produce Windows CD-ROMs or DVDs. But GS2 can't produce non-Windows optical discs.
- GS3 should ideally be able to run off a read-only location such as a CD/DVD. The infrastructure necessary to support this had been added, by creating a gsdl3.writablehome property which uses the system's temporary directory to send any output that Greenstone writes out, such as logs.
- The idea is to set Greenstone 3 up the way you like for a CD-ROM or DVD, with your collections ready. Then you should be able to put it into a read-only location such as a disc, and it should be able to work, using a greenstone folder in the temp location to write out output.
- A lot of the infrastructure is there. And a GS3 installation on a linux machine can create the material for a linux disc, GS3 on windows machines can create the contents for a windows disc and Macs can create contents for discs that will run on Macs. The bitness of the architecture (whether the OS is 32 or 64 bit) that it will be running on should probably also match.
- What's not yet there, but what had been envisioned and which is on our wishlist, is for a GS3 installation on any OS to create a cross-platform disc. Some work had already been done to this end with the creation of bin/linux, bin/windows and bin/mac folders to keep binaries separate, so that all three could theoretically be included in one universal binary. The lib folder didn't have to be divided into separate OS subfolders because linux uses .so else .a extensions, macs use .bundle and windows use .dll. It's thought there is support for a bitness subfolder for binaries, but the lib folder set up does not allow for 32 bit and 64 bit variants of an operating system to co-exist, as the file extensions would be the same.
- There is no graphical way to produce the disc. Specifically, there is no option in a GS3 installation's GLI that will "export to CD-ROM" even if the infrastructure exists.
In short, GS3 is still be able to produce content for discs that can run on machines running the same OS as where the content was generated. This needs to be tested to confirm it still works.
Assuming the feature is still functioning, which it was when last tested on Linux, Mac and Windows on 7th-9th Oct 2015, this is one step up from what GS2 was able to do, which is to only output windows-compatible disc content.
- you'd set up the collections you want to transfer to the DVD by creating and building them with any indexer other than solr. Just preview your collections to make sure they look okay and work locally as expected.
- Then write the entire GS3 installation out to your DVD, collections and all. My linux GS3 installation does not fit on a CD-RW, I'm not sure if a GS3 installation has a larger or smaller footprint on a Mac and Windows.
- Now you've burnt your disc, you should be able to run the ./gs3-server.sh script off it. I tried running the script from a terminal and it worked and my Greenstone DL was serving my collections.
The very first time you run gs3-server.sh, it can take some time for it to set things up: it needs to copy a lot of files to your machine's temp area. In my case, the /tmp/greenstone folder is 134MB. But it would depend on how big the log files end up getting.
The cumulative changes made to get GS3 working off a disc can be seen at trac changesets 30236-30304 to build.xml.
Be aware that the OS on which the GS3 is installed, and which is the GS3 that's transferred to disc, should match the OS on which the GS3 will end up running. So assuming that the windows and mac GS3s can run off CDs as well, you'll perhaps want to install all OS versions for 32/64 bit onto a DVD. The windows binary should work irrespective of the bitness of the binary vs the machine it is run on.
Current situation as at Oct 2015 Tested writing out to CDRW a linux GS3 binary installation containing the lucene demo collection. Also tested Mac and Windows. The above all worked on these OS when tested around Oct 2015. Specifics:
- The mac Mountain Lion and Yosemite machines here had no optical drive. But we tested it with read-only GS3/web and GS3/packages folders (the two locations that GS3 stumbled on when it was run off a disc) and running the gs3-server script worked, and both the solr-demo and lucene-demo collections were fine and searchable.
- Running the GS3.07 off of a disc had also been tested on Windows with the updated build.xml, and that's fine too, including solr.
The one thing remaining to test is to create a universal binary that includes all the 64 bit Win/Lin/Mac bin subfolders and combines their lib folders, and create a universal binary that includes all the 32 bit versions, and test both of those.
Go to the GLI, choose File-"Write CD/DVD image" from the menu. The window "Write CD/DVD image" will pop up and require you to fill in some information.
- CD/DVD name (Give a name of the CD/DVD) for example: myCollects
- Two options for launching the library. The default option is "CD/DVD will install some files when used (faster)"
- All available collections are listed in the "Available collections". Select the collections by clicking the name of the collection. Once a collection is selected, the general information of the collection will be displayed in the "Selected collection's detail"
- The estimated size of selected collections in total can be seen near the end of the window
- Click button "Write CD/DVD image" to finish the collections output.
- The output collections are saved at GSDLhome/tmp/myCollects
Write onto a CD/DVD
Start a CD/DVD recorder software, add the myCollects folder into the CD/DVD, then click the button to burn a CD/DVD.
Running exported collections on Windows
myCollects/Setup.exe (if necessary, install some files to speed up the launch)
myCollects/gsdl/server.exe (directly enter into the library)
Creating CD/DVD-ROM's from Collections
Installing the Plugin
NB - the plug-in does not work from remote machines - you must use the GLI on the server itself, or alternately use the commandline.
- For All Platforms - Unix, OSX, Windows Download one of the Following
- Install into gsdl\bin\windows
- For Remote Machines (not recommended since plugin only works on server)
- unzip your gsdl-2.xx-export.zip file on local machine
- ftp the contents of the gsdl-2.xx… onto the hosting machine
Creating Collections From the Command Line (exportcol.pl)
- source setup.bash (in the Greenstone directory)
- perl -S bin/script/exportcol.pl -nonetscape <collection-name>
Using a Greenstone CD-ROM
The Greenstone digital library software itself comes on a CD-ROM, and you or your system manager have probably installed it on your system, following the instructions in the Greenstone Digital Library Installer's Guide. If so, Greenstone is already installed on your computer and you should skip the rest of this section.
Some Greenstone collections come on a self-contained Greenstone CD-ROM that includes enough of the software to run just that collection. To use it, simply put it into the CD-ROM drive on any Windows PC. Most likely (if “autorun” is enabled on your PC), a window will appear inviting you to install the Greenstone software. If not, find the CD-ROM disk drive (on current Windows systems you can get this by clicking on the My Computer icon on the desktop) and double-click it, then the Setup.exe file inside it. The Greenstone Setup program will be entered, which guides you through the setup procedure. Most people respond yes to all the questions.
When the installation procedure has finished, you'll find the library in the Programs submenu of the Windows Start menu, under the name of the collection (for example, “Development Library” or “United Nations University”).
Once the software has been installed, the library will be entered automatically every time you re-insert the CD-ROM if autorun is enabled.
Some notes on customising export - specifically for DSpacePlugout, but also applicable elsewhere;
- you can create a folder for modified plugouts for a specific collection in the same way you do for collection specific plugins
- export.pl is very similar to import.pl with many similar options.
- sub get_dc_metadata in BasPlugOut.pm can be modified to handle qualified dublin core. ( see https://list.scms.waikato.ac.nz/mailman/private/greenstone-devel/2007-February/001586.html )
- try export.pl at the prompt fro a list of options not available when exporting from the gli (note that gli defaults are sensible)