Giter Site home page Giter Site logo

pakkio / lslforge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raysilent/lslforge

0.0 3.0 0.0 219 MB

LSLForge - maintaining recent LSL definitions fork

HTML 3.97% Batchfile 0.04% Shell 0.21% CSS 0.01% LSL 0.71% Java 43.47% XSLT 0.09% Haskell 51.49%

lslforge's Introduction

LSLForge

An LSL Script Editor/compiler for Second Life's Scripting Language.

LSLForge is a fork of the popular LSLPlus editing evironment, to provide Linden Scripting Language (LSL) support in Eclipse.

Fork Purpose

This fork is just to produce a binary version for Windows and Linux that can be used on OpenSim. Render.hs should not produce extra parenthesis which are producing errors in OpenSimulator.

News (newest first)

  • 2017-02-10 LSLForge 0.1.9.3 (Windows, Linux (Thanks @Trapez), Mac (Thanks @PellSmit))
    • ATTACH_FACE_TONGUE misspelled
  • 2017-01-07 LSLForge 0.1.9.2 (Windows, Linux (Thanks @Trapez), Mac (Thanks @PellSmit))
    • OBJECT_ATTACHED_SLOTS_AVAILABLE
    • llGetEnv("region_object_bonus") (in comments)
  • 2016-11-13 LSLForge 0.1.9.1 (Windows, Linux (Thanks @Trapez), Mac (Thanks @PellSmit))
    • OBJECT_GROUP_TAG, OBJECT_TEMP_ATTACHED added
    • Bug fixes (Thanks @PellSmit):
      • #35 (negative out of range index)
      • #6 (backslash in string)
      • #26 (multiline string bug)
    • Bug fix #37 (cannot Run -> Run as -> Launch in LSL Sim)
    • Bug fix some null pointer exceptions during recompiled
  • 2016-11-08 LSLForge 0.1.9 (Windows, Linux, Mac)
    • JSON_APPEND, CLICK_ACTION_ZOOM added
  • 2016-10-22 LSLForge 0.1.8 (Windows only)
    • XP_ERROR_REQUEST_PERM_TIMEOUT missing added
  • 2016-10-20 LSLForge 0.1.7 (Windows only)

Description

LSLForge is a plugin for the Eclipse platform. The plugin allows editing, "compiling" (gathering code included in modules), executing, and unit testing your Second Life® Linden Scripting Language (LSL) code.

Because it is an Eclipse plugin, when you use LSL Plus you can take advantage of many of the useful features of Eclipse. Integrated support of a source code control system such as Git, CVS and Subversion comes for "free", and there are many other features -- task list management, integration with bug tracking tools, etc. You will of course need to make sure you get the appropriate plugins to use these features.

Second Life® Group

The official group for LSLForge Editor tool is LSLForge Users. General announcements, questions and answers.

Installing

Eclipse Plugin

Any of the Eclipse installations were found working:

  • Eclipse Juno RC2 (4.2.2)
  • Eclipse Luna (4.4.0)
  • Eclipse Mars.1 (4.5.1)
  • Eclipse Mars.2 (4.5.2)
  • Eclipse Neon (4.6.0)

To install a plugin into Eclipse, choose Help > Install New Software. Click Add..., give it a name and enter the link for location:

https://raw.githubusercontent.com/elnewfie/lslforge/master/eclipse/

This way you'll get the newest release.

Alternatively you may switch to a development fork and try a specific version since 0.1.8 (including work in progress branches):

  • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.3/eclipse/
  • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.2/eclipse/
  • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.1/eclipse/
  • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9/eclipse/
  • https://raw.githubusercontent.com/raysilent/lslforge/0.1.8/eclipse/

For even older version, clone the whole repo and link your Eclipse to a particular folder under eclipse\archive.

If you don't see any items for installing, try to uncheck "Group items by category"

Run eclipse -clean to make it forget cached downloads

Checkbox 2 items:

  • "LSLForge"
  • One of the native parts according to your environment.

Install, accept and restart Eclipse

Switch to LSLForge Perspective and create a new LSLForge Project

Known Issues

  • *.lslp files compilation issues although everything is correct. It may happen when a lot of $import keywords are used and at some point the compiler gets stuck. What may help is:

    • Adding a fake *.lslm module along the project, it could be called Fake.lslm. Opening it and adding a space, then removing it and hitting Save will force the project to be recompiled
    • Forcing recompilation of a module that is referenced by *.lslp file by opening it, doing some fake change, and hitting Save

Tips & Tricks

Importing Modules

This demonstrates:

  • How to use folders when importing modules (dot notation)
  • How to import a module with a paramater

Modules/Debug.lslm :

$module (integer DEBUG)
// pragma inline
bug(string place, string message) {
  if (DEBUG) llOwnerSay("["+llGetScriptName()+"."+place+"]: "+message);
}

Script.lslp :

integer DEBUG=TRUE; // has to be a variable
$import Modules.Debug.lslm(DEBUG=DEBUG) de;

do() {
  debug("do()", "This is a call of 'bug' function from 'de' module");
}

Referencing Modules From Other Projects

Imagine you move Modules folder to a separate project called ModulesProject to use it from different other projects. In the main project that uses ModulesProject, place a checkmark along its name under Project settings > Project References.

ModulesProject directory tree becomes part of the project's tree. It will still be imported as $import Modules.Debug.lslm without any additions.

Native Library Compilation Example

Example Environment

  • Windows
    • 8.1 64bit
    • 10 64bit

If you succeed with compilation for Linux or Mac please add an issue with step-by-step instructions

Compiling Haskell native LSLForge binary

GHC 6.10.1 (http://www.haskell.org/ghc/download_ghc_6_10_1) should be used and after installation, system "Path" variable should be updated to include Haskell \bin directory.

For all below packages, downloaded to some temp folder, 3 steps should be done:

Note: Some of these actions may require administrative rights. Run your command prompt as administrator in case you see errors.

runhaskell Setup.hs configure
runhaskell Setup.hs build
runhaskell Setup.hs install

(Setup may be called "Setup.lhs")

https://hackage.haskell.org/package/utf8-string-0.3.6

https://hackage.haskell.org/package/polyparse-1.1

https://hackage.haskell.org/package/pretty-1.0.1.0

https://hackage.haskell.org/package/HaXml-1.19.6

https://hackage.haskell.org/package/transformers-0.1.4.0

https://hackage.haskell.org/package/monads-fd-0.0.0.1

https://hackage.haskell.org/package/fclabels-0.4.2.1

https://hackage.haskell.org/package/binary-0.4.1

https://hackage.haskell.org/package/pureMD5-0.2.4

https://hackage.haskell.org/package/template-haskell-2.3.0.0

Now we configure, build, install LSLForge itself from its inner "haskell" folder in a similar way.

Post-compilation

If your "install" was successful, exe-file will appear at C:\Program Files (x86)\Haskell\bin folder (look at the message after install). Permission system may prevent file(s) copying to the folder. It may as well reside close to source folder under build, if your "install" failed. You will be able to link to it anyway.

Now you only need to specify this *.exe in Eclipse, Preferences > LSLForge settings.

Eclipse should be restarted

lslforge's People

Contributors

raysilent avatar elnewfie avatar pakkio avatar pellsmit avatar

Watchers

Salahzar Stenvaag avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.