简体   繁体   English

如何配置haxe构建文件(HXML)从src目录构建?

[英]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.

相关问题 配置构建系统以根据文件扩展名自动选择 - Configure Build System to be automatically chosen based on file extension 如何配置sublime text 3在build部分而不是cmd中运行python? - How to configure sublime text 3 to run python in the build section instead of cmd? Sublime Text CoffeeScript构建系统:`env:node:没有这样的文件或目录` - Sublime Text CoffeeScript build system: `env: node: No such file or directory` 如何为 sublime 文本设置 cpp 构建文件? - How to setup cpp build file for sublime text? 如何配置Sublime Text 2以自动使用用户构建的fortran构建系统? - How do I configure Sublime Text 2 to automatically use user-built build system for fortran? 用于Linux中C ++的Sublime Build系统,允许从文件输入 - Sublime Build system for c++ in linux allowing input from file Sublime - 如何去除构建文件中的扩展名? - Sublime - how to strip extension in build file? Sublime Text构建系统如何访问缓冲区的内容,而不是文件? - How can a Sublime Text build system access the contents of a buffer, not a file? 在Linux上的Typescript构建Sublime Text 3-[Errno 20]不是目录 - Typescript build Sublime Text 3 on Linux - [Errno 20] Not a directory Sublime Text 2构建系统(从输入文件中获取输入) - Sublime Text 2 Build System (taking inputs from an input file)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM