Compiling to html5?

Previous topic - Next topic

Bluepixel

Hi there, i am working on a small site and i was planning on releasing some games on there, so i was wondering if i could still export to html5, however, after i compiled the program i only got a dummy html file, and an empty distribute folder.

Is it still possible to export to html5 or am i doing something wrong?
www.bluepixel-studios.net

There are two ways to write error-free programs; only the third one works.
(Alan J. Perlis)

Kitty Hello

V16 does a good job for me. GACK compiles and runs fine.

MrPlow

I was curious and just extracted HTML.7z to platform folder and got an empty folder and message in compiler window

So I an assuming I missed some steps to install this emscripten thingy?


%EMSDK% is set, or SDK is not installed or can't be found at:
C:\Program Files\Emscripten
Get and install the (prebuilt) SDK from: https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html-----------------------------------------

'emsdk_env.bat' is not recognized as an internal or external command,
operable program or batch file.
'em++.bat' is not recognized as an internal or external command,
operable program or batch file.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

Quote from: Kitty Hello on 2019-Nov-28
V16 does a good job for me. GACK compiles and runs fine.

its isent released. plan to release a beta. Steam has a beta labal to do it. Im wish how well its compile Greedy Mouse, which use a lots of Polyvectors in that game.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kitty Hello

Oh. I should do that. I'm sorry.

Qedo

i'm getting error when compile in html5 with 16.252:

"%EMSDK% is set, or SDK is not installed or can't be found at:
C:\Program Files\Emscripten
Get and install the (prebuilt) SDK from: https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html"

I need to install SDK of  Emscripten?

Kitty Hello

Yes. Do the installers still exist?

Qedo

I have to compile sdk and it's not easy. For now I have downloaded it and you have to understand how to proceed
But are you sure there is no easier way?

dreamerman

Which files I need to edit/configure to compile for html5 now, or any tool needs to be in specific path or something? I've installed latest versions of Git, Emscripten, Python (in some custom path to avail possible ProgramFiles and similar issues) they can be launched from system cmd and so on, but whole time I get some errors, either one or another tool isn't supposedly in proper path.. Does this target is configured to use current distributions of needed tools, as for example for emscripten it looks on some bat/exe in main emsdk directory but tools are in corresponding sub directories. ofc. I've tried to edit some *bat's in platform path to force proper working directories but neither of them has impact on result.
Beside that HTML5-WebGl target is working, or more precisely does it have some restrictions, as in previous versions of GLB it wasn't capable of compiling project that use RenderToTexture / PolyVectors stuff.

Check my source code editor for GLBasic - link Update: 20.04.2020

dreamerman

Those *.bat files in platform/HTML5 are either not used for build or are for building GLB lib itself or something if I understand correctly, proper build file is 'compile_html5.bat' that's generated during compilation in 'temp\glbasic', this can be edited to set proper path for emscripten and that will work.
But there are other issues, first is that 'OUTLINING_LIMIT' setting is deprecated and not used in current emscripten, second thing, prebuilt / included GLB/HTML5 libraries were made with older version of emscripten, if You will try to use them on latest public version an error 'machine type must be wasm32' will appear, and compilation will stop.
Still there are those warning about multi brackets (()) and using == comparison instead of ===, but those can be ignored with some compiler switches.
It would be great if those critical errors could be fixed so HTML5 would be available again.
Check my source code editor for GLBasic - link Update: 20.04.2020

Qedo

I use version 16, currently 16.508, but I also hold on to version 15.238 which compiles Android (without Android Studio) and Html5 without problems.
Ad maiora

dreamerman

Hey, Qedo but what version of Emscripten and Python are You using? That's the issue.
As I mentioned, html5 target in GLB was set to use old versions of those tools (from couple years ago), and it just won't work on their current versions. So in short - You have small chances to get it working on fresh machine, or do a lot of digging to found proper old binaries, and other thing, it would be beneficial to use newest versions with all possible fixes, optimizations and so on.. Do fresh installation of emscripten, latest python and all other tools that are needed and You will see that it just doesn't work, with all issues mentioned in previous my post. :/
I would really like to have this as it's much easier to show possible demos for wider audience.
Check my source code editor for GLBasic - link Update: 20.04.2020

Qedo

Hi dreamerman first of all thanks for the reply.
Forgive me, however, it is not clear what you write or it is I who do not understand.
Do you need the latest versions of Emscripten and Python to make Html5 work?
Or are previous versions needed?
However, when I installed Html5 for V15 of GLB I started by downloading the JavaScript.7z file from the download folder http://www.glbasic.com/platform/v15/ and there is also the whole installation of Emscripten inside.
I copied the unzipped files in the local \GLBasic_v15\Compiler\platform\ folder and that's all I did and it worked.

Instead for the GLB V16 it seems to me different because in download, at http://www.glbasic.com/platform/v16/, I find HTML5.7z that I unzipped and I inserted in \GLBasic_v16\Compiler\platform\ But there is no Emscripten files. Is this the problem and if so, how can this be remedied?
Is there any further procedure to do? Launch some batch files?
However, I do not find any informstion that helps to understand and it seems a big lack.
Thanks again.
Ad maiora

dreamerman

Yeah, I could be more precise and write some background for it as You did :-)
So generally in v15 everything for html5 target was in one package, just unpack, instal some Java SDK and it's ready to go.. emscripten was included, no separate tools.
But v16 package contains only few config and *bat files that from what I understand are configured to work with proper emscripten installation in system - that needs to have python, git and possible other tools installed. Didn't saw any special info about that html5 target so I assumed that now proper way to use that target is to have all those tools installed in normal way as they should be. And here fun begins, as mentioned in previous post various problems appear during that - config files set for older emscripten installations, and GLBasic lib itself built with old commands.
Maybe my assumption was wrong and I need to copying v15 Javascript.zip platform to current v16 directory
and do some reconfiguration or something, really I don't know as I didn't found any info about that, or I missed something :/
Check my source code editor for GLBasic - link Update: 20.04.2020

Qedo

thanks, but the question is: does html5 on v16 work?
and if someone works, how did he do it?
:x