custom compiler variables in Flashdevelop

386 views
Skip to first unread message

skywolf

unread,
Nov 26, 2012, 6:11:20 AM11/26/12
to haxe...@googlegroups.com
Hi,

I'm trying to add a custom variable so I can use the preprocessor to change my asset sizes and location, but cannot
set the -D compiler flag in Flashdevelop, I've looked in Project properties -> Compiler Options and added an additional
line, but it does not stay there and does not update the compiler command line.

I want to use

#if myflag
     ....
#end

Any ideas?

thanks
Jon

Simon Krajewski

unread,
Nov 26, 2012, 7:31:36 AM11/26/12
to haxe...@googlegroups.com
Check out the Directives part, that's where these -D flags are supposed
to go (without the -D).

Simon

Axel Huizinga

unread,
Nov 26, 2012, 7:35:15 AM11/26/12
to haxe...@googlegroups.com
Am 26.11.2012 12:11, schrieb skywolf:
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
 
 
 
If I add something to the Directives under Project properties -> Compiler Options I can see it in the output:
... -swf-version 10 -D testD  ...
Cordially,
Axel

jon hopkins

unread,
Nov 26, 2012, 8:06:04 AM11/26/12
to haxe...@googlegroups.com
I just tried the directives and it doesnt change my command line, or save it. maybe the IDE is deleting it as an
unknown directive. I am using Flashdevelop 4.0.4 with a flash target and haxe project

thanks for your help

Jon

Axel Huizinga

unread,
Nov 26, 2012, 8:21:15 AM11/26/12
to haxe...@googlegroups.com
Am 26.11.2012 14:06, schrieb jon hopkins:
I just tried the directives and it doesnt change my command line, or save it. maybe the IDE is deleting it as an
unknown directive. I am using Flashdevelop 4.0.4 with a flash target and haxe project

I use also flash target haxe project with fd 4.2.0  but suspect this makes a difference.
Do you mean if you enter something in the directive field it is not there when you open the
project properties again? this is something I experienced with nme project since there the props are synced with the project.nmml file

jon hopkins

unread,
Nov 26, 2012, 8:46:06 AM11/26/12
to haxe...@googlegroups.com
Just tried 4.2.0 but same problem, not updating. i am using NME so I need to update the nmeproj file?
Do you know the xml tag for a directive?

thanks

Philippe Elsass

unread,
Nov 26, 2012, 8:51:01 AM11/26/12
to haxe...@googlegroups.com
For NME, FlashDevelop project properties are synchronized from the NMML file: no changes in FD project will be saved.

Use:
<haxedef name="myDirective" />
Philippe

jon hopkins

unread,
Nov 26, 2012, 9:16:48 AM11/26/12
to haxe...@googlegroups.com
Im really getting nowhere with this. Does the tag belong inside the root Project node or inside another node?
Maybe someone provide a working NME project with a directive?

thanks

Jon

jon hopkins

unread,
Nov 26, 2012, 9:19:08 AM11/26/12
to haxe...@googlegroups.com
Its working now, I needed it in the NMML file and not the NMEPROJ

thanks
Jon
Reply all
Reply to author
Forward
0 new messages