On Friday, 1 November 2013 at 17:07:48 UTC, John Colvin wrote:
On Friday, 1 November 2013 at 15:47:56 UTC, Colin Grogan wrote:
I have a project I may need to write that is pretty
performance intensive, but also needs to be quite
customiseable.
We previously had this done with Perl, and the customising
came from adding functions to a file and the main script would
call those functions as required.
Problem is, the Perl program is performing very slowly.
Im thinking of doing this with D, and using string mixins to
add in customised functions at compile time. All well and good
I think.
However, I dont want to have the hassle of telling users to
install a D compiler on their systems.
Ideally, the user should be able to unzip this tool and run it
with rdmd.
Is it possible to ship the D compiler with the code, and not
have to worry about any libs and config files being missing?
I'm specifically thinking about libphobos.a and dmd.conf, can
they just be in the same folder as the D compiler or do they
need to be in /usr/lib and /etc ?
Thanks folks!
dmd.conf can be in the same folder as the dmd executable. All
the rest of the linking etc. is specified in dmd.conf so you
just need to set that up appropriately.
The legal side of things is a different matter. I quote from
src/backendlicense.txt : "The Software is copyrighted and comes
with a single user license, and may not be redistributed. If
you wish to obtain a redistribution license, please contact
Digital Mars."
Walter may be able to grant redistribution rights if you ask
him, IIRC this has happened before?? If not, you could just add
a tiny downloader that grabs the zip file on the clients
machine, which contains everything you need with no
installation necessary.
Yeah, I guess I can put this in a script that will check
everytime the program is run if dmd (or gdc etc) exists, and if
not go and download it.
Thanks for the info folks!