aduros / flambe

Rapidly cook up games for HTML5, Flash, Android, and iOS.
https://github.com/aduros/flambe/wiki
MIT License
743 stars 118 forks source link

template project wont build html #353

Closed jordgubben closed 9 years ago

jordgubben commented 9 years ago

The default project created by flambe new <project> can not be built to html. Flash appears to work fine though.

Versions of stuff:

DeLorean:test-flambe jakob$ haxe -version
3.2.0
DeLorean:test-flambe jakob$ flambe --version
4.1.0

What happens:

DeLorean:haxe jakob$ flambe new test-flambe
New Flambe project created in /Users/jakob/GameDevelopment/Experiments/haxe/test-flambe
DeLorean:haxe jakob$ cd test-flambe/
DeLorean:test-flambe jakob$ flambe build html
Building: build/web
haxe -main urgame.Main -lib flambe -cp src -dce full --no-traces -D html -D js-es5 -D js-flatten --macro flambe.platform.ManifestBuilder.use("build/web/assets") -js build/.cache/html.unminified.js
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/CanvasTextureRoot.hx:44: characters 28-32 : Array<Int> should be haxe.io.BytesData
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/CanvasTextureRoot.hx:44: characters 28-32 : Array<Int> should be js.html.ArrayBuffer
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/CanvasTextureRoot.hx:44: characters 28-32 : For function argument 'b'
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/CanvasTextureRoot.hx:39: lines 39-45 : Missing return haxe.io.Bytes
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/HtmlAssetPackLoader.hx:364: characters 16-38 : String should be js.html.XMLHttpRequestResponseType
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/HtmlAssetPackLoader.hx:367: characters 12-37 : String should be js.html.XMLHttpRequestResponseType
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/HtmlAssetPackLoader.hx:368: characters 16-42 : String should be js.html.XMLHttpRequestResponseType
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/HtmlAssetPackLoader.hx:205: characters 12-43 : String should be js.html.XMLHttpRequestResponseType
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/HtmlExternal.hx:37: characters 42-48 : js.html.Window should be haxe.Function
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/HtmlExternal.hx:37: characters 42-48 : For function argument 'func'
/usr/local/lib/haxelib/flambe/4,1,0/flambe/platform/html/HtmlExternal.hx:25: lines 25-38 : Missing return Dynamic
``
markknol commented 9 years ago

Same as https://github.com/aduros/flambe/issues/346

tl;dr you use the latest Haxe (3.2) which is not supported officially, only using on the git-version of Flambe. Apply this patch and the project should compile.

jordgubben commented 9 years ago

Thanks. It works. :tada: :balloon:

To who ever runs into this issue next, it's done by:

git clone https://github.com/aduros/flambe.git <some-path>
haxelib dev flambe <some-path>/src/