Install Love2D and SublimeText Love editor in Windows 8


Here is a quick guide to setup Love2D in Windows 8 and SublimeText as IDE. First, we can go to the official website of Love2D at https://love2d.org/ and choose installer 32/64bit installer (depend on your OS).

Executable Love in CommandLine
Add LOVE path into Environment variables by : “Window Key” + W and type “edit environment”, select edit system environment.

Go to environment variables -> System variables -> Path. Append “C:Program Files (x86)LOVE;” and save. Now, “love” can run under DOS.

Install IDE
I suggest using SublimeText2. Make sure we already have Git installed.
After download, don’t forget to using “Sublime Package Control”. Press “CTRL” + “`” (backtick) and add this:

1
import urllib2,os; pf=’Package Control.sublime-package’; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),’wb’).write(urllib2.urlopen(‘http://sublime.wbond.net/’+pf.replace(‘ ‘,’%20’)).read()); print ‘Please restart Sublime Text to finish installation’

After restart your SublimeText, we can install “SublimeLove” from https://github.com/minism/SublimeLove by adding into Package Control -> Install.

To be able running Love2D projects from SublimeText in Windows 8, we need to modify the build. Go to Preferences -> Browser Packages -> SublimeLove -> Love.sublime-build and change it content into:

1
2
3
4
5
{
    "cmd": ["love", "$file_path"],
    "selector": "source.lua.love",
    "shell": true
}

Before build the projects, select build -> Love first. Then we’re ready!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.