digitalmars.D.learn - Shipping the DMD compiler with code
- Colin Grogan (19/19) Nov 01 2013 I have a project I may need to write that is pretty performance
- bearophile (5/7) Nov 01 2013 I think you are not allowed to redistribute the DMD compiler. So
- Joseph Rushton Wakeling (5/7) Nov 01 2013 Many things are possible if you get permission from the right person ......
- Colin Grogan (5/15) Nov 01 2013 Theres should be no issue in using gdc, and I wouldn't like to
- John Colvin (13/32) Nov 01 2013 dmd.conf can be in the same folder as the dmd executable. All the
- Colin Grogan (5/45) Nov 01 2013 Yeah, I guess I can put this in a script that will check
- Jacob Carlborg (11/27) Nov 02 2013 Due to license issue you're not allowed to distribute the DMD without
- Colin Grogan (3/42) Nov 04 2013 Looks very useful, I'll look into it!
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!
Nov 01 2013
Colin Grogan: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 think you are not allowed to redistribute the DMD compiler. So you have to use GDC or LDC (where LDC = LDC2). Bye, bearophile
Nov 01 2013
On 01/11/13 17:01, bearophile wrote:I think you are not allowed to redistribute the DMD compiler. So you have to use GDC or LDC (where LDC = LDC2).Many things are possible if you get permission from the right person ... :-) Depending on the use-case it may be preferable to ship GDC or LDC anyway, but if DMD is desired, ask Walter directly. The worst that can happen is he says no (and if he does, it'll most likely be because his hands are tied).
Nov 01 2013
On Friday, 1 November 2013 at 16:12:10 UTC, Joseph Rushton Wakeling wrote:On 01/11/13 17:01, bearophile wrote:Theres should be no issue in using gdc, and I wouldn't like to hassle Walter with that. He should be busy making fixing bugs in the new dmd release anyway! ;)I think you are not allowed to redistribute the DMD compiler. So you have to use GDC or LDC (where LDC = LDC2).Many things are possible if you get permission from the right person ... :-) Depending on the use-case it may be preferable to ship GDC or LDC anyway, but if DMD is desired, ask Walter directly. The worst that can happen is he says no (and if he does, it'll most likely be because his hands are tied).
Nov 01 2013
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.
Nov 01 2013
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: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!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.
Nov 01 2013
On 2013-11-01 16:47, 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?Due to license issue you're not allowed to distribute the DMD without permission from Walter, which he usually give. But perhaps you could tell the user to download the DMD zip themselves.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 ?The DMD from the zip will work out of the box. No need to install anything. Just download and unpack the zip. You could also create a tool that downloads and unzip the compiler. Then you might want to take a look at DVM, which already does that: https://github.com/jacob-carlborg/dvm -- /Jacob Carlborg
Nov 02 2013
On Saturday, 2 November 2013 at 11:40:59 UTC, Jacob Carlborg wrote:On 2013-11-01 16:47, Colin Grogan wrote:Looks very useful, I'll look into it!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?Due to license issue you're not allowed to distribute the DMD without permission from Walter, which he usually give. But perhaps you could tell the user to download the DMD zip themselves.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 ?The DMD from the zip will work out of the box. No need to install anything. Just download and unpack the zip. You could also create a tool that downloads and unzip the compiler. Then you might want to take a look at DVM, which already does that: https://github.com/jacob-carlborg/dvm
Nov 04 2013