--
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 emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Emrun by default routes GET parameters to an array Module.arguments = []; , which Emscripten apps read by default to argc+argv. It's a very short snippet of code: https://github.com/kripken/emscripten/blob/master/src/emrun_prejs.js . Though emrun is generally used by automating command line runs of a compiled page, so you may just want to copy that code to your shell .html file (and pass the linker flag --shell-file myshell.html to use it).
2015-09-10 20:47 GMT+03:00 Alon Zakai <alon...@gmail.com>:
main() argc/argv are set from Module.arguments, which is just a list of strings. You could copy the GET params from the url into that. I don't think we have a utility anywhere to do it automatically, although maybe emrun does that?
On Thu, Sep 10, 2015 at 8:51 AM, Robert Goulet <robert...@autodesk.com> wrote:
Hi all,Is it possible to have an Emscripten generated html to take the http parameters (GET or POST) and pass them to the C/C++ main as argc/argv?For example, browsing to:I would expect that in int main(int argc, char* argv[]) contains:argc = 5argv[0] = "index.html"argv[1] = "param1"argv[2] = "hello"argv[3] = "param2"argv[4] = "42"Or is there something equivalent that works just as well?Thanks!
--
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 emscripten-discuss+unsub...@googlegroups.com.
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 emscripten-discuss+unsub...@googlegroups.com.
Ah I see, good thing we can override the HTML with this --shell-file parameter, very nice. I still believe that passing GET parameters to argv/argc would be done by the default shell file thought.
Thanks!
On Thursday, September 10, 2015 at 2:17:23 PM UTC-4, jj wrote:
Emrun by default routes GET parameters to an array Module.arguments = []; , which Emscripten apps read by default to argc+argv. It's a very short snippet of code: https://github.com/kripken/emscripten/blob/master/src/emrun_prejs.js . Though emrun is generally used by automating command line runs of a compiled page, so you may just want to copy that code to your shell .html file (and pass the linker flag --shell-file myshell.html to use it).
2015-09-10 20:47 GMT+03:00 Alon Zakai <alon...@gmail.com>:
main() argc/argv are set from Module.arguments, which is just a list of strings. You could copy the GET params from the url into that. I don't think we have a utility anywhere to do it automatically, although maybe emrun does that?
On Thu, Sep 10, 2015 at 8:51 AM, Robert Goulet <robert...@autodesk.com> wrote:
Hi all,Is it possible to have an Emscripten generated html to take the http parameters (GET or POST) and pass them to the C/C++ main as argc/argv?For example, browsing to:I would expect that in int main(int argc, char* argv[]) contains:argc = 5argv[0] = "index.html"argv[1] = "param1"argv[2] = "hello"argv[3] = "param2"argv[4] = "42"Or is there something equivalent that works just as well?Thanks!
--
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 emscripten-disc...@googlegroups.com.
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 emscripten-disc...@googlegroups.com.
--
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 emscripten-disc...@googlegroups.com.