X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fas3compile.c;h=e59f6910b06da0db8fa41fd1a5f2167ebc85f8d4;hb=d3b8cc9311940208b32917a72625b3b6bdda1165;hp=4f0193e507b4d149682e103279e6703a964dc6aa;hpb=90916f8638e4a996fc945e5ed90d7618d3dca0f6;p=swftools.git diff --git a/src/as3compile.c b/src/as3compile.c index 4f0193e..e59f691 100644 --- a/src/as3compile.c +++ b/src/as3compile.c @@ -38,6 +38,8 @@ static double width = 400; static double height = 300; static int flashversion = 9; static int verbose = 1; +static char local_with_networking = 0; +static char local_with_filesystem = 0; static struct options_t options[] = { {"h", "help"}, @@ -45,12 +47,14 @@ static struct options_t options[] = { {"v", "verbose"}, {"q", "quiet"}, {"C", "cgi"}, +{"D", "define"}, {"X", "width"}, {"Y", "height"}, {"r", "rate"}, {"l", "library"}, {"I", "include"}, {"T", "flashversion"}, +{"R", "recurse"}, {"o", "output"}, {0,0} }; @@ -94,14 +98,32 @@ int args_callback_option(char*name,char*val) do_cgi = 1; return 0; } - else if(!strcmp(name, "-l")) { + else if(!strcmp(name, "l")) { as3_import_file(val); return 1; } - else if(!strcmp(name, "-I")) { + else if(!strcmp(name, "I")) { as3_add_include_dir(val); return 1; } + else if(!strcmp(name, "R")) { + as3_set_option("recurse","1"); + return 0; + } + else if(!strcmp(name, "D")) { + as3_set_define(val); + return 1; + } + else if (!strcmp(name, "N")) + { + local_with_networking = 1; + return 0; + } + else if (!strcmp(name, "L")) + { + local_with_filesystem = 1; + return 0; + } else { printf("Unknown option: -%s\n", name); exit(1); @@ -218,6 +240,11 @@ int main (int argc,char ** argv) tag = swf_InsertTag(tag, ST_END); swf_FreeABC(code); + + if(local_with_filesystem) + swf.fileAttributes &= ~FILEATTRIBUTE_USENETWORK; + if(local_with_networking) + swf.fileAttributes |= FILEATTRIBUTE_USENETWORK; writeSWF(&swf); swf_FreeTags(&swf);