Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Task #774803

open

Emscripten clients for web.

Added by Zoltán Žarkov over 6 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

67%

Estimated time:
(Total: 0.00 h)

Description

This is the megaticket for emscripten work. I've attached the first build of something that crashes on the home screen.


Files

fc-sdl2.zip.partab (20 MB) fc-sdl2.zip.partab Zoltán Žarkov, 2018-09-19 09:38 PM
fc-sdl2.zip.partaa (20 MB) fc-sdl2.zip.partaa Zoltán Žarkov, 2018-09-19 09:38 PM
fc-sdl2.zip.partad (20 MB) fc-sdl2.zip.partad Zoltán Žarkov, 2018-09-19 09:38 PM
fc-sdl2.zip.partac (20 MB) fc-sdl2.zip.partac Zoltán Žarkov, 2018-09-19 09:38 PM
fc-sdl2.zip.partaf (1000 KB) fc-sdl2.zip.partaf Zoltán Žarkov, 2018-09-19 09:39 PM
fc-sdl2.zip.partae (20 MB) fc-sdl2.zip.partae Zoltán Žarkov, 2018-09-19 09:39 PM
emscripten.diff (6.09 KB) emscripten.diff Zoltán Žarkov, 2018-09-19 09:53 PM
0001-Add-ICU-and-SDL2_gfx-ports.patch (3.81 KB) 0001-Add-ICU-and-SDL2_gfx-ports.patch Zoltán Žarkov, 2018-09-20 06:00 PM

Sub-issues 8 (4 open4 closed)

Bug #775057: Function pointer casts not compatible with EmscriptenClosedMarko Lindqvist

Actions
Bug #829535: Multiple declarations of pOptions_ButtonClosedMarko Lindqvist

Actions
Feature #838867: Add SDL2 Emscripten client to autotools buildNew

Actions
Feature #871637: emscripten: Disable SDL2 configure checksClosedMarko Lindqvist

Actions
Feature #839110: Add Qt Emscripten client to autotools buildNew

Actions
Feature #873419: Consolidate Qt configure flagsNew

Actions
Feature #846914: Remove nested Qt event loopsClosedMarko Lindqvist

Actions
Feature #871624: Adapt networking for Emscripten clientsNew

Actions
Actions #1

Updated by Zoltán Žarkov over 6 years ago

Here's the patch of the changes I had to make.

Actions #2

Updated by Zoltán Žarkov over 6 years ago

Check out emscripten from head, apply this patch, and set PATH accordingly. Freeciv then builds:
emconfigure ./configure CFLAGS="-s USE_SDL=2 -s USE_SDL_TTF=2 -s USE_ICU=1 -s USE_SDL_IMAGE=2 -s USE_SDL_GFX=2 -s USE_ZLIB=1" LDFLAGS="-s USE_ZLIB=1 -s USE_SDL=2 -s USE_SDL_TTF=2 -s USE_ICU=1 -s USE_SDL_IMAGE=2 -s USE_SDL_GFX=2" --disable-fcdb --disable-server --disable-ipv6 --enable-client=sdl2 --disable-sdl-mixer --disable-fcmp && emmake make

Actions #3

Updated by Zoltán Žarkov over 6 years ago

After building, you need to add some flags to the emcc command that produces the final html output. cd client and:
/bin/sh ../libtool --tag=CC --preserve-dup-deps --mode=link emcc -Wno-tautological-compare -Wall -Wpointer-arith -Wcast-align -s USE_SDL=2 -s USE_SDL_TTF=2 -s USE_ICU=1 -s USE_SDL_IMAGE=2 -s USE_SDL_GFX=2 -s USE_ZLIB=1 -s USE_ZLIB=1 -s USE_SDL=2 -s USE_SDL_TTF=2 -s USE_ICU=1 -s USE_SDL_IMAGE=2 -s USE_SDL_GFX=2 -s SDL2_IMAGE_FORMATS='["png"]' -s ALLOW_MEMORY_GROWTH=1 --preload-file ../data@data -o freeciv-sdl2.html dummy.o libfcgui-sdl2.la ../common/libfreeciv.la -lm -lnls -pthread

emrun client/freeciv-sdl2.html will give you the friendly frozen home screen with a bunch of errors in the js console.

Actions #4

Updated by Zoltán Žarkov over 5 years ago

  • Subject changed from Emscripten SDL2 client for web. to Emscripten clients for web.

This is now for Qt and SDL2 Emscripten.

Also available in: Atom PDF