Emscripten needs a detailed Windows tutorial

693 views
Skip to first unread message

azakai

unread,
Sep 2, 2012, 4:51:57 PM9/2/12
to emscripte...@googlegroups.com
We could really benefit from a full detailed tutorial for using Emscripten on Windows. The current tutorial is good but generic, and there are some Windows-specific things like getting cygwin, building llvm with that, and setting up the ~/.emscripten file. Also Emscripten use is very commandline, and Windows people generally like that less. This makes it hard for Windows people to use Emscripten, for example one of the Ogre3D devs is interested in porting Ogre to the web, but ran into trouble,

http://www.ogre3d.org/forums/viewtopic.php?f=4&t=66394&p=468704#p468702

If anyone reading this uses Emscripten on Windows and can write a detailed guide for setting up and using Emscripten there, that would be much appreciated :)

- azakai

MikeB_2012

unread,
Sep 3, 2012, 8:18:50 PM9/3/12
to emscripte...@googlegroups.com
or, if anyone can write an approximate good description and I will write a detailed description from that as I try to make it work for a project of my own. ciao

Pierre Renaux

unread,
Sep 3, 2012, 8:46:42 PM9/3/12
to emscripte...@googlegroups.com
Hi,

I have setup an Emscripten toolchain for Windows which includes clang_31
& gcc_470, there's some dependencies on MingW as-well. (I've used it to
build everything at http://talansoft.com/muse/webgl/index.html - this
include building our 3d engine, which about 2M line of C++...)

I'm going to add an "emscripten" target to ham
(https://github.com/prenaux/ham) which is a make-like build system based
on Jam. The repo is self contained for Windows, that is you get the repo
and there's the minimal MingW32 environment to get the build running ;
the current version only supports VC10 in its default install folder, as
I have time/need, I'll be porting step by step all the platforms we
support in our projects - that is VC9, GCC 4+ (Linux, OSX, iOS, Android,
Window) & Clang, Emscripten (JS), the next target platform is Emscripten
on Windows...

In general for Windows I'd like to have a set of "toolchain" packages
that can be easily downloaded so that Ham can find it automatically.

On windows those toolchain are self contained and they could be used
from make without much difficulties ; for ham I just use a bash script
to setup an active build environment - a makefile could re-use that
environment, or just use the standard install folders or the Windows
PATH...). For ham I have a plug-in for Eclipse and a template for Visual
Studio which I want to add to the ham repo in the future.

Anyhow, I didn't put those up yet because I don't have a stable FTP to
upload them to and uploading those huge file on Github doesn't work from
where I am (China... connection is pretty flaky...).

If there's a stable FTP I can upload to, I'll be happy to spend some
time to make an Emscripten installer for Windows which would include
git, make, GCC 470, Clang 31, etc...

Cheers,
- Pierre

Alon Zakai

unread,
Sep 4, 2012, 2:22:25 PM9/4/12
to emscripte...@googlegroups.com
That sounds great! And nice project, it might be the biggest to use
emscripten so far :)

How about using dropbox? Their file upload has worked well in my
experience (we host a few Emscripten demos there including BananaBread
that is dozens of MB). If you don't already have a dropbox account
they might limit your public folder (that others can download from),
but if you upload it to your dropbox and share it with me, I can put
it in my public folder.

Best,
Alon Zakai

Pierre Renaux

unread,
Sep 4, 2012, 7:24:39 PM9/4/12
to emscripte...@googlegroups.com
Hi,

I didn't think of that (old habits ;)) I do have a Skydrive that I
should be able to use. My concern would be that it might be against the
TOS of those kind of service to use them in that way (essentially as a
CDN...).

Anyway I'll put that up there and send you the share link once its done,
should be sometime during the next 2-3 days.

Cheers,
- Pierre

Alon Zakai

unread,
Sep 5, 2012, 12:57:25 PM9/5/12
to emscripte...@googlegroups.com
Great! If I can download it from there, I'll find a place to host it for others.

- azakai


On Tue, Sep 4, 2012 at 4:24 PM, Pierre Renaux

Pierre Renaux

unread,
Sep 6, 2012, 1:58:49 AM9/6/12
to emscripte...@googlegroups.com
Hi,

Would be good if some Windows user can give this a go:
https://github.com/prenaux/ham/wiki/Toolset:-Emscripten

In the end I've hosted everything on github (the packages are in the
download section) since I've made a couple of smaller packages instead
of on single big archive.

Its been tested on a couple of Windows machines and in a clean VM so it
should be working as intended.

Once this been confirmed to be working I'll make a regular Windows
installer from it. I'll put the installer code in there so anyone can
build it if they need to.

Any suggestion to improve it are welcome of course :)

Cheers,
- Pierre

Alon Zakai

unread,
Sep 18, 2012, 5:17:57 PM9/18/12
to emscripte...@googlegroups.com
Too bad there wasn't more followup on this, I guess we don't have that
many windows contributors yet.

clb just added some docs for settings things up in visual studio though,

https://github.com/kripken/emscripten/wiki/Using-Emscripten-from-Visual-Studio-2010

Would be great it people could test both that and Pierre's setup in this thread.

- azakai


On Wed, Sep 5, 2012 at 10:58 PM, Pierre Renaux

Pierre Renaux

unread,
Sep 18, 2012, 8:45:41 PM9/18/12
to emscripte...@googlegroups.com
Once someone other than me confirmed it works for them I'm still up to make a self contained exe installer.

Right now in a nutshell:
a) download the ham repo
b) start ham-shell.cmd, ". ham-toolset emscripten" it downloads all the dependencies, etc...
c) you're good to go...
see https://github.com/prenaux/ham/wiki/Toolset:-Emscripten for more details...

If you want to build your projects in VS2010, I'd recommand using ham or make, and create a makefile project in VS.

It works basically as if you were using a native VS project ; that's what we do, or did, since we don't have anyone using VS anymore here ;)

Cheers,
- Pierre

Reply all
Reply to author
Forward
0 new messages