[英]Where's the HXML docs?
I've looked all over the Haxe Flash Command-line compiler website but was unable to find any detailed documentation of the HXML files (scroll down to the "Changing SWF properties" section) which describe the compile. 我查看了整个Haxe Flash命令行编译器网站,但无法找到HXML文件的任何详细文档 (向下滚动到“更改SWF属性”部分) ,其中描述了编译。
Anybody know of a reference source? 有人知道参考资料来源吗?
Found HXML: 找到HXML:
Edit: Scroll down for my answer with the complete list of commands. 编辑:使用完整的命令列表向下滚动我的答案。
Got it! 得到它了! Here's the complete list of HXML / command line Options for the Haxe compiler
以下是Haxe编译器的HXML /命令行选项的完整列表
Have you tried: 你有没有尝试过:
haxe --help
.hxml files are just a convenient way to pass commandline parameters as far as I know. 据我所知,.hxml文件只是传递命令行参数的一种方便方法。
For an advanced usage and some tips here is a great article by Andy Li ( https://stackoverflow.com/users/267998/andy-li ) 对于高级用法和一些提示,这是Andy Li的一篇很棒的文章( https://stackoverflow.com/users/267998/andy-li )
http://blog.onthewings.net/2013/03/04/hxml-tricks-every-haxe-user-should-know/ http://blog.onthewings.net/2013/03/04/hxml-tricks-every-haxe-user-should-know/
Lines starting with hash (#) won't be treated as arguments. 以hash(#)开头的行不会被视为参数。
#Yay! Comments!
Use -cmd
to run any command line after successful compilation. 成功编译后,使用
-cmd
运行任何命令行。
#C++
-cpp bin
-main Test
-cmd ./bin/Test
#Flash
-swf Test.swf
-main Test
-cmd path/to/FlashDebugger Test.swf
#Neko
-neko Test.n
-main Test
-cmd neko Test.n
For Neko target there is special shortcut for building and running -x Test
. 对于Neko目标,有一个特殊的快捷方式来构建和运行
-x Test
。
Appending arguments also works, for example if you want to build debug version 附加参数也有效,例如,如果要构建调试版本
haxe project.hxml -debug
Use --next
to separate different target/configuration builds. 使用
--next
分隔不同的目标/配置构建。 Use --each
to apply arguments to every build within hxml. 使用
--each
将参数应用于--each
中的每个构建。
#lib will be used in every '--next' build
-lib jQueryExtern
--each
#build MainPage
-js script/MainPage.js
-main MainPage
--next
#build ContactPage
-js script/ContactPage.js
-main ContactPage
#build AlbumPage
--next
-js script/AlbumPage.js
-main AlbumPage
You can further separate different build configurations by creating an hxml for every configuration. 您可以通过为每个配置创建一个hxml来进一步分离不同的构建配置。
client.hxml: client.hxml:
-main Client
-js client.js
server.hxml: server.hxml:
-main Server
-neko server.n
all.hxml: all.hxml:
client.hxml
--next
server.hxml
Builds both: haxe all.hxml
构建两者:
haxe all.hxml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.