I want to have haxe run a command after it has compiled it. But even if I run haxe from, say, git bash it still uses the standard windows shell to run any commands specified in the .hxml (which makes sense). Unfortunately the Windows command-line doesn’t like the unix slashes, at least not when specifying executable.
Note that this isn’t a problem with running js and probably not with other scripting languages (it’s ultimately up to the interpreter itself, which is going to be smart) so this works linux, windows, mac:
-cmd node bin/tests.js
However if I want to run something that has been build as a binary executable (using cpp or hl + cl) it won’t work cross-platform:
-cmd ./bin/tests/RunTests (works in unixen)
-cmd .\\bin\\tests\\RunTests (works in Windows)
I know there are other workarounds if I use wrappers, etc. but is there a simple way just through editing the hxml to handle both types of slashes? Or to switch by platform? I see some really old examples of using macros to accomplish this but again involves adding entire files and doesn’t work for me in haxe 4.