Why would a web server not be able to dynamically generate an executable?
+1
A:
Richard
2010-08-19 09:51:30
+1
A:
Sure, just run a compiler on the server with exec()
.
I do something similar with generating PDF files from LaTeX sources, since that is basically compiling as well...
polemon
2010-08-19 09:51:45
That was fast -- thanks! Is compiling a Windows executable using this method resource-intensive? Can it be done ~100k times a day without exorbitant cost? I'm asking because Ninite announced that they're going paid-only... can it be costing them that much?
tunack
2010-08-19 09:58:43
It ultimately comes down to the question, how long your code compiles.if it is just a second or even less, then it shouldn't be much of a problem. But if it takes over ten seconds, I'd try another approach.
polemon
2010-08-19 10:14:52
@tunack: No. Compiling a single windows exe takes a couple of seconds to many minutes (depending on the size). Most likely, they have an existing binary and just replace a resource in it.
Aaron Digulla
2010-08-19 10:19:00
+1
A:
The site doesn't seem to create executable but just provide them for download.
[EDIT] Creating those huge downloads on the fly would create a huge burden on the server. Moreover it could create buggy software. So my guess is, if these people know what they're doing, they have a server which prepackages everything, tests it and then dumps it in the download directory of the web server.
But of course, nothing stops a server from invoking any kind of program (with maybe the exception of the patience of the surfer). So they can run compilers, archivers, whatever.
Aaron Digulla
2010-08-19 09:53:19
The downloads aren't huge, it's just a small hundred KB web-based downloader+installer app that knows which apps to install.
tunack
2010-08-19 10:02:35
In that case the installer is probably a fixed binary with a config file. Servers have no problem to create text from some description (HTML is text, so what you see on the screen is just the same happening) and then, the server just has to add the selected configs to the binary. That's much more simple (and faster) than compiling a new binary.
Aaron Digulla
2010-08-19 10:18:03