Is the pack option available in the as2lib mtasc task? I use it a lot for dynamic class loading, in my code I load classes that I may not have directly referenced in the code and the -pack option of mtasc forces the classes into the swf file.
e.g -pack com/mycompany/myclasses
would put all classes in the "myclasses" folder into the swf. Right now I may have to go back to the exec useage of mtasc from ant which sucks as I really like the ant tasks you guys have created.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the pack option is supported. If you have one "pack" you can specify the "package" attribute, if you need more than one "pack" you can specify "package" child nodes with "path" attributes. (as you do for classpaths)
Greetings,
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, i've downloaded the CVS version of AS2ANT. However, the org.as2lib.ant directory only has .java files in it - it is missing, i assume, the .class files.
How do i go about generating/getting these new files?
Is it time for a new release of as2ant with the updated files? ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the beta already has support for declaring package-elements. Doing something like: '<package path="myTest"/>' as you did in you example should work.
The class-files are commited (I just checked this); they are in the src folder, together with the java-files. The compiled classes are also in the dist/as2ant.jar file.
Yeah, it is about time to make a new release. I'll maybe make one this weekend.
Greetings,
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, well, it "works", but not how i think it should. On the MTASC site, the doc's state that you should only include the _releative_ part of the path to the files you want to pack, and MTASC uses the classpath to find the files.
As you have it now, it passes the full directory to the -path arg, which isn't what i want.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I forgot to fix this for packages (I fixed it for classes in the beta release). I'll fix this.
Sorry for the inconvenience!
btw. there is a new sub-node you can add: 'argument'. It takes a 'name' and an optional 'value' attribute. You can use it for custom arguments as you need for Hacked MTASC.
You may also use it to add a 'path' argument (if you do not wanna wait until I fixed it):
<argument name="path" value="theRelativePath"/>
Cheers,
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is the pack option available in the as2lib mtasc task? I use it a lot for dynamic class loading, in my code I load classes that I may not have directly referenced in the code and the -pack option of mtasc forces the classes into the swf file.
e.g -pack com/mycompany/myclasses
would put all classes in the "myclasses" folder into the swf. Right now I may have to go back to the exec useage of mtasc from ant which sucks as I really like the ant tasks you guys have created.
Hi Grant,
the pack option is supported. If you have one "pack" you can specify the "package" attribute, if you need more than one "pack" you can specify "package" child nodes with "path" attributes. (as you do for classpaths)
Greetings,
Simon
Hurm. I tried to do this but i think i have the syntax incorrect. Here is how i've done it::
<mtasc swf="build/classes.swf" header="1:1:30" classpath="${root.cp};src" trace="com.thirdplacegames.logging.Logger.log">
..<package path="com/thirdplacegames/games/butterflywings/view" />
</mtasc>
This generates an error. Is the 'package' attribute stuff in CVS or part of the beta release?
Ok, i've downloaded the CVS version of AS2ANT. However, the org.as2lib.ant directory only has .java files in it - it is missing, i assume, the .class files.
How do i go about generating/getting these new files?
Is it time for a new release of as2ant with the updated files? ;)
Hi Jos,
the beta already has support for declaring package-elements. Doing something like: '<package path="myTest"/>' as you did in you example should work.
The class-files are commited (I just checked this); they are in the src folder, together with the java-files. The compiled classes are also in the dist/as2ant.jar file.
Yeah, it is about time to make a new release. I'll maybe make one this weekend.
Greetings,
Simon
Gaa - should have checked the src folder, thanks.
I'll check tonight to see if i can get the <package> node to work properly.
Thanks!
Ok, well, it "works", but not how i think it should. On the MTASC site, the doc's state that you should only include the _releative_ part of the path to the files you want to pack, and MTASC uses the classpath to find the files.
As you have it now, it passes the full directory to the -path arg, which isn't what i want.
Hi Jos,
I forgot to fix this for packages (I fixed it for classes in the beta release). I'll fix this.
Sorry for the inconvenience!
btw. there is a new sub-node you can add: 'argument'. It takes a 'name' and an optional 'value' attribute. You can use it for custom arguments as you need for Hacked MTASC.
You may also use it to add a 'path' argument (if you do not wanna wait until I fixed it):
<argument name="path" value="theRelativePath"/>
Cheers,
Simon
Excellent - i will check this out tonight or tomorrow.
Thanks for all your work on these tools - they make flash dev much more enjoyable!