I messed around with a few preprocessors a week or so ago, and just had
so many problems (due to ignorance - I'm a noob when it comes to
java/ant etc). However, finally I got FMPP to work (
http://fmpp.sourceforge.net/ ), and while the preprocessing directives
aren't the prettiest (they look like html tags), once I got it working I
was beyond caring about that :)
This is the appropriate part from my build.xml:
<!-- PreProcess all the Actionscript with FMPP, output to build
directory -->
<taskdef name="fmpp" classname="fmpp.tools.AntTask"
classpath="${dependencies_dir}/fmpp/lib/fmpp.jar" />
<fmpp
sourceRoot="${src_dir}" outputRoot="${build_dir}"
modes="ignore(server/**/*, lib/**/*, dependencies/**/*),
execute(**/*.as), copy(**/*.swf), ignore(**/*)"
quiet="false" >
<data>
antProperties(svn_version)
debug: true
</data>
</fmpp>
Actually, so that "modes" line makes sense, my folder structure is:
/build
/deploy
/src
/com
/dependencies
/lib
/server
And I only want it to preprocess .as files from the /src and /src/com
(not dependencies, lib or server), copy any .swf files (in case MTASC
needs them as base files) and ignores the rest.
Regards,
Grant Cox
John Mark Hawley wrote:
UPDATE: After a lot of flailing and forcing Ant to specifically include the
jars for Prebob, I actually got it to run. However, all it does it copy things
from one directory to another, and no amount of manual flogging and guesswork
can get it to actually preprocess anything. Has anyone tried Prebop and gotten
it working, or does anyone have an IDE-friendly preprocessing solution
themselves?
------------------
Mark Hawley said:
There doesn't seem to be a simple tutorial for actually getting custom Ant
tasks installed and running. Even as2Ant leaves you out to dry when it comes to
actually getting it to work the first time. Any help?
Has anyone else on the list experimented with the Prebob preprocessing Ant
task, or custom Ant tasks in general in Eclipse? I can't seem to get mine to
work...I have a feeling it's because I don't have the java SDK installed, and
no one else is running into this because mot of the Flash devs fooling around
with Ant and Eclipse in the first place are also developing Java occasionally.
(UPDATE: well, installing the SDK, and making sure Ant could see tools.jar did
squat.)
In Eclipse->Preferences->Ant I can see the preprocessor task is defined.
Vanilla Ant builds are working 100%, but ant tasks installed as Eclipse plugins
don't work when built, they just croak and give a massive, unhelpful Ant
error.
--snip from build.xml---
<!-- adding this does nothing
<taskdef name="preprocess" classname="com.objfac.prebop.ant.PreprocessorTask"/>
-->
<target name="preprocess" description="Run preprocessor">
<!-- perform preprocessing steps here -->
<echo message="Allegedly running preprocessor"/>
<preprocess indir="${src_dir}" outdir="${targetdir}" out="merge"
except="${skip}">
<!-- testing junk -->
<var name="smell" value="rose"/>
<filetype commentend="*/" commentbegin="/*" extensions="as"/>-->
</preprocess>
</target>
--end snip---
--partial output---
preprocess:
[echo] Allegedly running cpp or equivalent
BUILD FAILED
C:\PATH_HIDDEN_TO_PROTECT_THE_INNOCENT\buildPreprocess.xml:24: Could not create
task or type of type: preprocess.
Ant could not find the task or a class this task relies upon.
(GIANT ERROR MESSAGE SNIPPED)
Any suggestions?
--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com