korge
korge copied to clipboard
Using Gradle task "jsBrowserDistribution"does not build correctly
How to reproduce:
- Checkout Korge Hello World
- Run
./gradlew jsBrowserDistribution - Open
build/distributions/index.html
Expected:
Actual:
It seems to me that the image resource isn't properly loaded in, as the animation still plays.
Update: I have dockerized the app and needed to install audio and graphic libraries to compile and it does work. I believe something along this line might be the problem, as I also don't get audio. Btw, if you want I can create a PR for the Docker code and document it I'll be happy to do it.
that'll be great if u have the time 🙂
@Maddin-M You need and http server to run the distribution package, most of websites need this to run properly.
If you have python on a Linux/Mac you can run it like this :
cd ./build/distributions
python -m http.server
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
Then open http://localhost:8000/ with your browser.
If your goal is to test the application during development, run the gradle command :
./gradlew runJs
This will build the package and run it on a HTTP Server.
@Maddin-M You need and http server to run the distribution package, most of websites need this to run properly.
If you have python on a Linux/Mac you can run it like this :
cd ./build/distributions python -m http.server Serving HTTP on :: port 8000 (http://[::]:8000/) ...
Ok, I understand. I have one very small issue with the command still: When used on a multi-module project the output will not be in build/distributions but in build/dist/js/productionExecutable.
that'll be great if u have the time 🙂
https://github.com/korlibs/korge-hello-world/pull/25 https://github.com/korlibs/korge/pull/1816
TY