1Lightspark is an open source Flash player implementation for playing
2files in SWF format. Lightspark can run as a web browser plugin or as
3a standalone application.
5Lightspark supports SWF files written on the newest version of the
6ActionScript language, ActionScript 3.0, which was introduced at the
7same time as Flash player 9.
12To compile this software you need to install development packages for
13llvm (version 2.8 or >= 3.0), opengl, curl, zlib, libavcodec,
14libglew, pcre, librtmp, cairo, libboost-filesystem,
15gtk-2, libjpeg, libavformat, pango, liblzma
17If sound is enabled (on by default), you will also need the
18development package for pulseaudio-libs and/or libsdl.
20Install also cmake, nasm and gcc (version 4.6.0 or newer) or clang
22To build the software please follow these steps.
241) cd lightspark
252) mkdir obj
263) cd obj
274) cmake -DCMAKE_BUILD_TYPE=Release ..
296) sudo make install
32To enable debug mode change the cmake command like this:
334b) cmake -DCMAKE_BUILD_TYPE=Debug
35CMAKE_BUILD_TYPE available: Debug LeanDebug Release RelWithDebInfo Profile
37Sound support may be disabled using the following option:
38-DENABLE_SOUND=0 The audio backend can be set using
39-DAUDIO_BACKEND=<pulseaudio|sdl> (default is pulseaudio)
44Using `make install`, lightspark is installed in the system wide
49Firefox plugin path and Firefox should show it in the about:plugins
50list and in the Tools->Add-ons->Plugins window.
52Lightspark registers itself as the plugin for
53application/x-shockwave-flash and for application/x-lightspark, so it
54should be recognisable in the about:plugins page. Its description
55string is "Shockwave Flash 12.1 r<current version>". The current
56version is now "r710".
58Firefox is not able to deal very well with multiple plugins for the
59same MIME type. If you only see a black box where a flash app should
60be try to remove any other flash plugin you have installed.
65The command line version of Lightspark can play a local SWF file.
66Execution: lightspark file.swf
68Type `lightspark` to see all command line options.
73Ctrl+Q Quit (standalone player only)
74Ctrl+M Mute/unmute sounds
75Ctrl+P Show profiling data
76Ctrl+C Copy an error to the clipboard (when Lightspark fails)
81Many web sites do not yet work yet because the implementation is
82incomplete. See the following page for support status of selected web
85You may also try Lightspark on some known-to-work Youtube movies:
98If you think you have found a bug in Lightspark, please file a bug
99report at https://bugs.launchpad.net/lightspark. See
100https://github.com/lightspark/lightspark/wiki/Reporting-Bugs for help
101on reporting bugs.
1Overview of graphics pipeline
3Lightspark tries to be efficient on the rendering side using both caching and
4multi threaded rasterization.
6Most of the graphic assets come in vectorial form. Cairo is used to transform
7vectorial data in raster (bitmap format). PangoCairo is used for dynamic text.
8Rendered data is then transferred onto OpenGL textures using Pixel Buffer
9Objects (that hopefully are implemented using DMA). Textures are only loaded
10when an object changes, so static objects are always cached in VRAM.
12Pipeline for Stage:
131) When an object changes and needs to be redrawn it will call its
14DisplayObject::requestInvalidation method. The method needs an InvalidateQueue
15parameter and will add the object to such queue.
162) Invalidation requests are gathered together in the queue, but not executed
17until the currently handled event ends, to make sure we are rendering a
193) At the end of the event all objects in the queue will have their ::invalidate
20method called. This method returns an instance of IDrawable or NULL is rendering
21is not necessary. It's important that the IDrawable instance contains a copy of
22all the needed object state since the object may change while the rendering
23happens. In the future Copy On Write could be useful to save the copy of data in
254) The returned IDrawable and a reference to the object itself will then be
26stored inside an AsyncDrawJob. The reference to the objects is necessary to make
27sure the CachedSurface of the object, which stores information about the OpenGL
28texture where the data must end, survives until the end of the rendering.
295) The AsyncDrawJob in added to the Thread Pool, to be executed. It will use
30IDrawable::getPixelBuffer to get the raw pixels and upload them to the GPU.
1-- How to crosscompile lightspark win32 binaries on a linux box --
2(This is the only supported way to build win32 binaries)
4I assume that your currently one level above the directory
5'git', which contains the lightspark sources.
71. Apply this patch to your local cmake installation to fix a bug with .rc file handling:
102. Install MXE (M cross environment) by
11 1. git clone -b master https://github.com/mxe/mxe.git
12 2. cd mxe
13 3. Apply the patch from below to src/curl.mk
14 4. make gcc llvm glibmm gtk2 ffmpeg cairo pango boost libxml++ glew freetype curl librtmp
15 Note: You may want to add e.g. '-j4' to build four packages in parallel, or e.g. JOBS=3 to use three cpus per package.
16 Note: This may ask you to install additional packages. Do so using the package manager of your distribution.
17 For Ubuntu (oneiric), use 'apt-get install libtool yasm scons flex unzip wget')
18 5. cd ..
203. Build lightspark
21 1. mkdir mingw && cd mingw
22 2. cmake -DCMAKE_INSTALL_PREFIX=../mingw-build -DCMAKE_BUILD_TYPE=Debug -G'Unix Makefiles' -DCMAKE_TOOLCHAIN_FILE=../mxe/usr/i686-pc-mingw32/share/cmake/mxe-conf.cmake ../git
23 3. make package
24 4. cd ..
264. Run lightspark from 'mingw-build/lightspark'
31@@ -7,7 +7,7 @@ $(PKG)_CHECKSUM := f6016a24051d98806ca3ddf754592701cb66e00c
32 $(PKG)_SUBDIR := curl-$($(PKG)_VERSION)
33 $(PKG)_FILE := curl-$($(PKG)_VERSION).tar.bz2
34 $(PKG)_URL := http://curl.haxx.se/download/$($(PKG)_FILE)
35-$(PKG)_DEPS := gcc gnutls libidn libssh2
36+$(PKG)_DEPS := gcc gnutls libssh2
38 define $(PKG)_UPDATE
39 wget -q -O- 'http://curl.haxx.se/download/?C=M;O=D' | \
40@@ -23,7 +23,7 @@ define $(PKG)_BUILD
41 --disable-shared \
42 --prefix='$(PREFIX)/$(TARGET)' \
43 --with-gnutls \
44- --with-libidn \
45+ --without-libidn \
46 --enable-sspi \
48 $(MAKE) -C '$(1)' -j '$(JOBS)' install