openfl / hxp

Write scripts in Haxe, and execute them on Windows, macOS or Linux
MIT License
58 stars 19 forks source link

Issue on Haxe 4 #22

Open Arcnor opened 4 years ago

Arcnor commented 4 years ago

I'm trying to fix a problem with a script using HXP. The script contains:

        Sys.exit (System.runScript ("tools/Tools.hx", [

            "-main", "Tools",
            "-lib", "hxp",
            "-lib", "lime",
            "-D", "disable-cffi"

        ], ["myCommand", "otherArgs"]));

...and hxp is generating the following Haxe command line:

haxe -cp C:\Users\arcnor\AppData\Local\Temp/temp_10785548 -cp C:\Project\lime-project\tools Tools -main Tools -lib hxp -lib lime -D disable-cffi -D hxp-interp --run myCommand otherArgs

...which is causing Error: Class name must start with an uppercase letter.

The problem seems to be that hxp is passing the arguments to the script I want to run as --run <args> but Haxe interprets that as the name of a module. Before Haxe 4 this was passed using -- which I guess does the same as bash (end of command options) but now it just doesn't work.

tomcashman commented 1 year ago

Did you find a solution to this?

Arcnor commented 1 year ago

Hey, no sorry, never did and I stopped using Haxe quite a while ago, good luck!