Hello Alon
many thanks for the hint, but I've to apologize, I'm an absolute beginner on emscripten and a newbie on that extent of JavaScript programming, so I've still some question: When I compile e.g. into a html file, then I see, as far as I understood, that the program is executed asynchronous in the background (which is logical). If I compile as .js and load it into nodejs, than also the program is started instantly (I didn't went through the generated js- source so far, maybe I should?) I didn't got to the point yet how I would have to load everything first (but without starting the program), to having the Environment ready for setting up the Virtual File system to fill my necessary data file and starting then the program somewhere later after all the initialization is done. Or better to say: I understand your proposal to call the program by calling its main routine as a function call, but I'm struggling of how to load and initialize everything but without starting it... Is there any sample or documentation exist for that? many thanks in advance regards Steffen Am Montag, 3. November 2014 20:18:56 UTC+1 schrieb Alon Zakai: > > You can call C methods in compiled emscripten code manually, > > > http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html?highlight=interacting > > If you want to run the entire program from scratch instead of calling a > specific method, you can put the compiled code in a JS function, then when > it is called, you get a new instance. > > - Alon > > > On Sun, Nov 2, 2014 at 7:26 AM, Steffen Köhler <[email protected] > <javascript:>> wrote: > >> Hello >> >> maybe it's not possible, but it's worth a try: >> >> Simply said, I would like to have a textbox. When the user presses a >> "Compile" button, the content of the textbox shall be transferred into >> emscriptens file system and the program which was compiled into emscripten >> shall be started. It compiles the file, writes the result into another file >> and finishes. This shall be recognized by the emscripten VM and finally a >> download of the created file shall be started. >> >> I went through several documents and sources already, but I couldn't find >> any hint if and how it's possible to start the emschripten "program" on >> request, detecting its end and writing in the file system before and after. >> >> It this possible at all and do there any howtos or sources exist? >> >> >> Many thanks! >> >> Steffen >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
