HXML 文档在哪里?

发布于 2024-07-10 18:39:46 字数 664 浏览 6 评论 0原文

我浏览了 Haxe Flash 命令行编译器网站,但找不到任何详细的文档HXML 文件 (向下滚动到“更改 SWF 属性”部分) 描述了编译。

有人知道参考来源吗?


找到HXML:

  • -swf MyApp.swf .... 编译为 SWF
  • -main MyAppClass .... 入口点类(.AS 文件)
  • -swf-header 200:300:25:FFFFFF .... 宽度:高度:FPS:背景颜色(SWF 的)

编辑: 向下滚动查看我的回答是命令的完整列表

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.

Anybody know of a reference source?


Found HXML:

  • -swf MyApp.swf .... Compile to SWF
  • -main MyAppClass .... Entry-point Class (.AS file)
  • -swf-header 200:300:25:FFFFFF .... Width:Height:FPS:BackColor (of SWF)

Edit: Scroll down for my answer with the complete list of commands.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

往事风中埋 2024-07-17 18:39:46

知道了! 以下是 Haxe 编译器的 HXML/命令行选项的完整列表

  • —cp : 添加一个目录来查找源文件
  • —js : 将代码编译为 JavaScript 文件
  • —as3 : 生成 AS3 代码到目标目录
  • —swf :将代码编译为 Flash SWF 文件
  • —swf9 :将代码编译为 Flash9 SWF 文件
  • —swf—version :更改 SWF 版本(6 至 10)
  • —swf—header :定义 SWF 标头(宽度:高度:fps:颜色)
  • —swf— lib : 将 SWF 库添加到编译后的 SWF
  • —neko : 将代码编译为 Neko 二进制
  • —php : 生成 PHP 代码到目标目录
  • —x : 编译和执行 neko 文件的快捷方式
  • —xml : 生成 XML 类型描述
  • —main : 选择启动class
  • —lib :使用 haxelib 库
  • —D :定义条件编译标志
  • —resource [@name] :添加命名资源文件
  • —exclude :不为该文件中列出的类生成代码
  • —v :打开详细节点
  • — debug :在编译后的代码中添加调试信息
  • —prompt :出错时提示
  • —cmd :编译成功后运行指定的命令
  • —flash—strict :更多类型严格的 flash API
  • —no—traces :不编译中的跟踪调用program
  • ——flash—use—stage : 放置在 SWF lib stage 上找到的对象
  • ——neko—source : 保留生成的 neko 源
  • ——gen—hx—classes : 从 SWF9 文件生成 hx 头
  • ——next : 分离几个 haxe compilations
  • ——display : 显示代码提示
  • ——no—output : 编译但不生成任何文件
  • ——times : 测量编译时间
  • —-no—inline : 禁用内联
  • ——php—front : 选择 PHP 前端文件的名称
  • ——remap : 将一个包重新映射到另一个包
  • —help : 显示此选项列表
  • ——help : 显示此选项列表

Got it! Here's the complete list of HXML / command line Options for the Haxe compiler

  • —cp : add a directory to find source files
  • —js : compile code to JavaScript file
  • —as3 : generate AS3 code into target directory
  • —swf : compile code to Flash SWF file
  • —swf9 : compile code to Flash9 SWF file
  • —swf—version : change the SWF version (6 to 10)
  • —swf—header : define SWF header (width:height:fps:color)
  • —swf—lib : add the SWF library to the compiled SWF
  • —neko : compile code to Neko Binary
  • —php : generate PHP code into target directory
  • —x : shortcut for compiling and executing a neko file
  • —xml : generate XML types description
  • —main : select startup class
  • —lib : use an haxelib library
  • —D : define a conditional compilation flag
  • —resource [@name] : add a named resource file
  • —exclude : don’t generate code for classes listed in this file
  • —v : turn on verbose node
  • —debug : add debug informations to the compiled code
  • —prompt : prompt on error
  • —cmd : run the specified command after successful compilation
  • ——flash—strict : more type strict flash API
  • ——no—traces : don’t compile trace calls in the program
  • ——flash—use—stage : place objects found on the stage of the SWF lib
  • ——neko—source : keep generated neko source
  • ——gen—hx—classes : generate hx headers from SWF9 file
  • ——next : separate several haxe compilations
  • ——display : display code tips
  • ——no—output : compiles but does not generate any file
  • ——times : measure compilation times
  • —-no—inline : disable inlining
  • ——php—front : select the name for the PHP front file
  • ——remap : remap a package to another one
  • —help : Display this list of options
  • ——help : Display this list of options
静待花开 2024-07-17 18:39:46

您是否尝试过:

haxe --help

据我所知,.hxml 文件只是传递命令行参数的一种便捷方法。

Have you tried:

haxe --help

.hxml files are just a convenient way to pass commandline parameters as far as I know.

转身泪倾城 2024-07-17 18:39:46

对于高级用法和一些提示,请参阅 Andy Li 撰写的一篇精彩文章 (https://stackoverflow .com/users/267998/andy-li)

http://blog.onthewings.net/2013/03/04/hxml-tricks-every-haxe-user-should-know/


注释 hxml 文件

以 hash 开头的行(#) 不会被视为参数。

#Yay! Comments!

编译后立即运行项目

成功编译后使用 -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

对于 Neko 目标,有用于构建和运行 -x Test 的特殊快捷方式。

额外参数

附加参数也适用,例如,如果您想构建调试版本

haxe project.hxml -debug

一次进行多个编译

使用 --next 来分隔不同的目标/配置构建。 使用 --each 将参数应用于 hxml 中的每个构建。

#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

包含 hxml

您可以通过为每个配置创建一个 hxml 来进一步分离不同的构建配置。

client.hxml:

-main Client
-js client.js

server.hxml:

-main Server
-neko server.n

all.hxml:

client.hxml
--next
server.hxml

构建两者:haxe all.hxml

For an advanced usage and some tips here is a great article by Andy Li (https://stackoverflow.com/users/267998/andy-li)

http://blog.onthewings.net/2013/03/04/hxml-tricks-every-haxe-user-should-know/


Commenting a hxml file

Lines starting with hash (#) won't be treated as arguments.

#Yay! Comments!

Run project right after compilation

Use -cmd to run any command line after successful compilation.

#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.

Extra arguments

Appending arguments also works, for example if you want to build debug version

haxe project.hxml -debug

Multiple compilations at once

Use --next to separate different target/configuration builds. Use --each to apply arguments to every build within hxml.

#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

Including hxmls

You can further separate different build configurations by creating an hxml for every configuration.

client.hxml:

-main Client
-js client.js

server.hxml:

-main Server
-neko server.n

all.hxml:

client.hxml
--next
server.hxml

Builds both: haxe all.hxml

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文