How to use HaxeFlixel 3.x and 4.x on the same PC

111 views
Skip to first unread message

LuFe_Mas

unread,
Mar 27, 2016, 10:39:28 PM3/27/16
to HaxeFlixel
I have a old project that i do not want to rewrite to haxeflixel 4.x

But in another project i am using haxeflixel 4.x

There is a way to compile a project in haxeflixel 3.x? I do not even found it to download.

Domagoj Štrekelj

unread,
Mar 28, 2016, 3:13:36 AM3/28/16
to HaxeFlixel
Hello,

You can install a specific version of a library from Haxelib by using haxelib install libraryName major:minor:bugfix, e.g. haxelib install flixel 3.3.12. A list of HaxeFlixel versions on Haxelib is available here.

To compile your project with a different version of the library, you need to specify the version in your Project.xml file. For example: <haxelib name="flixel" version="3.3.12" />. You can refer to the XML format specifications here.

Domagoj

Dlean Jeans

unread,
Mar 28, 2016, 3:45:17 AM3/28/16
to haxef...@googlegroups.com
In command line window, you can switch between the versions by using 

haxelib set library-name version

Example: To switch to HaxeFlixel 3.3.12
haxelib set flixel 3.3.12

LuFe_Mas

unread,
Mar 29, 2016, 9:47:29 AM3/29/16
to HaxeFlixel
Thanks for the reply.

I can install the older version and it will not be placed over the newest?

Ashiq A.

unread,
Mar 29, 2016, 10:20:07 AM3/29/16
to haxef...@googlegroups.com
You can install the versions side-by-side. Dlean's reply tells you how to change the currently-configured one, system-wide.

Personally, I would use Domagoj's method, because you only need to specify in your project.xml what version to use. You can't accidentally set the system-wide version to the wrong one and build your project -- it'll always use the required version.

--
HaxeFlixel Development Community
See our github https://github.com/haxeflixel/ and our documentation http://haxeflixel.com/documentation/
---
You received this message because you are subscribed to the Google Groups "HaxeFlixel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haxeflixel+...@googlegroups.com.
Visit this group at https://groups.google.com/group/haxeflixel.
To view this discussion on the web visit https://groups.google.com/d/msgid/haxeflixel/591f3485-7177-45d2-ad14-ec055f263dc2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

LuFe_Mas

unread,
Mar 29, 2016, 3:43:42 PM3/29/16
to HaxeFlixel
What Domagoj said is a good option. But the flixel-addons and flixel-ui for example are the newest version, how do I know what version install and use for the old haxeflixel?


Em domingo, 27 de março de 2016 23:39:28 UTC-3, LuFe_Mas escreveu:

LuFe_Mas

unread,
Mar 29, 2016, 3:45:44 PM3/29/16
to HaxeFlixel

LuFe_Mas

unread,
Mar 29, 2016, 3:58:27 PM3/29/16
to haxef...@googlegroups.com
I did this, but now I have both haxeflixel versions on my references, and looked all over the project file and the only lines about haxelib are

<haxelib name="flixel" version="3.3.12"/>
<haxelib name="flixel-addons"  version="1.1.1"/>
<haxelib name="flixel-ui"  version="1.0.2"/>

I think that flixel-addons and ui includes the newest haxeflixel on the references.
How I use only these:
<haxelib name="flixel" version="3.3.11"/>
<haxelib name="flixel-addons"  version="1.1.1"/>
<haxelib name="flixel-ui"  version="1.0.2"/>
<haxelib name="lime"  version="2.8.0"/>
<haxelib name="openfl"  version="3.5.0"/>

Claudio Ficara

unread,
Mar 31, 2016, 2:08:30 AM3/31/16
to HaxeFlixel
I bumped into this issue the other day. I solved it by setting a custom Haxe SDK on the properties of the project. Way easier than installing new versions.

Anyways, I'd suggest to upgrade to 4.x, the new features and improvements are fantastic. Totally worth the time.

LuFe_Mas

unread,
Mar 31, 2016, 10:08:30 AM3/31/16
to HaxeFlixel
Claudio,

I changed the ".current" file on haxeflixel, addons, ui, lime, openfl, folders, but I need to do this every time i want to change the version.
I rewrited the parts to haxeflixel 4. For PC version, its fine, i will use that. But for android, the game gets very slow, the 3.x version is way better in performance.

Claudio Ficara

unread,
Mar 31, 2016, 4:14:52 PM3/31/16
to HaxeFlixel
I feel you. There's no need to do that. Let's do this:

Set your .current for your libraries and make sure the 3.x version compiles. Works? Okay, copy the whole haxeToolkit folder (that includes old haxe and old flixel) to another location.
If you use FlashDevelop, go to Properties, and on SDK, Custom SDK make it point to that folder. Would look something like : C:/OLDHaxeToolkit/haxe
When you compile, FlashDevelop will use that SDK.
You can then update the libraries to latest version, for your default haxeToolkit folder and forget about it :)

I've got a project that uses old haxe and old flixel and compiles perfectly. Everything else compiles with new haxe and new flixel version.

LuFe_Mas

unread,
Apr 1, 2016, 6:14:20 PM4/1/16
to HaxeFlixel
Thanks man. Now i get. Will do that.


Em domingo, 27 de março de 2016 23:39:28 UTC-3, LuFe_Mas escreveu:
Reply all
Reply to author
Forward
0 new messages