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.

Showing 4 comments
  • Rich
    Reply

    Thanks to Simon for these very helpful instructions.
    I tried the instructions he made a while back and was never able to get it to work.
    I just found his updated instructions here and tried again.
    I’ve just added a few bits to show exactly what worked for me.
    I’ve looked at a few different options trying to decide which way to go.
    HTML5 sounds great, but it requires a separate license, and currently lacks features I need.
    Todd Fabacher/Digital Pomegranate posted a utility to get Livecode to work with WordPress, but I never found instructions on how to use it.
    If anybody has instructions on that, please let me know.
    This method is free and has been around a while.

    Here are the software versions I used with Simon’s instructions:
    XAMPP for Windows 7.1.7
    LiveCode 8.1.6 Windows Community Server
    Windows 8.1 with latest updates as of 8/9/17
    The system on my computer uses port 80 which kept this from working, so I changed to 8081.
    I don’t really understand why, but I had to change the line in httpd.conf from Listen 80 to Listen 8081 AND I had to click the Config button in the Control panel then the Service and Port Settings button and change the main port to 8081.
    I also changed the SSL port to 8082 there, but I’m not sure if that was necessary.

    The text above didn’t work when it was the only text in the test.lc file. I had to put all of the following in it:

    Sample

    Since I changed my port to 8081, I had to launch the file using:
    http://localhost:8081/test.lc

    • Simon
      Reply

      You are most welcome.

      I feel the same with the HTML5 publishing – hopefully it will improve over time and the size of the download will get much smaller as well.

      I have had a few requests for integrating with WordPress – will post something soon as I am able to.

  • Rich
    Reply

    Simon, I apologize if I already sent this. My text disappeared and I wasn’t sure if it was because I has already clicked Post. It appears that my test.lc file was embedded in your page rather than displayed as plain text. It just shows the word “Sample” rather than the text. Can you fix that? Also, your website isn’t working well in Chrome. Most, if not all of the links jump to the “We are working on our website” page.

    • Simon
      Reply

      Hi Rich

      Sorry for the late reply. Was not aware of any chrome issues, thanks for mentioning it. We have just gone live with (hopefully) a nice new site the weekend, so hopefully this will solve any browser related issues that may have crept into the old site. Not to sure what you mean about re. test.lc file.

      Simon

Leave a Comment

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt

Start typing and press Enter to search