Running Moodle Mobile in Desktop

Jump to: navigation, search

Moodle Mobile can run in Desktop using node-webkit

All the functionalities are available in the Desktop version (download files, take a photo, upload a picture, record and audio....) and also the application can work online and offline as the mobile version does.

Running

For running Moodle Mobile in desktop you need to follow these instructions:

1 Download node-webkit https://github.com/rogerwang/node-webkit (Downloads section)

2 Download the last version of Moodle Mobile code from https://github.com/moodlehq/moodlemobile/archive/master.zip

3 Rename the .zip extension to .nw


All platforms

You can put files of node-webkit in the same directory with your app's files including package.json, and then just run the nw executable.

Windows

On Windows, the easiest way to run the app is to drag the folder onto nw.exe, or a shortcut to nw.exe. Remember to drag the folder containing package.json, and not package.json itself.

You can also call it from the command line:

For instance:

nw C:\apps\myapp
nw C:\apps\packagedapp.nw


Linux

On Linux, you can use one of these command lines:

nw /home/path/to/appdir/ 
nw /home/path/to/packagedapp.nw


If you have installed the .deb, you can double click on .nw files in your file manager as well.


Mac OS X

On Mac OSX, a folder or .nw file can be dropped onto the nw.app application bundle. On the Mac OSX Terminal (commandline), you can use nw like this (assuming it's installed to the Applications directory):

open -n -a node-webkit "/home/path/to/app" 

In some cases it may be faster to invoke the nw binary inside the application bundle directly via the following:

/Applications/node-webkit.app/Contents/MacOS/node-webkit myapp 

You can setup an alias in your Terminal session to call the binary when you use nw by adding an alias to your ~/.bash_profile (open -a TextEdit ~/.bash_profile):

# alias to nw
alias nw="/Applications/node-webkit.app/Contents/MacOS/node-webkit"

Now you can call nw from the commandline like Linux and Windows:

nw "/home/path/to/game" 

Packaging

You may want package the application for distribution, please follow this guide: https://github.com/rogerwang/node-webkit/wiki/How-to-package-and-distribute-your-apps

https://github.com/rogerwang/node-webkit/wiki/How-to-package-and-distribute-your-apps

See also

https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps