www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Converting a Visual Studio Solution with many Projects into DUB

reply WhatMeWorry <kheaser gmail.com> writes:
I've got a large Visual Studio Solution which contains lots of 
Projects.  Each project is a standalone D/OpenGL tutorial.  I 
want to make it OS and IDE agnostic so it can be easily played 
with on Windows, Linux, and Mac OS so I thought it best to make 
it a dub package.

I've been reading the DUB documentation but can't seem to find a 
way. So in short, does DUB allow something like sub-packages?  Or 
collections of packages?

No is fine.  I just wanted to check before I go off and create a 
flat file system of dub packages.
Aug 16 2016
next sibling parent Lodovico Giaretta <lodovico giaretart.net> writes:
On Tuesday, 16 August 2016 at 15:46:23 UTC, WhatMeWorry wrote:
 I've got a large Visual Studio Solution which contains lots of 
 Projects.  Each project is a standalone D/OpenGL tutorial.  I 
 want to make it OS and IDE agnostic so it can be easily played 
 with on Windows, Linux, and Mac OS so I thought it best to make 
 it a dub package.

 I've been reading the DUB documentation but can't seem to find 
 a way. So in short, does DUB allow something like sub-packages?
  Or collections of packages?

 No is fine.  I just wanted to check before I go off and create 
 a flat file system of dub packages.
I think you are looking for this: https://code.dlang.org/package-format?lang=json#sub-packages
Aug 16 2016
prev sibling parent Guillaume Piolat <first.last gmail.com> writes:
On Tuesday, 16 August 2016 at 15:46:23 UTC, WhatMeWorry wrote:
 I've got a large Visual Studio Solution which contains lots of 
 Projects.  Each project is a standalone D/OpenGL tutorial.  I 
 want to make it OS and IDE agnostic so it can be easily played 
 with on Windows, Linux, and Mac OS so I thought it best to make 
 it a dub package.

 I've been reading the DUB documentation but can't seem to find 
 a way. So in short, does DUB allow something like sub-packages?
  Or collections of packages?
Yes. Advice: put the shared code in one package (eventually with sub-packages but this is a bit harder at the start) and put your project each in one directory with their own dub.json/dub.sdl Then you can use "path-based" dependencies to the shared code. You can check the organization of dplug or GFM, with the examples/ directory. You can use sub-packages / configurations for each project but I find it less clear.
Aug 16 2016