Index of /lingo/lsw

Icon  Name                    Last modified      Size  Description
[PARENTDIR] Parent Directory - [DIR] editor_lingo_support/ 2016-07-11 16:57 - [TXT] readme.txt 2016-07-16 00:42 3.7K
-- ************************************************************************
-- @file      LSW FRAMEWORK/RUNTIME ENVIRONMENT
-- @author    Valentin Schmidt
-- ************************************************************************


1.) INSTALLATION
================

Notes:

- Needs Subversion (SVN) binaries to be installed in your System. In OS X Subversion is
  pre-installed, in Windows you can e.g. use the binaries compiled by CollabNet:
  http://www.collab.net/downloads/subversion

- If in OS X you get "svn version too old" messages, you can install the latest Subversion
  binaries with Homebrew (http://brew.sh/). Just run:

    brew update
    brew install svn

  in a Terminal window.


A) WINDOWS
==========

1.) Open a DOS box and run:

  mkdir C:\dev\lsw
  cd C:\dev\lsw
  svn checkout http://svn.dasdeck.com/lsw/ .

2.)

- In Exlorer navigate to C:\dev\lsw\setup

- Select "lsw_install.bat" and choose "Run as Admin" from Explorer context menu

DONE.

Now you can execute LSW scripts by double-clicking them in the Explorer.
You can try this with the scripts found in C:\dev\lsw\examples


B) MAC OS X
===========

1.) Open a Terminal window and run:

  mkdir /Applications/lsw
  cd /Applications/lsw
  svn checkout http://svn.dasdeck.com/lsw/ .
  unzip setup/lsw.app.zip -d .
  unzip setup/lsw_helper.app.zip -d .

2.)

- In Finder navigate to /Applications/lsw/examples/helloworld/

- Select "helloworld1.lsw"

- Type Command key + "I"

- In the Info window, under "Open with" select "Other Program", in file browser select "All Programs",
then navigate to /Applications/lsw, choose "lsw_helper"(.app) and confirm by pressing "Add" button.

- Then back in the Info window, press "Change all.." and confirm it in the dialog that pops up.

DONE.

Now you can execute LSW scripts by double-clicking them in the Finder.
You can try this with the scripts found in /Applications/lsw/examples/

Note: some of the examples are win-only, currently those are:
qt-ftp_simple, qt-scintilla-codeeditor, qt-screenshotsaver, qt-webkit-browser, qt-webkit-browser-ui and tray)


2.) UPDATING AN EXISTING LSW INSTALLATION TO THE LATEST VERSION
===============================================================

A) WINDOWS
==========

Open a DOS box and run:

  cd C:\dev\lsw
  svn update


B) MAC OS X
===========

Open a Terminal window and run:

  cd /Applications/lsw
  svn update


3.) RUNNING/DEBUGGING LSW SCRIPTS IN THE DIRECTOR AUTHORING APPLICATION (IDE)
=============================================================================

To run/debug "LSW" scripts in the Director IDE, the following steps are needed:

1. Add a new empty castlib called "lswlib" to your movie

2.Import file "lsw.ls" as parent script "lsw"

3. At the beginning of parent script "lsw", change line
     me[#RUNMODE] = "LSW"
   to
     me[#RUNMODE] = "MOVIE"

4. Add the following code line to an existing (or otherwise new) prepareMovie handler in your movie:

  -- lsw init code
  _global.$ = script("lsw").new()

5. Add the following code line to an existing (or otherwise new) stopMovie handler in your movie:

  -- lsw exit code
  if objectP(_global.$) then _global.$.destroy()

6. Add a frame loop script like this to the script channel:

    on exitFrame
      go the frame
    end

7. Save the movie in a folder that contains a "lib" folder which contains all LSW libs that the specific
LSW script actually needs (+ all assets that the LSW script tries to load). For testing, you could also 
save it directly in the LSW root folder, which obviously contains all ("official") LSW libs.

Done. The movie should run fine now.