www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Recommended procedure to upgrade DMD installation

reply A D dev <addev dlang.com> writes:
Hi group,

Somewhat new to D.

What is the recommended procedure, if any, to upgrade my DMD 
installation (on Windows, if that makes a difference)?

I.e. If I have 2.70.0 and I saw that 2.17.1 is out now, I can 
look at the list of bug fixes and any new features in the new 
version and decide whether I want to upgrade, or wait for another 
version with more changes that matter to me. That is not what my 
question is about. My question is about:

- should I just install the new version in the same directory, 
over the old version, or do I need to uninstall the old version 
first.

- if I have to first uninstall the old version, are there any 
persistent setting for the compiler that I need to save before 
the uninstall and then restore after the new install?

- any other things I need to take care of?

Thanks.
Aug 04 2016
next sibling parent reply Seb <seb wilzba.ch> writes:
On Thursday, 4 August 2016 at 18:47:36 UTC, A D dev wrote:
 Hi group,

 Somewhat new to D.

 What is the recommended procedure, if any, to upgrade my DMD 
 installation (on Windows, if that makes a difference)?

 I.e. If I have 2.70.0 and I saw that 2.17.1 is out now, I can 
 look at the list of bug fixes and any new features in the new 
 version and decide whether I want to upgrade, or wait for 
 another version with more changes that matter to me. That is 
 not what my question is about.
OT: 2.071.0 has been released in April - you may check more often ;-)
 My question is about:

 - should I just install the new version in the same directory, 
 over the old version, or do I need to uninstall the old version 
 first.
I never use(d) Windows, but I can help you in the way that there are no persistent settings. A DMD installation is completely independent in it's folder. Hence you can safely install the new version in the same directory, but I would make at least a copy of the old version first - just in case any regression popped in.
 - if I have to first uninstall the old version, are there any 
 persistent setting for the compiler that I need to save before 
 the uninstall and then restore after the new install?
The only configuration file is `dmd.conf` (for common flags), a user usually doesn't need to modify it, so I would be surprised if you did.
 - any other things I need to take care of?
Not that I would know of, but maybe people using Windows can give more advice.
 Thanks.
Aug 04 2016
parent A D dev <addev dlang.com> writes:
On Thursday, 4 August 2016 at 22:20:12 UTC, Seb wrote:

 OT: 2.071.0 has been released in April - you may check more 
 often ;-)
That - 2.071.0 - was actually a typo - I meant to type 2.071.1 - which I read (probably on a recent edition of This Week in D) has been released recently.
 I never use(d) Windows, but I can help you in the way that 
 there are no persistent settings. A DMD installation is 
 completely independent in it's folder. Hence you can safely 
 install the new version in the same directory, but I would make 
 at least a copy of the old version first - just in case any 
 regression popped in.
 The only configuration file is `dmd.conf` (for common flags), a 
 user usually doesn't need to modify it, so I would be surprised 
 if you did.
Thanks for the answers.
Aug 05 2016
prev sibling parent reply Mike Parker <aldacron gmail.com> writes:
On Thursday, 4 August 2016 at 18:47:36 UTC, A D dev wrote:
 Hi group,

 Somewhat new to D.

 What is the recommended procedure, if any, to upgrade my DMD 
 installation (on Windows, if that makes a difference)?

 I.e. If I have 2.70.0 and I saw that 2.17.1 is out now, I can 
 look at the list of bug fixes and any new features in the new 
 version and decide whether I want to upgrade, or wait for 
 another version with more changes that matter to me. That is 
 not what my question is about. My question is about:

 - should I just install the new version in the same directory, 
 over the old version, or do I need to uninstall the old version 
 first.
f you're running the installer, it will uninstall the previous version for you. If you are doing it manually, I recommend you delete the existing folder rather than overwriting it.
 - if I have to first uninstall the old version, are there any 
 persistent setting for the compiler that I need to save before 
 the uninstall and then restore after the new install?
If you are compiling 64-bit programs, the installer will find the Microsoft tools for you. If you are installing manually, you need to edit sc.ini manually with the correct paths, so you'll want to back up the existing sc.ini first in that case (or if you've made any other edits to it).
Aug 04 2016
parent reply A D dev <addev dlang.com> writes:
On Friday, 5 August 2016 at 00:07:36 UTC, Mike Parker wrote:
 If you're running the installer, it will uninstall the previous 
 version for you. If you are doing it manually, I recommend you 
 delete the existing folder rather than overwriting it.
Thanks for the info.
 If you are compiling 64-bit programs, the installer will find 
 the Microsoft tools for you. If you are installing manually, 
 you need to edit sc.ini manually with the correct paths, so 
 you'll want to back up the existing sc.ini first in that case 
 (or if you've made any other edits to it).
What Microsoft tools are you referring to? Do you mean C toolchain build tools, like the linker, librarian, (N)MAKE, etc.? Does D depend on those on Windows? (I do remember reading a D doc, maybe the overview, that said something like that, or at least that it plays well with existing common toolchains.) I don't remember all of the names of the Windows C build tools now (plus, they could have changed over time), have to do a bit of reading to brush up / update myself on that. I've done C dev on Windows (and DOS before it), including command line use of the MS compiler and linker (CL.exe, LINK.exe, IIRC), but all that was some years ago. Thanks.
Aug 05 2016
parent reply Mike Parker <aldacron gmail.com> writes:
On Friday, 5 August 2016 at 21:36:07 UTC, A D dev wrote:

 What Microsoft tools are you referring to? Do you mean C 
 toolchain build tools, like the linker, librarian, (N)MAKE, 
 etc.? Does D depend on those on Windows? (I do remember reading 
 a D doc, maybe the overview, that said something like that, or 
 at least that it plays well with existing common toolchains.)
DMD ships with the OPTLINK linker and uses it by default. OPTLINK uses object files in the OMF format. If you want to compile and link any C or C++ libraries, they also need to be OMF. You can achieve that by converting object files from COFF to OMF or by compiling with DMC if possible. OPTLINK does not support 64-bit, so if you want to compile 64-bit with DMD (using the -m64 switch) you need the MS linker installed as DMD will create objects in the COFF format (you can also get 32-bit COFF objects with -m32mscoff switch). That means you either need to install the MS build tools [1] or some version of Visual Studio (the Community Edition is free [2]). If you install only the build tools, you will also need the Windows SDK [3] to use the system libraries in COFF format. Visual Studio comes with everything you need. I don't know if the DMD installer will discover the build tools installation for you yet, as I've never tried it. But it will definitely find Visual Studio.
 I don't remember all of the names of the Windows C build tools 
 now (plus, they could have changed over time), have to do a bit 
 of reading to brush up / update myself on that. I've done C dev 
 on Windows (and DOS before it), including command line use of 
 the MS compiler and linker (CL.exe, LINK.exe, IIRC), but all 
 that was some years ago.
You generally don't need to worry about calling them directly unless you plan to compile any C or C++ source to link with your 64-bit (or -m32mscoff) D apps. As long as they are installed and DMD knows where to find the linker and any system libraries you need, that's enough. [1] https://www.microsoft.com/en-us/download/details.aspx?id=48159 [2] https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx [3] https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
Aug 05 2016
parent A D dev <addev dlang.com> writes:
On Saturday, 6 August 2016 at 01:22:51 UTC, Mike Parker wrote:

 DMD ships with the OPTLINK linker and uses it by default.
 You generally don't need to worry about calling them directly
Got it, thanks.
Aug 06 2016