Note: You are currently viewing documentation for Moodle 3.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Offline Moodle Create Installer.

Development:Offline Moodle Create Installer

From MoodleDocs
Revision as of 13:57, 4 June 2008 by Colin Chambers (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

To ensure a standard approach to developing offline moodle environments it is important to record and maintain details

What You’ll Need

Create an Environment

Source files Xampp: xampplite-win32-1.6.6.exe Provide environment to run Offline Moodle web server, database server etc Moodle: moodle-1.9.4 zip release version ideally with offline moodle enhancements. Unzipped to htdocs/moodle Moodle Data folder created in root folder of xampp Portable Start menu: pstart available at http://www.pegtop.de/start/

To put it all together follow the separate document titled Environment Creation

Create an installer

Once you have a working version begin creating a distributable package. We use the NSIS installer http://nsis.sourceforge.net/Main_Page since it provides a customisable installer package that runs on the windows platform and it’s free. It’s very easy to create an installer using the wizard provided in the nsis edit at http://hmne.sourceforge.net/

Creating an Installer

Ok, you should now have a working Offline Moodle environment. The next step is to package it up and distribute it.

First you have to decide on the installer you want to package this up with. We chose the NSIS installer from Nullsoft because it’s highly configurable and it’s free. Unfortunately it only works on windows.

Creating an NSIS script

Once you have installed the nsis editor go to ‘file\new script from wizard’ click next

=Application Information

then enter the request values. Note that the Application Website field will be used to create an internet shortcut and placed in the same folder as Offline Moodle. It will have the same name as the Application name. We already have an internet shortcut named Offline Moodle that points to http://localhost/moodle which takes a user to Offline Moodle on their machine. So you might want to leave this empty to avoid overwriting the current file.

Click next

Setup Options

Leave all settings at default. Setup file can be something like Offline Moodle Setup 0.3.exe Setup Lang defaults to English

Click next

Application directory and License

Leave with default values except for license file. We use the apache license file at xampp\licenses\apache\LICENSE.txt in the absence of a specific file for Offline Moodle

Click next

Application Files

This part takes a while because we can’t find away to import all the necessary files without letting the nsis installer run through each one. This can take quite a while.

Delete the two example files using the x (Remove file) icon above the file window. Then click the add directory tree icon. It will open a dialogue box titled EditDirectory

Enter the path to the xampp folder containing the xampp and moodle installation you wish to use (Copy and pasting from windows explorer is easiest I find). Leave the defaults and click ok.

The dialogue box will then close and begin importing the many files necessary into the install script you are creating. The program will look as if it is not doing anything and has hung but check your hard drive activity light and you should see a lot of activity.

Once all the files have been imported to the script the file area will list all the files included in the xampp install.

Click next

Application Icons

Enter the Application Start Menu Folder Name.

Leave the defaults. Remove the first two shortcuts since we want users to use the portable start menu. Change the help.lnk shortcut to point to the readme.htm file

Click next

Execute after setup

You can use these values Program: $INSTDIR\setup_xampp.bat Readme: $INSTDIR\readme.htm

Click next

Uninstaller

Accept the defaults

Click next

Wizard Finished

Check the save script and compile boxes. Click finish

Enter the path to where you wish the script to be saved and the installer to be created.