Offline Moodle Create Installer

Jump to: navigation, search
Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.

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

What You’ll Need

Firstly you'll need an Offline Moodle environment to go inside your installer in the first place. For details on how to create one check out Creating an Offline Moodle Environment.

Once you have a working environment you want to begin creating a distributable package, the installer. The easiest way to do this is to use a ready made tool that'll create the installer for you. The best we've found that's free is the NSIS installer 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.