D Development Tools 0.7.0 Preview Release

eles eles at eles.com
Thu Jul 18 02:15:15 PDT 2013


On Tuesday, 9 July 2013 at 13:29:35 UTC, Bruno Medeiros wrote:
> On 08/07/2013 09:17, eles wrote:
>> On Friday, 5 July 2013 at 20:38:28 UTC, Bruno Medeiros wrote:

> I'll have to support that as a new feature:
> http://code.google.com/p/ddt/issues/detail?id=3
> Should be easy, just a few changes to:
> http://code.google.com/p/ddt/source/browse/org.dsource.ddt.ide.core.tests/src-test/mmrnmhrm/core/launch/DMDInstallType_Test.java
> and
> http://code.google.com/p/ddt/source/browse/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/DMDInstallType.java

> detection. But yeah, seems the -v2 switch is outdated now, I'll 
> remove it from default response file.


Is this OK?:

diff --git 
a/org.dsource.ddt.ide.core.tests/src-test/mmrnmhrm/core/launch/DMDInstallType_Test.java 
b/org.dsource.ddt.ide.core.tests/src-test/mmrnmhrm/core/launch/DMDInstallType_Test.java
index 00b2f03..cb26584 100644
--- 
a/org.dsource.ddt.ide.core.tests/src-test/mmrnmhrm/core/launch/DMDInstallType_Test.java
+++ 
b/org.dsource.ddt.ide.core.tests/src-test/mmrnmhrm/core/launch/DMDInstallType_Test.java
@@ -44,8 +44,8 @@ public class DMDInstallType_Test extends 
BaseDeeTest {

                 assertTrue(libLocations.length == 2);
                 IPath compilerBasePath = 
compilerPath.removeLastSegments(3);
-               checkLibLocation(libLocations[0], 
compilerBasePath, "include/d/dmd/druntime/import");
-               checkLibLocation(libLocations[1], 
compilerBasePath, "include/d/dmd/phobos");
+               checkLibLocation2(libLocations[0], 
compilerBasePath, "include/d/dmd/druntime/import", 
"include/dmd/druntime/import");
+               checkLibLocation2(libLocations[1], 
compilerBasePath, "include/d/dmd/phobos", "include/dmd/phobos");
         }

         public static LibraryLocation[] 
getLibraryLocations(CommonInstallType dmdInstallType, Path 
compilerPath) {
@@ -59,5 +59,10 @@ public class DMDInstallType_Test extends 
BaseDeeTest {
                 IPath libraryPath = libLocation.getLibraryPath();
                 assertEqualArrays(libraryPath.segments(), 
compilerBasePath.append(string).segments());
         }
-
+
+       public static void checkLibLocation2(LibraryLocation 
libLocation, IPath compilerBasePath, String string1, String 
string2) {
+               IPath libraryPath = libLocation.getLibraryPath();
+               assertTrue(Arrays.equals(libraryPath.segments(), 
compilerBasePath.append(string1).segments()) || 
Arrays.equals(libraryPath.segments(), 
compilerBasePath.append(string2).segments()));
+
+       }
  }
diff --git 
a/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/DMDInstallType.java 
b/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/DMDInstallType.java
index d8cbcf3..4ec6133 100644
--- 
a/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/DMDInstallType.java
+++ 
b/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/DMDInstallType.java
@@ -56,6 +56,14 @@ public class DMDInstallType extends 
CommonInstallType {
                         addLibraryLocationFromPath(locs, env, 
installPath.append("include/d/dmd/phobos"));
                         return;
                 }
+               // Debian layout (#3)
+               path = 
installPath.append("include/dmd/druntime/import");
+               if(path.toFile().exists() && 
path.toFile().isDirectory()) {
+                       // Found a D2 DMD install with Unix style 
install
+                       addLibraryLocationFromPath(locs, env, 
path);
+                       addLibraryLocationFromPath(locs, env, 
installPath.append("include/dmd/phobos"));
+                       return;
+               }
                 // TODO: should we throw an error?
         }

diff --git 
a/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/GDCInstall.java 
b/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/GDCInstall.java
index 2d3570c..26d76d7 100644
--- 
a/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/GDCInstall.java
+++ 
b/org.dsource.ddt.ide.core/src/mmrnmhrm/core/launch/GDCInstall.java
@@ -11,7 +11,6 @@ public class GDCInstall extends 
CommonDeeInstall {
         @Override
         public String getDefaultBuildFileData() {
                 return
-                       "-v2\n" +
                         "-o$/DEEBUILDER.OUTPUTEXE\n" +
                         "$/DEEBUILDER.SRCLIBS.-I\n" +
                         "$/DEEBUILDER.SRCFOLDERS.-I\n" +


More information about the Digitalmars-d-ide mailing list