Skip to content

html version of moai sdk is not working #15

@ghost

Description

After successfully building a linux version of moai sdk, I am trying to build a html host, which is really a hard thing to do.

run build-html.sh first time

In file included from /home/jackie/Desktop/moai/moai-community/sdk/moai/src/zl-util/ZLDeviceTime_posix.cpp:32:
In file included from /home/jackie/Desktop/moai/emsdk/fastcomp/emscripten/system/include/emscripten.h:1:
/home/jackie/Desktop/moai/emsdk/fastcomp/emscripten/system/include/emscripten/emscripten.h:234:25: error: typedef redefinition with
      different types ('struct _IO_FILE' vs 'int')
typedef struct _IO_FILE FILE;
                        ^
/home/jackie/Desktop/moai/moai-community/sdk/moai/src/zl-vfs/zl_replace_stdio.h:23:14: note: expanded from macro 'FILE'
#define FILE ZLFILE
             ^
/home/jackie/Desktop/moai/moai-community/sdk/moai/src/zl-vfs/headers.h:38:13: note: previous definition is here
typedef int ZLFILE;
            ^
1 error generated.

so I change typedef int ZLFILE to typedef FILE ZLFILE and it worked

run build-html again

[100%] Linking CXX static library libmoaishared.bc
[100%] Built target moaishared
Scanning dependencies of target moaijs
shared:ERROR: unclosed quoted string. expected final character to be ''' in ''FS_unmount'\\ '
CMakeFiles/moaijs.dir/build.make:57: recipe for target 'CMakeFiles/moaijs' failed
make[3]: *** [CMakeFiles/moaijs] Error 1
CMakeFiles/Makefile2:133: recipe for target 'CMakeFiles/moaijs.dir/all' failed
make[2]: *** [CMakeFiles/moaijs.dir/all] Error 2
CMakeFiles/Makefile2:140: recipe for target 'CMakeFiles/moaijs.dir/rule' failed
make[1]: *** [CMakeFiles/moaijs.dir/rule] Error 2
Makefile:175: recipe for target 'moaijs' failed
make: *** [moaijs] Error 2

so I deleted the space after the FS_unmount in file cmake/hosts/host-html/CMakeLists.txt

and run it again, I got shared:ERROR: undefined exported function: "_AKURunScript"
so I deleted _AKURunScript and repeat the process until it finally builds

I have run pito host run html successfully, but the webplayer is not working at all. My browser gives me error message like TypeError: Module.cwrap is not a function

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions