Author Topic: Compiling to html5?  (Read 849 times)

Offline Bluepixel

  • Mc. Print
  • *
  • Posts: 26
  • www.bluepixel-studios.net
    • View Profile
    • Bluepixel Studios
Compiling to html5?
« on: 2019-Nov-26 »
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)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10739
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Compiling to html5?
« Reply #1 on: 2019-Nov-28 »
V16 does a good job for me. GACK compiles and runs fine.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1691
    • View Profile
Re: Compiling to html5?
« Reply #2 on: 2019-Nov-28 »
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

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3893
    • View Profile
    • Space Fractal
Re: Compiling to html5?
« Reply #3 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 and The beagle Jam.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10739
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Compiling to html5?
« Reply #4 on: 2019-Nov-29 »
Oh. I should do that. I'm sorry.

Offline Qedo

  • Mr. Polyvector
  • ***
  • Posts: 233
  • UNUS SED LEO
    • View Profile
Re: Compiling to html5?
« Reply #5 on: 2020-Jan-31 »
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?

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10739
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Compiling to html5?
« Reply #6 on: 2020-Feb-11 »
Yes. Do the installers still exist?

Offline Qedo

  • Mr. Polyvector
  • ***
  • Posts: 233
  • UNUS SED LEO
    • View Profile
Re: Compiling to html5?
« Reply #7 on: 2020-Feb-12 »
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?

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 336
    • View Profile
    • my personal website
Re: Compiling to html5?
« Reply #8 on: 2020-May-04 »
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

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 336
    • View Profile
    • my personal website
Re: Compiling to html5?
« Reply #9 on: 2020-May-23 »
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