The MoodleBuild toolchain
patches and packages a Moodle source code directory into a Windows Azure Package using the Azure SDK directly, instead of relying on third-party tools. This allows an easier way to update and customize Moodle, components and
the Windows Azure SDK without the hassle of using outdated and incompatible versions.
The core of this toolchain is a batch file named build.cmd
. This script patches and packages Moodle using the tools and components included on the package available to download.
How to pack Moodle using the toolchain
- Download a Moodle release tarball from
Moodle.org and extract it to the moodle/ directory or do a
git clone on the moodle/ directory.
- Apply any patches or changes you want to this directory.
- Open build.cmd with your favorite text editor and check if the Azure SDK path is correct (AZURESDKPATH).
MOODLEVERSION should be 2.1 for releases since 22 Jul 2011, even if you are using version 2.0.
- Open a command prompt window and navigate to the directory where
build.cmd is located.
- Run build.cmd -k. It will run all steps necessary to pack Moodle into a deployable Azure package.
- -d: Copies config_check.php to the package, allowing anyone to open
http://yourmoodle.cloudapp.net/config_check.php and see if Moodle is loading the correct settings from your
ServiceConfiguration.cscfg file. This is a security hole and will dump your passwords and keys to anyone accessing the page. This option is intended for
debugging purposes only.
- -p: Copies and patches Moodle from moodle/ to the build directory.
- -c: Copies PHP and dependencies to the build directory. If the
-p step hasn't been run yet, it runs it.
- -k: Packages Moodle using cspack.exe from the SDK. If the previous steps haven't been run yet, it runs them.