How rebuild Lime?

Hi All!
I want rebuild lime. But it give me error.

d:\DevTools\HaxeToolkit\lib>lime rebuild windows
Error: Could not find include file "lib/curl/files.xml"

I have tried to follow this guide and i get new error.

d:\DevTools\HaxeToolkit\lib>lime rebuild windows
Error: Could not find include file "lib/cairo/files.xml"

My haxe is 3.1.3

d:\DevTools\HaxeToolkit\lib>haxelib list
format: [3.0.5]
haxelib_client: [3.1.0-rc.4]
hscript: [2.0.4]
hxcpp:  [3.2.94]
hxlibc: [1.1.4]
hxsl: [2.0.5]
hxtools:  [1.1.6]
lime-tools: [1.3.2] 
lime:  [2.0.6]
nme-dev: [1.3.2]
nme: [5.2.13]
openfl-tools: [1.0.10]
openfl:  [2.2.4]
svg: [1.0.8]

Oh this page really needs to be removed, it’s not up to date at all.

You should follow these instructions: https://github.com/openfl/lime#building-from-source

1 Like

Thank! I’m trying it!

I tried it. Although no errors but I still do not rebuild the lime. I tried to change source C in folder legacy\project\src\ but it does not work at all.

d:\DevTools\HaxeToolkit>haxelib dev lime d:\DevTools\HaxeToolkit\lib\lime\2,0,6\
Development directory set to d:\DevTools\HaxeToolkit\lib\lime\2,0,6

d:\DevTools\HaxeToolkit>haxelib install format
You already have format version 3.1.2 installed
Set format to version 3.1.2 [y/n/a] ? a
Library format current version is now 3.1.2

d:\DevTools\HaxeToolkit>lime rebuild windows -Dlegacy -verbose
 ___
/\_ \    __
\//\ \  /\_\    ___ ___      __
  \ \ \ \/\ \ /' __` __`\  /'__`\
   \_\ \_\ \ \/\ \/\ \/\ \/\  __/
   /\____\\ \_\ \_\ \_\ \_\ \____\
   \/____/ \/_/\/_/\/_/\/_/\/____/

Lime Command-Line Tools (2.1.0)

Initializing project...
Reading HXCPP config: C:\Users\CPU10664-local\.hxcpp_config.xml
Using target platform: WINDOWS

Running command: REBUILD


d:\DevTools\HaxeToolkit>lime rebuild tools -verbose
 - Changing directory: d:\DevTools\HaxeToolkit\lib\lime\2,0,6,67\tools
 - Running command: haxe tools.hxml

The Changing directory: d:\DevTools\HaxeToolkit\lib\lime\2,0,6,67\tools don’t really match with your d:\DevTools\HaxeToolkit\lib\lime\2,0,6, strange.

And since I’m guessing the directory doesn’t exists that could explain why the rebuild stopped early.

Did you clone to the lib\lime\2,0,6 directory? It’s a bit peculiar to clone it there, and could interfere with haxelib.

You could try the command lime rebuild lime windows -Dlegacy, it should skip the tools and could allow the rebuild to happen.

d:\DevTools\HaxeToolkit>lime rebuild lime windows -Dlegacy -verbose

 ___
/\_ \    __
\//\ \  /\_\    ___ ___      __
  \ \ \ \/\ \ /' __` __`\  /'__`\
   \_\ \_\ \ \/\ \/\ \/\ \/\  __/
   /\____\\ \_\ \_\ \_\ \_\ \____\
   \/____/ \/_/\/_/\/_/\/_/\/____/

Lime Command-Line Tools (2.0.6)

Initializing project...
Reading HXCPP config: C:\Users\CPU10664-local\.hxcpp_config.xml
Using target platform: WINDOWS

Running command: REBUILD
 - Changing directory: d:\DevTools\HaxeToolkit\lib\lime\2,0,6\project
 - Running command: haxelib run hxcpp Build.xml -Dwindows -Dtools=2.0.6 -Dlegacy -Drebuild=1 -Dlime-legacy -Dno-compilation -Dlime-native -verbose
 __
/\ \
\ \ \___    __  _   ___   _____   _____
 \ \  _ `\ /\ \/'\ /'___\/\ '__`\/\ '__`\
  \ \ \ \ \\/>  <//\ \__/\ \ \L\ \ \ \L\ \
   \ \_\ \_\/\_/\_\ \____\\ \ ,__/\ \ ,__/
    \/_/\/_/\//\/_/\/____/ \ \ \/  \ \ \/
                            \ \_\   \ \_\
                             \/_/    \/_/

hxcpp (Haxe C++ Runtime Support) (3.2.94)

Using makefile: Build.xml
Reading HXCPP config: C:\Users\CPU10664-local\.hxcpp_config.xml
No specified toolchain

 - Parsing include: d:/DevTools/HaxeToolkit/lib/hxcpp/3,2,94/toolchain/setup.xml
 - Parsing include: C:\Users\CPU10664-local\.hxcpp_config.xml (section "vars")
Using default windows compiler : MSVC
 - Parsing include: d:/DevTools/HaxeToolkit/lib/hxcpp/3,2,94/toolchain/finish-setup.xml
Using msvc cl version 16
Using compile threads: 3
 - Parsing makefile: Build.xml
 - Parsing include: d:/DevTools/HaxeToolkit/lib/hxcpp/3,2,94/build-tool/BuildCommon.xml
 - Parsing include: d:/DevTools/HaxeToolkit/lib/hxcpp/3,2,94/toolchain/haxe-target.xml
Error: Could not find include file "lib/curl/files.xml"

It error again!!!

When cloning Lime with Git did you include the submodules? Curl is a separate repository included as a link and it needs certain flags ( I think the --recursive clone options should do it but not entirely certain) to pull properly. You could try running this:

git submodule update --init --recursive

in the Lime directory.

It does.

But since he’s trying to rebuild the legacy ndll it shouldn’t have been an issue, I guess the lime rebuild lime doesn’t take -Dlegacy into account.

Maybe try cloning in a different location than the haxelib directory and retry with that.

I think it Work!
That’s my wrong. I don’t clone Lime with git. I use svn and it don’t get submodule.

PS: I cannot rebuild src C/C++.

Here’s what I do:

cd /c/Development/Haxe
git clone https://github.com/openfl/lime
cd lime
git submodule init
git submodule update
cd ..
haxelib dev lime lime
git clone https://github.com/openfl/openfl
haxelib dev openfl openfl
haxelib run lime rebuild windows
haxelib run lime rebuild tools
haxelib run lime setup
lime rebuild windows -Dlegacy

You can use --recursive when cloning Lime, but I usually forget :wink:

You can shorten haxelib run lime to just lime and skip setup if you already have the lime shortcut

Of course, you need a copy of Visual Studio C++ installed on Windows to build any C++ files. I also have to run these commands from “Git Bash” (after installing https://git-scm.com/download/win)

Does this help?

1 Like

Thank all your help!
Tomorrow, I will try it.
Explain a bit, when I rebuild, it really works.
But when I try to create a syntax error in the src of Lime legacy and try rebuild, it still work.
I tried again rebuild with -clean and it is no error message at all.

Make sure that when you make a change to legacy, you rebuild using -Dlegacy, otherwise rebuild compiles Lime 2 only :slight_smile:

It Work!!!
Thank again.

Other questions: My game using lime 2.0.6. Is there a way to rebuild again this version?

Just use haxelib dev lime to return to the haxelib version you have set :wink:

haxelib dev lime path/to/lime/dev/checkout to go back to a development build