简体   繁体   English

安装haxe石灰错误

[英]install haxe lime error

I recently tried to develop in haxe/lime and I have two things that freaked me out. 我最近尝试用蜡/石灰进行开发,而我有两点让我感到震惊。 1. I tried to install Lime by this command: 1.我尝试通过以下命令安装Lime:

> haxelib install lime
haxelib run lime setup

and it automatically installed Lime in "c:/" and I need to move the files to "lib" to haxe folder. 并自动将Lime安装在“ c:/”中,我需要将文件移动到“ lib”到haxe文件夹。

2.when i open Lime project in FD i get this error: 2.当我在FD中打开Lime项目时出现此错误:

> Called from ? line 1
Called from CommandLineTools.hx line 995
Called from CommandLineTools.hx line 23
Called from CommandLineTools.hx line 108
Called from CommandLineTools.hx line 190
Called from platforms/FlashPlatform.hx line 91
Called from /usr/lib/haxe/std/neko/_std/sys/io/File.hx line 30
Uncaught exception - Invalid field access : __s

end when i try to build the project i get this error: 当我尝试构建项目时结束,出现此错误:

> Warning: Could not find template file: flash/hxml
Warning: Could not find template file: flash/haxe
Fatal error: exception Failure("File not found bin/flash/haxe/release.hxml")
Build halted with errors (haxelib.exe).

for your first problem, it's looks like you don't configure haxelib path. 对于第一个问题,您似乎没有配置haxelib路径。

You can set up the path for your libraries with : haxelib setup 您可以使用以下haxelib setup库的路径: haxelib setup

Here yo put the path where you wants your lib to be store. 在这里,您放置了要存储lib的路径。

And don't forget after you install lime to do : haxelib run lime setup like it's asked. 并且不要忘记在安装lime之后执行: haxelib run lime setup

For your problem with FD I suppose that's can come with the fact you moved your lime folder to another folder. 对于FD的问题,我想这可能是因为您将lime文件夹移动到了另一个文件夹。 Generally you never have to move a lib to another folder or haxe will not know is location. 通常,您无需将库移动到另一个文件夹,否则haxe将不知道位置。

If it's not sorry, I don't use FD but hide or sublime text. 如果不对不起,我不使用FD,而是隐藏或升华文本。

The accepted answer did not make sense to me so I decided to post a solution that worked on my system. 接受的答案对我而言没有任何意义,因此我决定发布一种适用于我的系统的解决方案。 It's worth noting that I'm on Ubuntu 14.04, not Windows. 值得注意的是,我使用的是Ubuntu 14.04,而不是Windows。 I could install neither lime nor openfl. 我既不能安装石灰也不能安装openfl。 I decided to include openfl details here as I could not find a solution for that either. 我决定在此处包括openfl详细信息,因为我也没有找到解决方案。 The openfl error I received was Uncaught exception - Invalid field access: split . 我收到的openfl错误是Uncaught exception - Invalid field access: split

Many forums recommend checking that the HAXEPATH environment variable is not set . 许多论坛建议检查是否未设置 HAXEPATH环境变量。 In my case, it wasn't set, but I received a similar lime error to the one posted here. 就我而言,它没有设置,但是我收到了与此处发布的类似的石灰错误。 Contrary to what those forums advised, manually exporting the HAXEPATH variable allowed me to run both lime and openfl setups successfully. 与那些论坛建议的相反,手动导出HAXEPATH变量使我能够成功运行lime和openfl设置。

One site also mentioned that the format lib is necessary, although I'm not sure how true this is. 一个站点还提到format lib是必需的,尽管我不确定这是多么正确。 Please leave a comment if you can confirm or deny this. 如果您可以确认或拒绝,请发表评论。

Here's what I did: 这是我所做的:

Install openfl, lime, and format 安装openfl,lime和format

haxelib install openfl
haxelib install lime
haxelib install format

Get the haxelib path, and export it 获取haxelib路径,并将其导出

Running haxelib config will return the haxelib repository path as is currently defined. 运行haxelib config将返回当前定义的haxelib存储库路径。 If you have not defined a haxelib repo path, you can do so by running haxelib setup . 如果尚未定义haxelib存储库路径,则可以通过运行haxelib setup On my system the path was /usr/share/haxe/lib . 在我的系统上,路径为/usr/share/haxe/lib

Export the haxelib path: 导出haxelib路径:
export HAXEPATH="`haxelib config`"

Complete the setup 完成设定

haxelib run lime setup
haxelib run openfl setup

Confirm all is working 确认一切正常

Run lime or openfl . 运行limeopenfl You should receive a terminal splash welcome from both. 您应该都受到双方的欢迎。

I added the above export entry to my bashrc file as these tools always require that the variable exists in my environment. 我将上述导出条目添加到我的bashrc文件中,因为这些工具始终要求该变量存在于我的环境中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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