diff --git a/HACKING b/HACKING index 077ba38..75f99f3 100644 --- a/HACKING +++ b/HACKING @@ -1,12 +1,20 @@ -this file contains information that might be helpful when browsing swfmills sources for whatever reason. -- the classes to represent SWF elements are generated with XSLT from the file src/xsl/source.xml with - cd src/ - xsltproc codegen/mk.xsl codegen/source.xml -the resulting code is not well indented, and really the xslt step should be integrated into the makefile. +This file contains information that might be helpful when browsing swfmill's +sources for whatever reason. -- the generated base classes are derived from SWFTag, SWFAction, SWFStyle, SWFFilter or (for s in source.xml) no base class at all (for thngs like "Rectangle"). Fonts are certainly special, both the contents of the DefineFont2 tag (not a "clean", generated class but the SWFGlyphList kludge) as well as freetype handling and conversion to the proper shape definitions. - -- the basic I/O code is in SWFFile (for header, compression) and SWFReader/Writer (for anything else, including SWF-style nBit numbers etc.) - -- the XSL stylesheet that makes up the "simple" processing mode (which is itself everything but simple) is built in src/xslt/. there's more README there. + * The classes to represent SWF elements are generated as part of the build + process, by processing codegen/source.xml through the codegen/mk.xsl XSLT + stylesheet. The resulting code is not well indented. + + * The generated base classes are derived from SWFTag, SWFAction, SWFStyle, + SWFFilter or (for s in source.xml) no base class at all (for things + like "Rectangle"). Fonts are certainly special, both the contents of the + DefineFont2 tag (not a "clean", generated class but the SWFGlyphList kludge) + as well as freetype handling and conversion to the proper shape definitions. + + * The basic I/O code is in SWFFile (for header, compression) and + SWFReader/Writer (for anything else, including SWF-style nBit numbers etc.) + + * The XSL stylesheet that makes up the "simple" processing mode (which is + itself everything but simple) is built in src/xslt/. there's more README + there. diff --git a/README b/README index cb3f78e..fa31a19 100644 --- a/README +++ b/README @@ -1,146 +1,170 @@ WHAT IS SWFMILL? -swfmill is a tool to process Shockwave Flash(TM) (SWF) files. -It can convert SWF from and to an XML-dialect called "swfml", -which is closely modeled after the SWF file format. +swfmill is a tool to process Shockwave Flash(TM) (SWF) files. It can convert +SWF from and to an XML-dialect called "swfml", which is closely modeled after +the SWF file format. -It also provides a libxslt-based XSL transformator that -supports an extension ("swft") which helps with generating -IDs for SWF objects and can import an SWF as XML using an -XPath command (swft:document()). +It also provides a libxslt-based XSL transformator that supports an extension +("swft") which helps with generating IDs for SWF objects and can import an SWF +as XML using an XPath command (swft:document()). -As a simple application of such functionality, swfmill can -pack together a bunch of media files (jpeg and png images, -other SWF movies, TrueType fonts) into an SWF as "library -objects" for your attachMovie() pleasure. +As a simple application of such functionality, swfmill can pack together a +bunch of media files (jpeg and png images, other SWF movies, TrueType fonts) +into an SWF as "library objects" for your attachMovie() pleasure. WARNING -swfmill is alpha-quality software. It might well not work -as it should. Please report your experiences if that seems -to be the case, send in (if possible small) SWFs or patches. +swfmill is alpha-quality software. It might well not work as it should. +Please report your experiences if that seems to be the case, send in (if +possible small) SWFs or patches. + +You can report bugs or contribute patches via Launchpad at +http://bugs.launchpad.net/swfmill/+filebug DEPENDENCIES swfmill requires, and the windows binary release contains code from: - libxml2 - (C) 1998-2003 Daniel Veillard. - libxslt/exslt - - (C) 2001-2002 Daniel Veillard. - zlib - (C) 1995-2004 Jean-loup Gailly and Mark Adler. - freetype - (C) 1996-2000, 2002, 2004 David Turner, - Robert Wilhelm, and Werner Lemberg. - libpng - (C) 2004 Glenn Randers-Pehrson. - -my references to the SWF format were: - Alexis' SWF Reference - http://sswf.sourceforge.net/SWFalexref.html - SSWF sources - http://sswf.sourceforge.net/ - MTASC sources - http://mtasc.org/ - + + libxml2 — © 1998–2003 Daniel Veillard. + libxslt/exslt — © 1998-2003 Daniel Veillard. + zlib — © 1995-2004 Jean-loup Gailly and Mark Adler. + freetype — © 1996-2000, 2002, 2004 David Turner, + Robert Wilhelm, and Werner Lemberg. + libpng — © 2004 Glenn Randers-Pehrson. + +My references to the SWF format were: + + Alexis' SWF Reference + http://sswf.sourceforge.net/SWFalexref.html + + SSWF sources + http://sswf.sourceforge.net/ + + MTASC sources + http://mtasc.org/ + + SWF File Format Specification + http://www.adobe.com/devnet/swf/ + COMPILING AND INSTALLING - -on linux, use the "GNU-standard" - ./configure && make && make install - -on windoze, if you have use for a tool like this, -you know better than me where to put swfmill.exe. - - + +On Linux, use the "GNU-standard" + + ./configure && make && make install + +On Windows, if you have use for a tool like this, you know better than me +where to put swfmill.exe. + + USAGE see swfmill -h for general usage options. convert an SWF (foo.swf) to XML: - swfmill swf2xml foo.swf bar.xml - + + swfmill swf2xml foo.swf bar.xml + convert such XML to SWF: - swfmill xml2swf bar.xml meep.swf + + swfmill xml2swf bar.xml meep.swf + SIMPLE SWFML DIALECT -for library generation, and probably other fun swf -construction, swfmill supports a simplified XML -dialect. to create a library swf that includes some -assets, construct an XML file that looks like this: - - - - - - - - - - - - - - - - +For library generation, and probably other fun SWF construction, swfmill +supports a simplified XML dialect. to create a library swf that includes +some assets, construct an XML file that looks like this: + + + + + + + + + + + + + + + + and run swfmill: - swfmill simple output.swf - -output.swf should now contain the specified assets (the jpg, -pngs, other swf and font) specified. + + swfmill simple output.swf + +output.swf should now contain the specified assets (the JPG, PNGs, other +SWF and font) specified. Some notes: - * the file paths in the simple xml are relative to - where you start swfmill. - * any that is placed within a - tag will be exported for attachMovie - with linkage id == their id attribute. for the above - example, you can attach library/testjpg.jpg with: - _root.attachMovie("jpg","foo",1); - * the font is available by its id also, and will contain - only the characters specified in its glyph attribute. - make sure you specify the correct encoding in the - processing instruction for special characters. + * The file paths in the simple XML are relative to where you start swfmill. + + * Any that is placed within a tag will be + exported for attachMovie with the ID attribute as the linkage ID. For the + above example, you can attach library/testjpg.jpg with + + _root.attachMovie("jpg", "foo", 1); + + * The font is also available by its ID, and will contain only the characters + specified in its glyph attribute. Make sure you specify the correct + encoding in the XML declaration for characters outside the ASCII range. + SHARED LIBRARIES -swfmill supports both generation and use of shared libaries. -To generate a shared libary, simply put your assets in a - tag just as for attachMovie (see above). - -To use a shared library, the library swf has to be available -both locally and under its "public" URL. Assuming you have -put your library on http://foo.com/library.swf, and the swf -is also in the library/ subdirectory of where you run -swfmill, put this in your definition XML: - -That should import all symbols that are exported in -library.swf, so they should be available under their name -with attachMovie(). Note: this only works with proper -assets, not with fonts. If you know how to use a font +swfmill supports both generation and use of shared libaries. To generate a +shared libary, simply put your assets in a tag just as for +attachMovie (see above). + +To use a shared library, the library swf has to be available both locally +and under its "public" URL. Assuming you have put your library on +http://foo.com/library.swf, and the SWF is also in the library/ subdirectory +of where you run swfmill, put this in your definition XML: + + + +That should import all symbols that are exported in library.swf, so they +should be available under their name with attachMovie(). Note: this only +works with proper assets, not with fonts. If you know how to use a font from a shared library, please tell me. COPYRIGHT - swfmill is (C) 2005, daniel fischer. - swfmill is licensed to you under the GPL. - see COPYING for details. - - -GETTING (INVOLVED) - - updates and stuff will be available at: - http://iterative.org/swfmill/ - - to praise or complain, send mail to: - dan@subsignal.org - - there is a mailing list for swfmill on osflash.org: - http://osflash.org/mailman/listinfo/swfmill_osflash.org +Copyright © 2005–2007 Daniel Turing. +Copyright © 2005–2009 swfmill contributors (see AUTHORS). + +swfmill is free software; you can redistribute it and/or modify it under the +terms of the GNU General Public License version 2, as published by the Free +Software Foundation. See COPYING for details. + + +GETTING INVOLVED + +Updates and stuff will be available at the swfmill homepage: + + http://www.swfmill.org/ + +There is a mailing list for swfmill hosted by osflash.org: + + http://osflash.org/mailman/listinfo/swfmill_osflash.org + +The latest development source code can be retrieved via Launchpad and the +Bazaar version control system: + + bzr branch lp:swfmill + +Report bugs or submit patches via Launchpad: + + http://bugs.launchpad.net/swfmill/+filebug +