HaxeFlixel / flixel-tools

Command Line tools for HaxeFlixel, create demos, templates and more.
50 stars 17 forks source link

Error with flixel library and flixel-setup command #37

Closed moonpockets closed 10 years ago

moonpockets commented 10 years ago

So first of all, I'll start off with the error in my flixel library. Let's say I have a new project and I want to add some flixel things. I ran haxelib install flixel, haxelib install flixel-tools, I go to my import statements - I can't import any flixel things. No classes found in flixel.

Second, I can't run "haxelib run flixel setup" as I just get:

"Library flixel version 3.0.1 does not have a run script"

So I do "haxelib run flixel-tools setup" and get:

C:\Users\Daniel>haxelib run flixel-tools setup Error loading templates, please run 'flixel download'


| | | | | | ||| | | | || | ___| | | | | | | |/ ` \ \/ / \ | | || \ \/ / \ | | | | | (| |> < / | | || |> < _/ | || |_|\,//**| |||//\**|_| (Haxe Logo)

Powered by the Haxe Toolkit and OpenFL Please visit www.haxeflixel.com for community support and resources!

HaxeFlixel Command-Line Tools (0.0.3) Installed flixel version: 3.0.1

Do you want to setup the flixel command Alias? [y/n] ?

From there, of course I try to run "flixel download" but all I get is:

'flixel' is not recognized as an internal or external command, operable program or batch file

Then, I run the flixel-tools setup command again, type in "y" to setup the flixel command Alias, and I get:

Do you want to setup the flixel command Alias? [y/n] ? y Called from ? line 1 Called from FlxTools.hx line 175 Called from FlxTools.hx line 19 Called from FlxTools.hx line 123 Called from massive/sys/cmd/CommandLineRunner.hx line 109 Called from massive/sys/cmd/CommandLineRunner.hx line 258 Called from commands/SetupCommand.hx line 26 Called from commands/SetupCommand.hx line 115 Called from /usr/lib/haxe/std/neko/_std/sys/io/File.hx line 66 Called from /usr/lib/haxe/std/neko/_std/sys/io/File.hx line 57 Uncaught exception - [file_open,C:\app\sdks\haxe\3.0.0\haxe\flixel.bat]

So I run flixel-tools setup again, this time trying "n" but THEN all "y"s and I get:

Do you want to setup the flixel command Alias? [y/n] ? n

Would you now like this tool to download the flixel-demos and flixel-templates? [y/n] ? y 'flixel' is not recognized as an internal or external command, operable program or batch file.

Enter the author name to use when generating templates.

Just hit enter to not use an author name. Dan

[0] Sublime Text [1] Flash Develop [2] Intellij Idea [3] None

Choose your default IDE.

1

Do you want to automatically open the created templates and demos with Flash Dev elop? [y/n] ? y

Your current settings:

Default Editor :Flash Develop Author Name :Dan Auto open with IDE :true

You have now setup HaxeFlixel Tools

Try the 'flixel' command to test it :)

Great! Now I have the 'flixel' command! Or do I...

C:\Users\Daniel>flixel 'flixel' is not recognized as an internal or external command, operable program or batch file.

Well, there's all my errors, if someone could help me get flixel into my Haxe projects, fix command line errors, etc, that would be great.

This is my first Issue submitted so if I'm doing something wrong or I can improve on something, just tell me.

Thanks, Dan.

impaler commented 10 years ago

Strange, I assume this is windows? can you tell me what echo %HAXEPATH% gives you in the command line? It appears that the alias isnt being put in the right location.

Can you see if flixel.bat is in the path C:\app\sdks\haxe\3.0.0\haxe\flixel.bat ? Also have you run haxelib selfupdate before?

I'll try to reproduce this in my windows vm later.

moonpockets commented 10 years ago

Hey impaler, I tried echo %HAXEPATH%

C:\Users\Daniel>echo %HAXEPATH% C:\app\sdks\haxe\3.0.0\haxe\

Seems about right, I entered the location and it gives me the files such as haxe.exe and openfl.bat. Also, my flixel.bat was not in that location - I'll see what happens when I do that, and yes, I have run haxelib selfupdate before and all my libraries are up to date.

Since I can't move it into it right now, I'll ask, do I just copy the flixel.bat and flixel.sh into that location, or cut it and paste it? Also, how would I do the little boxes around things like you did it your comment?

By the way, I tried haxelib selfupdate and I get this:

C:\Users\Daniel>haxelib selfupdate haxelib is up to date Please run haxe update.hxml

So I try haxe update.hxml and I get....

C:\Users\Daniel>haxe update.hxml Error rebuilding haxelib:Sys_error("C:\app\sdks\haxe\3.0.0\haxe\/haxelib.n : Permission denied")

Does this mean I need administrator permissions or to run the command line in elevated permissions? I'm currently not an admin so I can't move anything into C drive or run things with special permissions.

impaler commented 10 years ago

Hi @moonpockets yes the last Error with haxelib shows your issue with permissions. Thanks for the update, but its easy to miss an update text at the bottom of a comment rather than a new one.

how would I do the little boxes around things like you did it your comment?

See the link above the comments GitHub Flavored Markdown I am just using https://help.github.com/articles/github-flavored-markdown#fenced-code-blocks you can also use one instead of three, and try the preview button its awesome :godmode: