digitalmars.D - What I do to easily switch between different DMD versions and
- Anders Bergh (26/26) Jun 20 2007 Since there are now two D versions, I figured some of you might be
- Max Samukha (3/27) Jun 20 2007 Very useful info. Thanks!
- Henning Hasemann (9/11) Jun 20 2007 Cool I didnt know Windows has "already" something that comes close to
- Daniel Keep (8/18) Jun 20 2007 They aren't. You need to be very careful with junctions. Firstly, if
- Don Clugston (4/24) Jun 20 2007 A solution to this would be to change the icon while making the junction...
- Tomas Lindquist Olsen (5/31) Jun 20 2007 Back when I used Windows I used this shell extension which allows you to
- Tomas Lindquist Olsen (4/38) Jun 20 2007 oups...
- Bruno Medeiros (10/41) Jun 21 2007 For working with junction points (folders) and hard links (file) in
- Daniel Keep (11/14) Jun 20 2007 IIRC: you need to create an attrib +hs file[1] called Desktop.ini with
- Don Clugston (7/48) Jun 21 2007 Great! But is it necessary to delete the old symlink? It seems to work f...
- Anders Bergh (8/14) Jun 21 2007 I only deleted the old symlink just in case... if it works without it
Since there are now two D versions, I figured some of you might be interested in the trick I use on Windows to switch between compilers easily. I have DMD 1.016 (Phobos), DMD 1.014 (Tango) and DMD 2.000. Switching between versions is only two clicks away. Things you will need: 1. Windows 2000 or above. 2. NTFS file system. 3. http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx This tool lets you create directory symlinks (NTFS junctions). 1. Extract "junction.exe" into your PATH, I simply extracted it into C:\Windows. 2. Extract dmd 1.x into c:\dmd1_phobos. 3. Extract dmd 2.x into c:\dmd2_phobos. 4. Open notepad, copy/paste this into a new file, "dmd1_phobos.bat": echo off rem Deletes the current symlink and replaces it with a new one. junction -d c:\dmd junction c:\dmd c:\dmd1_phobos 5. Do the same for your other DMD installations, just replace "c:\dmd1_phobos" with "c:\dmd2_phobos", etc. To change between DMD versions, simply double click the corresponding batch file. The location of the batch files does not matter. I hope this helps someone out there, it sure did make things easier for me when playing around with Tango and 2.0 :-) -- Anders
Jun 20 2007
On Wed, 20 Jun 2007 12:45:30 +0200, "Anders Bergh" <anders1 gmail.com> wrote:Since there are now two D versions, I figured some of you might be interested in the trick I use on Windows to switch between compilers easily. I have DMD 1.016 (Phobos), DMD 1.014 (Tango) and DMD 2.000. Switching between versions is only two clicks away. Things you will need: 1. Windows 2000 or above. 2. NTFS file system. 3. http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx This tool lets you create directory symlinks (NTFS junctions). 1. Extract "junction.exe" into your PATH, I simply extracted it into C:\Windows. 2. Extract dmd 1.x into c:\dmd1_phobos. 3. Extract dmd 2.x into c:\dmd2_phobos. 4. Open notepad, copy/paste this into a new file, "dmd1_phobos.bat": echo off rem Deletes the current symlink and replaces it with a new one. junction -d c:\dmd junction c:\dmd c:\dmd1_phobos 5. Do the same for your other DMD installations, just replace "c:\dmd1_phobos" with "c:\dmd2_phobos", etc. To change between DMD versions, simply double click the corresponding batch file. The location of the batch files does not matter. I hope this helps someone out there, it sure did make things easier for me when playing around with Tango and 2.0 :-)Very useful info. Thanks!
Jun 20 2007
"Anders Bergh" <anders1 gmail.com> schrieb (Wed, 20 Jun 2007 12:45:30 +0200):http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx This tool lets you create directory symlinks (NTFS junctions).Cool I didnt know Windows has "already" something that comes close to "real" symlinks. Henning -- GPG Public Key: http://keyserver.ganneff.de:11371/pks/lookup?op=get&search=0xDDD6D36D41911851 Fingerprint: 344F 4072 F038 BB9E B35D E6AB DDD6 D36D 4191 1851
Jun 20 2007
Henning Hasemann wrote:"Anders Bergh" <anders1 gmail.com> schrieb (Wed, 20 Jun 2007 12:45:30 +0200):They aren't. You need to be very careful with junctions. Firstly, if you delete a junction directly, you will delete the original folder as well! To make this worse, there is no way to tell from explorer if a folder is a junction or not. Anders' trick is still cool, but just be very careful with it. MS didn't write a tool to create junctions for a very good reason :) -- Danielhttp://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx This tool lets you create directory symlinks (NTFS junctions).Cool I didnt know Windows has "already" something that comes close to "real" symlinks. Henning
Jun 20 2007
Daniel Keep wrote:Henning Hasemann wrote:A solution to this would be to change the icon while making the junction. Anyone changed a folder icon before? Probably just an API call to set file attributes."Anders Bergh" <anders1 gmail.com> schrieb (Wed, 20 Jun 2007 12:45:30 +0200):They aren't. You need to be very careful with junctions. Firstly, if you delete a junction directly, you will delete the original folder as well! To make this worse, there is no way to tell from explorer if a folder is a junction or not.http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx This tool lets you create directory symlinks (NTFS junctions).Cool I didnt know Windows has "already" something that comes close to "real" symlinks. HenningAnders' trick is still cool, but just be very careful with it. MS didn't write a tool to create junctions for a very good reason :) -- Daniel
Jun 20 2007
Don Clugston wrote:Daniel Keep wrote:Back when I used Windows I used this shell extension which allows you to manage links and junctions from explorer, and it changes the icons. Very handy! -TomasHenning Hasemann wrote:A solution to this would be to change the icon while making the junction. Anyone changed a folder icon before? Probably just an API call to set file attributes."Anders Bergh" <anders1 gmail.com> schrieb (Wed, 20 Jun 2007 12:45:30 +0200):They aren't. You need to be very careful with junctions. Firstly, if you delete a junction directly, you will delete the original folder as well! To make this worse, there is no way to tell from explorer if a folder is a junction or not.http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx This tool lets you create directory symlinks (NTFS junctions).Cool I didnt know Windows has "already" something that comes close to "real" symlinks. HenningAnders' trick is still cool, but just be very careful with it. MS didn't write a tool to create junctions for a very good reason :) -- Daniel
Jun 20 2007
Tomas Lindquist Olsen wrote:Don Clugston wrote:http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspxDaniel Keep wrote:Henning Hasemann wrote:"Anders Bergh" <anders1 gmail.com> schrieb (Wed, 20 Jun 2007 12:45:30 +0200):oups... http://www.paraesthesia.com/blog/comments.php?id=801_0_1_0_CBack when I used Windows I used this shell extension which allows you to manage links and junctions from explorer, and it changes the icons. Very handy! -TomasA solution to this would be to change the icon while making the junction. Anyone changed a folder icon before? Probably just an API call to set file attributes.They aren't. You need to be very careful with junctions. Firstly, if you delete a junction directly, you will delete the original folder as well! To make this worse, there is no way to tell from explorer if a folder is a junction or not.This tool lets you create directory symlinks (NTFS junctions).Cool I didnt know Windows has "already" something that comes close to "real" symlinks. HenningAnders' trick is still cool, but just be very careful with it. MS didn't write a tool to create junctions for a very good reason :) -- Daniel
Jun 20 2007
Tomas Lindquist Olsen wrote:Don Clugston wrote:For working with junction points (folders) and hard links (file) in Windows I recommend NTFS Link: http://sourceforge.net/projects/ntfslinkext It's an extension to file explorer with many features, like junction icon (green arrow), hard link icon (yellow arrow), deletion detection, explorer creation, unlink, link target viewing, etc. . -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#DDaniel Keep wrote:Back when I used Windows I used this shell extension which allows you to manage links and junctions from explorer, and it changes the icons. Very handy! -TomasHenning Hasemann wrote:A solution to this would be to change the icon while making the junction. Anyone changed a folder icon before? Probably just an API call to set file attributes."Anders Bergh" <anders1 gmail.com> schrieb (Wed, 20 Jun 2007 12:45:30 +0200):They aren't. You need to be very careful with junctions. Firstly, if you delete a junction directly, you will delete the original folder as well! To make this worse, there is no way to tell from explorer if a folder is a junction or not.http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx This tool lets you create directory symlinks (NTFS junctions).Cool I didnt know Windows has "already" something that comes close to "real" symlinks. HenningAnders' trick is still cool, but just be very careful with it. MS didn't write a tool to create junctions for a very good reason :) -- Daniel
Jun 21 2007
Don Clugston wrote:A solution to this would be to change the icon while making the junction. Anyone changed a folder icon before? Probably just an API call to set file attributes.IIRC: you need to create an attrib +hs file[1] called Desktop.ini with something like this in it: [.ShellClassInfo] IconFile=C:\Path\to\the.ico IconIndex=0 Then you need to make sure the folder itself is just +r. Then somehow get Explorer to flush the icon cache. -- Daniel [1] Also make sure you remove the archive attribute, since this seems to stuff it up.
Jun 20 2007
Anders Bergh wrote:Since there are now two D versions, I figured some of you might be interested in the trick I use on Windows to switch between compilers easily. I have DMD 1.016 (Phobos), DMD 1.014 (Tango) and DMD 2.000. Switching between versions is only two clicks away. Things you will need: 1. Windows 2000 or above. 2. NTFS file system. 3. http://www.microsoft.com/technet/sysinternals/FileAndDisk/Junction.mspx This tool lets you create directory symlinks (NTFS junctions). 1. Extract "junction.exe" into your PATH, I simply extracted it into C:\Windows. 2. Extract dmd 1.x into c:\dmd1_phobos. 3. Extract dmd 2.x into c:\dmd2_phobos. 4. Open notepad, copy/paste this into a new file, "dmd1_phobos.bat": echo off rem Deletes the current symlink and replaces it with a new one. junction -d c:\dmd junction c:\dmd c:\dmd1_phobos 5. Do the same for your other DMD installations, just replace "c:\dmd1_phobos" with "c:\dmd2_phobos", etc. To change between DMD versions, simply double click the corresponding batch file. The location of the batch files does not matter. I hope this helps someone out there, it sure did make things easier for me when playing around with Tango and 2.0 :-)Great! But is it necessary to delete the old symlink? It seems to work fine if you don't. Then, the first time after you run one of your batch files, you can go into explorer and give the 'c:\dmd' folder a funny icon, or set its hidden attribute. This greatly reduces the chance of inadvertently deleting it, and creating havoc, as Daniel described.
Jun 21 2007
On 6/21/07, Don Clugston <dac nospam.com.au> wrote:Great! But is it necessary to delete the old symlink? It seems to work fine if you don't. Then, the first time after you run one of your batch files, you can go into explorer and give the 'c:\dmd' folder a funny icon, or set its hidden attribute. This greatly reduces the chance of inadvertently deleting it, and creating havoc, as Daniel described.I only deleted the old symlink just in case... if it works without it that's cool. Wouldn't setting an icon for c:\dmd affect c:\dmdX_XXX as well? As far as I know it just places a desktop.ini in the directory that points to an icon. -- Anders
Jun 21 2007