简体   繁体   中英

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

problem: Error: Could not process argument

Here's my .hxml file:

-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. That's annoying, since I want assets and binaries in their own directories separate from src files. How do I properly configure this?

You really should use the the src convention and not stuff everything within the same directory. 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. The path is relative to where haxe is executed. That usually coincides with where your build.hxml file is, but it is not mandatory.

Also, you didn't specify an output file for 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.

These information are general and in no way tied with Sublime. Sublime should play just nice with these settings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM