Installing LiveCode on Windows

Currently I have been in the process of setting myself up on a new PC and that has meant reinstalling everything – including a locally hosted dev server.

Typically you need to install their own local development server to test and build websites locally – unless you want to work online – which is not always practical. If your internet connection fails – it can cost you huge amounts of precious time that most of us already don’t have and working local means everything is faster making you more productive.

Two of the most popular local servers for Windows are XAMPP and WAMP – both letting you install a combination of Apache, PHP, MySQL and also a few other bits and pieces.  Installation is usually pretty simple with a few extra steps needed for integrating LiveCode server.

Here is how to install either XAMPP or WAMP – both work well and the choice is yours.

Here is how I did it.

Before starting – neither WAMP or XAMPP

1. XAMPP

Firstly you need to download the installer from https://www.apachefriends.org/download.html

Once it is downloaded – run through the installer and follow the instructions. I did not encounter any problems, so to save a bit of time, I won’t go through the entire installation process. As per the installation recommendations, I have installed to C:\xampp\

XAMPP gives you a handy little control panel so you can choose when to load it and what services you are running.

Once XAMPP is installed, it is time to download LiveCode Community server from http://downloads.livecode.com/livecode/

Once its downloaded, you need to extract it from the zip file and copy it somewhere. I suggest to C:\xampp\livecode

Now the fun part – getting it setup with Apache. To do this, you need to edit the C:\xampp\apache\conf\httpd.conf file. I like to use Sublime Text – it is a great text editor.

The following is all based on my XAMPP installation path, C:\xampp, so you will have to adapt the following if you used a different location

In the <Directory “C:/xampp/htdocs”> (line 247) section, add:

AddHandler livecode-script .lc
Action livecode-script /livecode-cgi/livecode-community-server.exe

just before the closing “</Directory>”

and then after the “</Directory>” add:

<Directory "C:/xampp/livecode">
Options All
AllowOverride All
Require all granted
</Directory>

ScriptAlias /livecode-cgi/livecode-community-server.exe "C:/xampp/livecode/livecode-community-server.exe"

You should now be able to successfully start or restart Apache via the XAMPP Control panel.

You can test to see if LiveCode is working by creating a text file containing a simple script e.g.

<?lc
put “This is a test script”
?>

Save it as: C:\xampp\htdocs\test.lc and then fire up your browser and browse to: http://localhost/test.lc – the browser should display “This is a test script”

2. WAMP

You can download WAMP from http://www.wampserver.com/en/

Install WAMP Server, like XAMPP its a painless process.

When trying to run Wampserver, I had an error about MSVCR110.dll being missing and needed to download the Visual C++ Redistributable for Visual Studio 2012 Update 4 to fix the problem.

Like XAMPP you just need to edit the httpd conf file

Edit the

C:\wamp64\bin\apache\apache2.4.23\conf\httpd.conf file – its nearly the same as XAMPP.

In the <Directory “${INSTALL_DIR}/www/”> section add:

AddHandler livecode-script .lc
Action livecode-script /livecode-cgi/livecode-community-server.exe

just before the closing “</Directory>”

and then after the “</Directory>” add:

<Directory "C:/xampp/livecode">
Options All
AllowOverride All
Require all granted
</Directory>

 

And there we go – to ways to get LiveCode up and running on your Window’s PC.

Any problems, just post them in the comments below and I will see what I can do to help you.

Leave a Reply