HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.97k stars 434 forks source link

use openfl git version? #3051

Closed Geokureli closed 7 months ago

Geokureli commented 7 months ago

hopefully avoids https://github.com/openfl/lime/issues/1763

player-03 commented 7 months ago

Sorry, I misspoke. I meant Lime rather than OpenFL, since that's where the error was fixed.

Geokureli commented 7 months ago

Sorry, I misspoke. I meant Lime rather than OpenFL, since that's where the error was fixed.

damn just now read this after switching to git openfl, lol

player-03 commented 7 months ago

I ended up testing it myself, and it still doesn't work. setup-flixel sets Lime to version 8.1.1, even if you've already run haxelib git lime.

Geokureli commented 7 months ago

I'm making changes to setup-flixel, itself

Geokureli commented 7 months ago

@player-03, I'm getting this error in CI, now

> haxelib run openfl test unit cpp -Dtravis Error: Error: Cannot process [format]: Library format is not installed : run 'haxelib install format'

I'm using the following to install lime and openfl

> haxelib git lime https://github.com/openfl/lime --quiet --global > haxelib install openfl --quiet --global

this doess not happen when using the latest lime release, format is also not installed on any of flixel's CI jobs

player-03 commented 7 months ago

Format is required for lime rebuild tools, but if you install Lime from Haxelib the tools come prebuilt, so as long as you never rebuild them, you're good.

IIRC its only job is to process SVG icons.

Geokureli commented 7 months ago

Format is required for lime rebuild tools, but if you install Lime from Haxelib the tools come prebuilt, so as long as you never rebuild them, you're good.

IIRC its only job is to process SVG icons.

I'll just install format, anything else I may need?

player-03 commented 7 months ago

hxp, if you don't have it. Used to be part of Lime, but they decided to split it off.

Geokureli commented 7 months ago

hxp, if you don't have it. Used to be part of Lime, but they decided to split it off.

apparently hxcpp is required, even when not building for cpp targets, is there a workaround for this?

> haxelib run openfl build unit html5 Error: Library hxcpp is not installed

Also seeing this error on cpp:

> haxelib run munit gen Massive Unit - Copyright 2024 Massive Interactive. Version src cd /home/runner/work/flixel/flixel/tests Running unit tests... > haxelib run openfl test unit cpp -Dtravis Error: In file included from ./lib/sdl/src/video/x11/SDL_x11shape.c:26: ./lib/sdl/src/video/x11/SDL_x11video.h:41:10: fatal error: X11/extensions/Xinerama.h: No such file or directory

41 | #include <X11/extensions/Xinerama.h>
|          ^~~~~~~~~~~~~~~~~~~~~~~~~~~

When is the next lime release scheduled, lol

player-03 commented 7 months ago

apparently hxcpp is required, even when not building for cpp targets, is there a workaround for this?

Oh right, it also likes to rebuild lime.ndll if that doesn't exist. There are two possible workarounds:

  1. Download the latest Haxelib release, and copy over the ndll directory.
  2. Specify the -eval flag every time you run Lime. (Not sure OpenFL will pass this through, though. It's not considered that important a feature yet.)

When is the next lime release scheduled, lol

@joshtynjala

Geokureli commented 7 months ago

both workarounds seem awfully involved and hacky, I may just wait for a release. Is there any way to make lime work without hxp and hxcpp on non-cpp targets? does it really, actually need both?

joshtynjala commented 7 months ago

When is the next lime release scheduled, lol

@joshtynjala

I guess I can try to find time to do a Lime 8.1.2 release later this month.

player-03 commented 7 months ago

Is there any way to make lime work without hxp and hxcpp on non-cpp targets? does it really, actually need both?

haxelib run lime runs tools.n (and calls lime rebuild tools if it doesn't exist). tools.n relies on lime.ndll for a few tasks (which is why lime rebiuld cpp gets called). Rebuilding lime.ndll involves C++ code and hxcpp.

I've looked at removing the lime.ndll dependency, but wasn't able to figure it out, which is why I added the -eval flag instead.

player-03 commented 7 months ago

I guess I can try to find time to do a Lime 8.1.2 release later this month.

I did a draft of a changelog.

Also, I'm pretty sure the change was included in Haxe 4.3.4, so this is going to start affecting more people.

joshtynjala commented 7 months ago

Also, I'm pretty sure the change was included in Haxe 4.3.4, so this is going to start affecting more people.

Okay, I'll try my best to do the release sooner rather than later.