diff --git a/CHANGES b/CHANGES
index ad7662f4..75e8ce31 100644
--- a/CHANGES
+++ b/CHANGES
@@ -765,7 +765,7 @@ unreleased Version 0.3.43
* replaced ancient pkgcmd.ctc with pkgcmd.vsct that's buildable with newer VS SDKs
* added icons to some commands
* renamed command "Add Folder" in project folder context menu to "Add Filter"
- * added command "Add Package" to project folder context menu
+ * added command "Add Folder" to project folder context menu that actually creates the folder on disk
* renaming a module in the project tree now reopens it at the previous caret location
* renaming a package in the project tree also renames the folder on disk if it is still empty
* debug info: added option "suitable for selected debug engine"
@@ -773,7 +773,7 @@ unreleased Version 0.3.43
* LDC: recent versions build object files into intermediate folder, wrong names passed to linker
with "separate compile and link"
* moved defaults for resource includes and dmd executable paths from installation to extension init
- * fixed spurious "not implemented" error in error list
+ * fixed spurious "not implemented" error in error list of VS 2015
* fix dark theme detection in VS 2015
* better semantic/colorizer support for versions LDC,CRuntime_Microsoft,CRuntime_DigitalMars and MinGW
* tweaked default path and library settings for DMD and LDC
@@ -783,3 +783,8 @@ unreleased Version 0.3.43
- scale some controls vertically if there is space
- added browse buttons to path settings
* search pane did not save its last state, only when switching between file and symbol search
+ * fixed calling linker to build with VC runtime of VS2015: legacy_stdio_definitions.lib missing
+ * bugzilla 12021: C++ projects (and others probably, too) might not load correctly in a solution
+ that also contains a Visual D project
+ * VS2015 linker updates logs and telemetry data files, confusing tracked linker dependencies.
+ Now ignoring files that are both read and written.
diff --git a/TODO b/TODO
index 737002d4..089bdea9 100644
--- a/TODO
+++ b/TODO
@@ -40,7 +40,7 @@ Project:
- custom command: quotes in dependencies not supported
- custom command: writes build batch to project folder
- custom command: no output given => creates ".build.cmd"
-- single file commands: track dependencies
+- single file commands: track dependencies, also outputs
- single file commands: multiple outputs
- VS2013: property pages don't follow resize
diff --git a/VERSION b/VERSION
index 28246440..803a3135 100644
--- a/VERSION
+++ b/VERSION
@@ -2,4 +2,4 @@
#define VERSION_MINOR 3
#define VERSION_REVISION 43
#define VERSION_BETA -beta
-#define VERSION_BUILD 1
+#define VERSION_BUILD 2
diff --git a/nsis/visuald.nsi b/nsis/visuald.nsi
index f245011e..a260bdb1 100644
--- a/nsis/visuald.nsi
+++ b/nsis/visuald.nsi
@@ -230,6 +230,11 @@ Section "Visual Studio package" SecPackage
${File} ..\visuald\Templates\ProjectItems\ConsoleDMDGDC\ ConsoleApp.vstemplate
${File} ..\visuald\Templates\ProjectItems\ConsoleDMDGDC\ ConsoleApp.visualdproj
+ ${SetOutPath} "$INSTDIR\Templates\ProjectItems\ConsoleDMDLDC"
+ ${File} ..\visuald\Templates\ProjectItems\ConsoleDMDLDC\ main.d
+ ${File} ..\visuald\Templates\ProjectItems\ConsoleDMDLDC\ ConsoleApp.vstemplate
+ ${File} ..\visuald\Templates\ProjectItems\ConsoleDMDLDC\ ConsoleApp.visualdproj
+
${SetOutPath} "$INSTDIR\Templates\ProjectItems\WindowsApp"
${File} ..\visuald\Templates\ProjectItems\WindowsApp\ winmain.d
${File} ..\visuald\Templates\ProjectItems\WindowsApp\ WindowsApp.vstemplate
diff --git a/stdext/stdext.visualdproj b/stdext/stdext.visualdproj
index 20ad8216..74384033 100644
--- a/stdext/stdext.visualdproj
+++ b/stdext/stdext.visualdproj
@@ -117,7 +117,7 @@
0
0
0
- 0
+ 1
0
0
0
@@ -136,7 +136,7 @@
0
0
0
- 0
+ 1
1
0
0
diff --git a/tools/pipedmd.d b/tools/pipedmd.d
index 67db25b0..56e549ef 100644
--- a/tools/pipedmd.d
+++ b/tools/pipedmd.d
@@ -98,6 +98,7 @@ int main(string[] argv)
string command;
string trackdir;
string trackfile;
+ string trackfilewr;
bool inject = false;
if (depsfile.length > 0)
@@ -118,7 +119,7 @@ int main(string[] argv)
if (trackdir != ".")
command ~= " /if " ~ quoteArg(trackdir);
trackfile = stripExtension(baseName(exe)) ~ ".read.*.tlog";
- string trackfilewr = stripExtension(baseName(exe)) ~ ".write.*.tlog";
+ trackfilewr = stripExtension(baseName(exe)) ~ ".write.*.tlog";
foreach(f; std.file.dirEntries(trackdir, std.file.SpanMode.shallow))
if (globMatch(baseName(f), trackfile) || globMatch(baseName(f), trackfilewr))
std.file.remove(f.name);
@@ -146,16 +147,38 @@ int main(string[] argv)
if (exitCode == 0 && trackfile.length > 0)
{
- ubyte[] buf;
+ // read read.*.tlog and remove all files found in write.*.log
+ string rdbuf;
+ string wrbuf;
foreach(f; std.file.dirEntries(trackdir, std.file.SpanMode.shallow))
- if (globMatch(baseName(f), trackfile))
+ {
+ bool rd = globMatch(baseName(f), trackfile);
+ bool wr = globMatch(baseName(f), trackfilewr);
+ if (rd || wr)
{
ubyte[] fbuf = cast(ubyte[])std.file.read(f.name);
+ string cbuf;
// strip BOM from all but the first file
- if (buf.length && fbuf.length > 1 && fbuf[0] == 0xFF && fbuf[1] == 0xFE)
- fbuf = fbuf[2..$];
- buf ~= fbuf;
+ if(fbuf.length > 1 && fbuf[0] == 0xFF && fbuf[1] == 0xFE)
+ cbuf = to!(string)(cast(wstring)(fbuf[2..$]));
+ else
+ cbuf = cast(string)fbuf;
+ if(rd)
+ rdbuf ~= cbuf;
+ else
+ wrbuf ~= cbuf;
}
+ }
+ string[] rdlines = splitLines(rdbuf, KeepTerminator.yes);
+ string[] wrlines = splitLines(wrbuf, KeepTerminator.yes);
+ bool[string] wrset;
+ foreach(w; wrlines)
+ wrset[w] = true;
+
+ string buf;
+ foreach(r; rdlines)
+ if(r !in wrset)
+ buf ~= r;
std.file.write(depsfile, buf);
}
diff --git a/visuald/Templates/Projects/DTemplates.vsdir b/visuald/Templates/Projects/DTemplates.vsdir
index 1fd09dd6..b5c4ae82 100644
--- a/visuald/Templates/Projects/DTemplates.vsdir
+++ b/visuald/Templates/Projects/DTemplates.vsdir
@@ -1,5 +1,6 @@
..\ProjectItems\ConsoleApp\ConsoleApp.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Console Application|30|A project for creating a command-line application|0|#1000|0|ConsoleApp
..\ProjectItems\ConsoleDMDGDC\ConsoleApp.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Console Application DMD/GDC|30|A project for creating a command-line application with DMD/GDC for x86/x64|0|#1000|0|ConsoleApp
+..\ProjectItems\ConsoleDMDLDC\ConsoleApp.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Console Application DMD/LDC|30|A project for creating a command-line application with DMD/GDC for x86/x64|0|#1000|0|ConsoleApp
..\ProjectItems\WindowsApp\WindowsApp.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Windows Application|30|A project for creating a Windows application|0|#1000|0|WindowsApp
..\ProjectItems\DynamicLib\DynamicLib.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Dynamic Library (DLL)|30|A project for creating a dynamic library|0|#1000|0|DynamicLib
..\ProjectItems\StaticLib\StaticLib.vstemplate|{002A2DE9-8BB6-484D-987F-7E4AD4084715}|Static Library|30|A project for creating a static library|0|#1000|0|StaticLib
diff --git a/visuald/automation.d b/visuald/automation.d
index 330d4115..c663bf5b 100644
--- a/visuald/automation.d
+++ b/visuald/automation.d
@@ -577,6 +577,24 @@ class ExtProjectItems : DisposingDispatchObject, dte.ProjectItems
return returnError(E_NOTIMPL);
}
+ override int Invoke(/* [in] */ in DISPID dispIdMember,
+ /* [in] */ in IID* riid,
+ /* [in] */ in LCID lcid,
+ /* [in] */ in WORD wFlags,
+ /* [out][in] */ DISPPARAMS *pDispParams,
+ /* [out] */ VARIANT *pVarResult,
+ /* [out] */ EXCEPINFO *pExcepInfo,
+ /* [out] */ UINT *puArgErr)
+ {
+ mixin(LogCallMix);
+ if (dispIdMember == -4)
+ {
+ pVarResult.vt = VT_UNKNOWN;
+ return _NewEnum(&pVarResult.punkVal);
+ }
+ return super.Invoke(dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
+ }
+
ExtProject mExtProject;
ExtProjectItems mParent;
CHierNode mNode;
@@ -601,12 +619,11 @@ class ExtProperties : DisposingDispatchObject, dte.Properties
{
this(ExtProject prj)
{
- mProject = addref(prj);
+ mProject = prj;
}
override void Dispose()
{
- mProject = release(mProject);
}
override HRESULT QueryInterface(in IID* riid, void** pvObject)
@@ -709,14 +726,13 @@ class ExtProperty(T) : DisposingDispatchObject, dte.Property
{
this(ExtProperties props, string name, T value)
{
- mProperties = addref(props);
+ mProperties = props;
mName = name;
mValue = value;
}
override void Dispose()
{
- mProperties = release(mProperties);
}
override HRESULT QueryInterface(in IID* riid, void** pvObject)
@@ -884,12 +900,7 @@ class ExtProject : ExtProjectItem, dte.Project
{
super(this, null, prj.GetProjectNode());
mProject = prj;
- mProperties = addref(newCom!ExtProperties(this));
- }
-
- override void Dispose()
- {
- mProperties = release(mProperties);
+ mProperties = newCom!ExtProperties(this);
}
override HRESULT QueryInterface(in IID* riid, void** pvObject)
@@ -1168,12 +1179,12 @@ class ExtProject : ExtProjectItem, dte.Project
/* [retval][out] */ dte.ProjectItem *ppParentProjectItem)
{
mixin(LogCallMix);
+ *ppParentProjectItem = null;
IVsSolution srpSolution = queryService!(IVsSolution);
if(!srpSolution)
return returnError(E_FAIL);
- *ppParentProjectItem = null;
int hr = E_UNEXPECTED;
IVsHierarchy pIVsHierarchy = mProject; // ->GetIVsHierarchy();
diff --git a/visuald/chiernode.d b/visuald/chiernode.d
index 0bd8f382..27c5df75 100644
--- a/visuald/chiernode.d
+++ b/visuald/chiernode.d
@@ -83,7 +83,7 @@ class CHierNode : DisposingDispatchObject
override void Dispose()
{
- m_extNode = release(m_extNode);
+ //m_extNode = release(m_extNode);
}
static void setContainerIsSorted(bool sort)
@@ -247,7 +247,7 @@ public:
{
pvar.vt = VT_DISPATCH;
if(!m_extNode)
- m_extNode = addref(newCom!ExtProjectItem(null, null, this));
+ m_extNode = /*addref*/(newCom!ExtProjectItem(null, null, this));
pvar.pdispVal = addref(m_extNode);
return S_OK;
}
diff --git a/visuald/config.d b/visuald/config.d
index 74eb3d16..09bf4d69 100644
--- a/visuald/config.d
+++ b/visuald/config.d
@@ -918,6 +918,10 @@ class ProjectOptions
string[] libs = tokenizeArgs(libfiles);
libs ~= "user32.lib";
libs ~= "kernel32.lib";
+ if(useMSVCRT())
+ if(std.file.exists(Package.GetGlobalOptions().VCInstallDir ~ "lib\\legacy_stdio_definitions.lib"))
+ libs ~= "legacy_stdio_definitions.lib";
+
cmd ~= plusList(lnkfiles ~ libs, ".lib", plus);
string[] lpaths = tokenizeArgs(libpaths);
if(useStdLibPath)
diff --git a/visuald/dproject.d b/visuald/dproject.d
index 053e356a..1a1acfd4 100644
--- a/visuald/dproject.d
+++ b/visuald/dproject.d
@@ -243,7 +243,7 @@ class Project : CVsHierarchy,
override void Dispose()
{
mConfigProvider = release(mConfigProvider);
- mExtProject = release(mExtProject);
+ //mExtProject = release(mExtProject);
super.Dispose();
}
@@ -700,7 +700,7 @@ class Project : CVsHierarchy,
case VSHPROPID_ExtObject:
var.vt = VT_DISPATCH;
if(!mExtProject)
- mExtProject = addref(newCom!ExtProject(this));
+ mExtProject = /*addref*/(newCom!ExtProject(this));
var.pdispVal = addref(mExtProject);
return S_OK;
diff --git a/visuald/visuald.visualdproj b/visuald/visuald.visualdproj
index 24d44769..c604feaf 100644
--- a/visuald/visuald.visualdproj
+++ b/visuald/visuald.visualdproj
@@ -33,14 +33,14 @@
0
0
0
- 1
+ 0
0
0
0
0
1
0
- 1
+ 0
0
0
0
@@ -515,11 +515,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -552,7 +552,7 @@
-
+:reportError" outfile="$(InputDir)\$(InputName).cto" />
@@ -574,9 +574,9 @@ echo It is part of the VS2010-VS2013 SDK and is needed to compile $(InputPath)
-
+rc /fo"$(OutDir)\visuald.res" $(InputPath)" outfile="$(OutDir)\visuald.res" linkoutput="true" />
@@ -594,36 +594,36 @@ rc /fo"$(OutDir)\visuald.res" $(InputPath)" tool="Custom" dependencies
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+