[英]How to configure haxe build file (HXML) to build from src directory?
I'm trying to build a pre-existing HaxePunk project in sublime (switching away from FlashDevelop). 我正在尝试在sublime中构建一个预先存在的HaxePunk项目(从FlashDevelop切换)。
problem: Error: Could not process argument 问题:错误:无法处理参数
Here's my .hxml file: 这是我的.hxml文件:
-neko
-cp "c:/path/to/project/src"
-main Main
I've read somewhere that you shouldn't use the /src
convention for your src files. 我在某处读过你不应该为你的src文件使用
/src
约定。 That's annoying, since I want assets and binaries in their own directories separate from src files. 这很烦人,因为我希望自己的目录中的资产和二进制文件与src文件分开。 How do I properly configure this?
我该如何正确配置?
You really should use the the src
convention and not stuff everything within the same directory. 你真的应该使用
src
约定而不是把所有内容都放在同一个目录中。 You also don't want to make the build specific to your machine, so in you example above you don't want an absolute path but a relative one. 您也不希望特定于您的机器进行构建,因此在上面的示例中,您不需要绝对路径而是相对路径。 So try the following:
请尝试以下方法:
#content of c:/path/to/project/build.hxml
-neko bin/output.n
-cp src
-main Main
Note that for -cp
you use the relative path. 请注意,对于
-cp
您使用相对路径。 The path is relative to where haxe
is executed. 该路径与执行
haxe
位置有关。 That usually coincides with where your build.hxml
file is, but it is not mandatory. 这通常与
build.hxml
文件的位置一致,但不是必需的。
Also, you didn't specify an output file for neko. 另外,您没有为neko指定输出文件。 Note that you will have to create the directory
bin
by hand because the compiler will not do that for you and will complain if it doesn't exist. 请注意,您必须手动创建目录
bin
,因为编译器不会为您执行此操作,并且如果它不存在则会抱怨。
These information are general and in no way tied with Sublime. 这些信息是一般性的,与Sublime无关。 Sublime should play just nice with these settings.
Sublime应该可以很好地使用这些设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.