summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--configure.in2
-rw-r--r--setup.py14
-rw-r--r--src/as3compile.13
-rw-r--r--src/as3compile.c13
-rw-r--r--src/as3compile.doc2
6 files changed, 40 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 64b6927c..e489fc1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -278,10 +278,12 @@
0.9.0:
* pdf2swf: Added support for Flash 8 Flashtype
- * src/swfdump: now dumps a few more Flash 8 tags (like DEFINESHAPE4)
- * pdf2swf: Common fonts are now linked directly into the executable (removes need for InstallPath in registry)
- * pdf2swf: New optimizing levels -O1 -O2
- * pdf2swf: Added direct gradient conversion
- * setup.py: Added Python setup script
+ * pdf2swf: numerous bugfixes
+ * pdf2swf: support for gradients
+ * pdf2swf: support for different optimization levels (-O1, -O2, --flatten)
+ * src/swfdump: Flash 8/9 support
+ * pdf2swf: Common fonts are now linked directly into the executable
+ * setup.py: added Python setup script
* lib/python/gfx: New python module for accessing pdf2swf functionality
- * lib/modules/swfabc.c: New module for the Flash9 AVM2 Actionscript
+ * as3compile: New tool, for compiling ActionScript 3.0
+ * swfc: added AS3.0 support
diff --git a/configure.in b/configure.in
index ad7d9c86..7d35992e 100644
--- a/configure.in
+++ b/configure.in
@@ -25,7 +25,7 @@ AC_ARG_WITH([poppler],
[ --with-poppler use poppler instead of internal xpdf (currently broken)], [USE_POPPLER=true])
PACKAGE=swftools
-VERSION=2008-09-22-1956
+VERSION=0.9.0
# ------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 094768f9..2b88fc7e 100644
--- a/setup.py
+++ b/setup.py
@@ -10,9 +10,15 @@ except ImportError:
cc = ccompiler.new_compiler()
+# leave it to gcc to detect c/c++ files. we'll be linking against -lstdc++
+# later on to ensure we do have all the c++ libraries, so we don't need to
+# compile *everything* as c++ just because of the few .cc files.
+cc.language_map[".cc"] = "c"
+
import os
import sys
import stat
+import re
DATADIR = "/usr/share/swftools/"
@@ -123,6 +129,14 @@ class ConfigScript:
return 1
elif name.startswith("INTERNAL"):
return 1
+ elif name == "PACKAGE":
+ return "\"swftools\""
+ elif name == "VERSION":
+ fi = open("configure.in", "rb")
+ for line in fi.readlines():
+ if line.startswith("VERSION="):
+ return '"'+line[8:].strip()+'"'
+ return "unknown"
elif "POPPLER" in name:
return None
elif name.startswith("HAVE_") and name.endswith("_H"):
diff --git a/src/as3compile.1 b/src/as3compile.1
index e39f65ec..cb207e41 100644
--- a/src/as3compile.1
+++ b/src/as3compile.1
@@ -40,6 +40,9 @@ Compiles a file written in ActionScript 3.0 to a SWF file.
\fB\-r\fR, \fB\-\-rate\fR
Set target SWF framerate
.TP
+\fB\-M\fR, \fB\-\-mainclass\fR
+ Set the name of the main class (extending flash.display.MovieClip)
+.TP
\fB\-l\fR, \fB\-\-library\fR \fIfile\fR
Include library file \fIfile\fR. <file> can be an .abc or .swf file.
.TP
diff --git a/src/as3compile.c b/src/as3compile.c
index 5d20d314..43b646f8 100644
--- a/src/as3compile.c
+++ b/src/as3compile.c
@@ -53,6 +53,7 @@ static struct options_t options[] = {
{"X", "width"},
{"Y", "height"},
{"r", "rate"},
+{"M", "mainclass"},
{"l", "library"},
{"I", "include"},
{"N", "local-with-network"},
@@ -118,6 +119,10 @@ int args_callback_option(char*name,char*val)
return 0;
}
else if(!strcmp(name, "D")) {
+ if(!strstr(val, "::")) {
+ fprintf(stderr, "Error: compile definition must contain \"::\"\n");
+ exit(1);
+ }
as3_set_define(val);
return 1;
}
@@ -156,6 +161,7 @@ void args_callback_usage(char *name)
printf("-X , --width Set target SWF width\n");
printf("-Y , --height Set target SWF width\n");
printf("-r , --rate Set target SWF framerate\n");
+ printf("-M , --mainclass Set the name of the main class (extending flash.display.MovieClip)\n");
printf("-l , --library <file> Include library file <file>. <file> can be an .abc or .swf file.\n");
printf("-I , --include <dir> Add additional include dir <dir>.\n");
printf("-N , --local-with-network Make output file \"local with networking\"\n");
@@ -222,7 +228,12 @@ int main (int argc,char ** argv)
//as3_warning("output name not given, writing to %s", outputname);
}
- as3_parse_file(filename);
+ if(!strcmp(filename, ".")) {
+ as3_parse_directory(".");
+ } else {
+ as3_parse_file(filename);
+ }
+
void*code = as3_getcode();
SWF swf;
diff --git a/src/as3compile.doc b/src/as3compile.doc
index c6c007c2..a49c0422 100644
--- a/src/as3compile.doc
+++ b/src/as3compile.doc
@@ -25,6 +25,8 @@ Compiles a file written in ActionScript 3.0 to a SWF file.
Set target SWF width
-r, --rate
Set target SWF framerate
+-M, --mainclass
+ Set the name of the main class (extending flash.display.MovieClip)
-l, --library <file>
Include library file <file>. <file> can be an .abc or .swf file.
-I, --include <dir>