Thread overview
Distribution
Mar 29, 2005
Rob
Mar 29, 2005
clayasaurus
Mar 29, 2005
Derek Parnell
Mar 29, 2005
Walter
license was Re: Distribution
Apr 02, 2005
Marco A
Apr 03, 2005
Walter
March 29, 2005
Every D program I've seen has the source code. does this mean any distributions have to include the source? also if I made a game, is there a way to compact everything into one large executable?


March 29, 2005
Rob wrote:
> Every D program I've seen has the source code. does this mean any distributions
> have to include the source? also if I made a game, is there a way to compact
> everything into one large executable?
> 

You don't need to distrubute source code with your program, and you can compact everything into a large exe using http://www.jrsoftware.org/isinfo.php


March 29, 2005
On Tue, 29 Mar 2005 01:55:27 +0000 (UTC), Rob wrote:

> Every D program I've seen has the source code. does this mean any distributions have to include the source? also if I made a game, is there a way to compact everything into one large executable?

You have at least two options:
(1) Compile the program into an executable for each platform you wish to
run it on, and distribute the executable.

(2) Compile the modules into object files, optionally bundle them into a library, and provide function signature modules in source form. Distribute the library (or object files), and the function signature source. People can then use your object files in their applications without having to see your implementation source code.

For example, your module source code looks like ...

  module myfoo;
  int Bop (int a, int b) { return a * a + b * b - 1; }
  int Bif (int a, int b) { return a * a - b * b + 1; }

Then you create a library containing the compiled version of this module...

  build myfoo

And create a function signature source that would look like ...
  module myfoo;
  int Bop (int a, int b);
  int Bif (int a, int b);

Then the application code could look like ...

  module mytest;
  import std.stdio;

  import myfoo;  // Function signatures
  pragma(lib, "myfoo.lib"); // Function definitions.

  void main()
  {
    writefln( "%d %d", Bop(2,3), Bif(2,3));
    writefln( "%d %d", Bop(3,4), Bif(3,4));
    writefln( "%d %d", Bop(4,5), Bif(4,5));
    writefln( "%d %d", Bop(5,6), Bif(5,6));
  }

and compile this with ...

   build mytest

** Note that this method does not work with Class definitions. I'm not sure why but when I try it I get linker messages such as ...

  myfoo.lib(myfoo)  Offset 1A420H Record Type 0091
   Error 1: Previous Definition Different : __init_5myfoo3Foo

Maybe someone could enlighten both of us how to do the library trick with classes. :D

-- 
Derek Parnell
Melbourne, Australia
http://www.dsource.org/projects/build/
http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage
29/03/2005 12:57:40 PM
March 29, 2005
"Rob" <Rob_member@pathlink.com> wrote in message news:d2acif$bac$1@digitaldaemon.com...
> Every D program I've seen has the source code. does this mean any
distributions
> have to include the source?

For code that you write, you can copyright it, put it in public domain, do closed source, whatever you want as it is your code. D most definitely does NOT require that any programs compiled with D and linked with the Phobos D runtime library be made open source. The D runtime library is open source, but is not GPL.

However, the D compiler front end source is GPL, and any program that incorporates the D compiler source code will need to be GPL or acquire a separate license from Digital Mars.



April 02, 2005
In article <d2ce3q$2afh$1@digitaldaemon.com>, Walter says...
>
>However, the D compiler front end source is GPL, and any program that incorporates the D compiler source code will need to be GPL or acquire a separate license from Digital Mars.

I thought the compiler front end had both the Artistic license and the GPL, I haven't looked at the license in a while.

By the way, could someone demand to you to release all of the DMD source since it uses the GPL'd D compiler front end source?

just curious


April 03, 2005
Marco A wrote:

> In article <d2ce3q$2afh$1@digitaldaemon.com>, Walter says...
> 
>>However, the D compiler front end source is GPL, and any program that
>>incorporates the D compiler source code will need to be GPL or acquire a
>>separate license from Digital Mars.
> 
> I thought the compiler front end had both the Artistic license and the GPL, I
> haven't looked at the license in a while.  

You are right:

(dmd/src/dmd/readme.txt)
> This is the source code to the front end Digital Mars D compiler.
> It covers the lexical analysis, parsing, and semantic analysis
> of the D Programming Language defined in the documents at
> www.digitalmars.com/d/
[...]
> These sources are free, they are redistributable and modifiable
> under the terms of the GNU General Public License (attached as gpl.txt),
> or the Artistic License (attached as artistic.txt).

The Artistic License does not require you to release any sources.
(it's the same license as Perl uses, and can be viewed online at:
http://www.opensource.org/licenses/artistic-license.php, as well)

However, the GPL licensing allows add-on programs - such as GDC -
to use DMD front-end and integrate it with GPL programs like GCC,
placing the result (that is: the GCC/GDC compiler), under GPL too.

Which means that GDC is available under GPL, but not under Artistic.
It would also be possible to create a D compiler that was released
under the Artistic license, but not under the GPL. (i.e. it's Dual)


Maybe Walter was thinking of the DMDScript sources, which are GPL ?

--anders

PS.

FSF says this about the "License of Perl" (similar to DMD front-end) :

> License of Perl
> 
> This license is the disjunction of the Artistic License and the GNU
> GPL--in other words, you can choose either of those two licenses. It
> qualifies as a free software license, but it may not be a real copyleft.
> It is compatible with the GNU GPL because the GNU GPL is one of the
> alternatives.
> 
> We recommend you use this license for any Perl 4 or Perl 5 package you
> write, to promote coherence and uniformity in Perl programming. Outside
> of Perl, we urge you not to use this license; it is better to use just
> the GNU GPL.

And this about the "original Artistic License" (artistic.txt) itself:

> We cannot say that this is a free software license because it is too
> vague; some passages are too clever for their own good, and their
> meaning is not clear. We urge you to avoid using it, except as part of
> the disjunctive license of Perl.
> 
> The problems are matters of wording, not substance. There is a revised
> version of the Artistic License (dubbed "Artistic License 2.0") which is
> a free software license, and even compatible with the GNU GPL. This
> license is being considered for use in Perl 6. If you are thinking of
> releasing a program under the Artistic License, please do investigate
> other GPL-compatible, Free Software licensing options listed here first.

See also:
http://dev.perl.org/perl6/rfc/211.html
"The Artistic License Must Be Changed"
April 03, 2005
"Marco A" <Marco_member@pathlink.com> wrote in message news:d2na37$18kn$1@digitaldaemon.com...
> By the way, could someone demand to you to release all of the DMD source
since
> it uses the GPL'd D compiler front end source?

Good question. No, since Digital Mars as the copyright holder has additional rights.