Help. Rebuilding an old project

Hi,

So I’ll reeeally need to build an old project. Something under OpenFL 2.something.
But that’s the thing… I am not sure what version of the libraries it was.

I know you are gonna tell me to use legacy and stuff but:

  • I tried quickly and it doesn’t seem to work.
  • I have a fork of the swf library, with specific changes, that I doubt will work with anything else.
  • I did a lot of tweaks, and it was working perfectly fine, I don’t want to go through retesting everything.

So here are my question, and please if you have an answer on this don’t leave me hanging, it’s important:

  • It there a way, from an old windows build ( bin/windows/cpp folder intact ) to know what versions of the library I was using?
  • Otherwise, if I have to test every OpenFL 2.* making sens given the build date, is there a list somewhere with the lime, actuate and format compatible versions?

And optional question, not an emergency but I really wanna know: How do you deal with this issue?
Do you fork the libraries when archive it, do you just write down the library versions?
I don’t wanna go throw this mess ever again!

Thanks.

Check the debug.hxml or release.hxml file in bin/windows/cpp/haxe - they contain haxedefs for the included haxelibs with their versions - should look something like this:

-main ApplicationMain 
-cp C:/HaxeToolkit/haxe/lib/flixel/git
-D flixel=4.0.0
-cp C:/HaxeToolkit/haxe/lib/lime/2,9,0
-D lime=2.9.0
-cp C:/HaxeToolkit/haxe/lib/openfl/git
-D openfl=3.6.0
-cp C:/HaxeToolkit/haxe/lib/hxcpp/3,2,102
-D hxcpp=3.2.102
-cp C:/HaxeToolkit/haxe/lib/hscript/2,0,5
-D hscript=2.0.5

Hi Gama11 and thank you very much.
Sorry for not replying earlier, I don’t know what’s your timezone but I posted at the end of the day.

So, I checked the folder you indicate, where I have a final.hxml file with this:

-main ApplicationMain
-cp C:/HaxeToolkit/haxe/lib/openfl/2,1,6
-D openfl=2.1.6
-cp C:/HaxeToolkit/haxe/lib/hxcpp/3,1,39
-D hxcpp=3.1.39
-cp C:/HaxeToolkit/haxe/lib/actuate/1,7,5
-D actuate=1.7.5
-cp C:/HaxeToolkit/haxe/lib/swf/git
-D swf=1.6.0
-cp C:/HaxeToolkit/haxe/lib/format/3,1,2
-D format=3.1.2
-cp src
-cp C:\HaxeToolkit\haxe\lib\lime/2,0,0/legacy
-D tools=2.0.0
-D lime-legacy
-D no-compilation
-D native
-D openfl-native
-D lime-native
-D fdb
-D windows
-D desktop
–remap flash:openfl
-cp bin/windows/cpp/haxe
-cpp bin/windows/cpp/obj
–macro keep(“al.arkit.boa.Main”)
-D final

But it doesn’t build.
As soon as I launch FlashDevelop, I get an error in the console:

Called from ? line 1
Called from CommandLineTools.hx line 1300
Called from CommandLineTools.hx line 25
Called from CommandLineTools.hx line 64
Called from CommandLineTools.hx line 1026
Called from /usr/lib/haxe/std/neko/_std/sys/io/File.hx line 30
Uncaught exception - [file_contents,/haxelib.json]

Soooo… any idea?
Should I install an old version of Haxe itself?

Apparently the error comes from the command line ( Flashdevelop must call it at launch when needed):

haxelib run lime setup

Also, there is a haxelib.json in the lime 2.0.0 folder, and it seems fine to me:

{
“name”: “lime”,
“url”: “https://github.com/openfl/lime”,
“license”: “MIT”,
“tags”: [],
“description”: “A flexible lightweight layer for Haxe cross-platform developers”,
“version”: “2.0.0”,
“releasenote”: “Minor fixes, improvements to rebuild”,
“contributors”: [ “singmajesty” ],
“dependencies”: {}
}

And it works.
I had to uninstall haxe and reinstall an old version, with the old versions of the libraries for it to build properly.
Damn that was worrisome…

Thank you Gama11 for your help.

I am still looking for a way to backup everything so that I can keep working other projects with up to date libraries.
How do you guys do it?

Answering to myself about archiving projects, if somebody ever wonders:

Haxelib only seems to set up some PATH variables when it installs.
Other than that it is portable, it just needs to be in a forlder with no space in it’s path.
So it’s easy to copy the whole HaxeToolkit library inside the project.
Then remove the unused libraries, and in FlashDevelop/HaxeDevelop, set a custom path for the SDK.