Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -765,15 +765,15 @@ 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"
* the original semantic analysis engine is no longer installed, always using dparser now
* 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
Expand All @@ -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.
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#define VERSION_MINOR 3
#define VERSION_REVISION 43
#define VERSION_BETA -beta
#define VERSION_BUILD 1
#define VERSION_BUILD 2
5 changes: 5 additions & 0 deletions nsis/visuald.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions stdext/stdext.visualdproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<vtls>0</vtls>
<vgc>0</vgc>
<symdebug>0</symdebug>
<optimize>0</optimize>
<optimize>1</optimize>
<cpu>0</cpu>
<isX86_64>0</isX86_64>
<isLinux>0</isLinux>
Expand All @@ -136,7 +136,7 @@
<noboundscheck>0</noboundscheck>
<useSwitchError>0</useSwitchError>
<useUnitTests>0</useUnitTests>
<useInline>0</useInline>
<useInline>1</useInline>
<release>1</release>
<preservePaths>0</preservePaths>
<warnings>0</warnings>
Expand Down
35 changes: 29 additions & 6 deletions tools/pipedmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ int main(string[] argv)
string command;
string trackdir;
string trackfile;
string trackfilewr;

bool inject = false;
if (depsfile.length > 0)
Expand All @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions visuald/Templates/Projects/DTemplates.vsdir
Original file line number Diff line number Diff line change
@@ -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
33 changes: 22 additions & 11 deletions visuald/automation.d
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions visuald/chiernode.d
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 4 additions & 0 deletions visuald/config.d
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions visuald/dproject.d
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class Project : CVsHierarchy,
override void Dispose()
{
mConfigProvider = release(mConfigProvider);
mExtProject = release(mExtProject);
//mExtProject = release(mExtProject);
super.Dispose();
}

Expand Down Expand Up @@ -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;

Expand Down
38 changes: 19 additions & 19 deletions visuald/visuald.visualdproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
<useArrayBounds>0</useArrayBounds>
<noboundscheck>0</noboundscheck>
<useSwitchError>0</useSwitchError>
<useUnitTests>1</useUnitTests>
<useUnitTests>0</useUnitTests>
<useInline>0</useInline>
<release>0</release>
<preservePaths>0</preservePaths>
<warnings>0</warnings>
<infowarnings>1</infowarnings>
<checkProperty>0</checkProperty>
<genStackFrame>1</genStackFrame>
<genStackFrame>0</genStackFrame>
<pic>0</pic>
<cov>0</cov>
<nofloat>0</nofloat>
Expand Down Expand Up @@ -515,11 +515,11 @@
<File path="workaround.d" />
</Folder>
<Folder name="gc">
<File path="..\..\..\rainers\druntime\src\gc\gcdump.d" tool="None" />
<File path="..\..\..\rainers\druntime\src\gc\gcx.d" tool="None" />
<File path="..\..\..\rainers\druntime\src\rt\lifetime.d" tool="None" />
<File path="..\..\..\rainers\druntime\src\rt\sections_win32.d" tool="None" />
<File path="..\vdc\semantic.d" tool="None" />
<File tool="None" path="..\..\..\rainers\druntime\src\gc\gcdump.d" />
<File tool="None" path="..\..\..\rainers\druntime\src\gc\gcx.d" />
<File tool="None" path="..\..\..\rainers\druntime\src\rt\lifetime.d" />
<File tool="None" path="..\..\..\rainers\druntime\src\rt\sections_win32.d" />
<File tool="None" path="..\vdc\semantic.d" />
</Folder>
<Folder name="language">
<File path="colorizer.d" />
Expand Down Expand Up @@ -552,7 +552,7 @@
<File path="Resources\DSplashScreenIcon.bmp" />
<File path="Resources\faninout.ico" />
<File path="Resources\GroupByType.ico" />
<File path="Resources\pkgcmd.vsct" customcmd="set VSSDKInstall=%VSSDK140Install%
<File tool="Custom" path="Resources\pkgcmd.vsct" customcmd="set VSSDKInstall=%VSSDK140Install%
if &quot;%VSSDKInstall%&quot; == &quot;&quot; set VSSDKInstall=%VSSDK120Install%
if &quot;%VSSDKInstall%&quot; == &quot;&quot; set VSSDKInstall=%VSSDK110Install%
if &quot;%VSSDKInstall%&quot; == &quot;&quot; set VSSDKInstall=%VSSDK100Install%
Expand All @@ -566,17 +566,17 @@ goto reportError
:no_VSCT
echo Warning: VSCT.exe not found as %VSCT%
echo It is part of the VS2010-VS2013 SDK and is needed to compile $(InputPath)
:reportError" tool="Custom" outfile="$(InputDir)\$(InputName).cto" />
:reportError" outfile="$(InputDir)\$(InputName).cto" />
<File path="Resources\refresh.ico" />
<File path="Resources\RegExp.ico" />
<File path="Resources\removetrace.ico" />
<File path="Resources\resources.h" />
<File path="Resources\SearchFile.ico" />
<File path="Resources\SearchSymbol.ico" />
<File path="Resources\settrace.ico" />
<File path="visuald.rc" customcmd="call &quot;$(VSINSTALLDIR)\Common7\Tools\vsvars32.bat&quot;
<File tool="Custom" path="visuald.rc" dependencies="resources\pkgcmd.cto;resources\daboutlogo.ico;..\version;resources\dimagelist.bmp" customcmd="call &quot;$(VSINSTALLDIR)\Common7\Tools\vsvars32.bat&quot;
rem if errorlevel 1 goto reportError
rc /fo&quot;$(OutDir)\visuald.res&quot; $(InputPath)" tool="Custom" dependencies="resources\pkgcmd.cto;resources\daboutlogo.ico;..\version;resources\dimagelist.bmp" linkoutput="true" outfile="$(OutDir)\visuald.res" />
rc /fo&quot;$(OutDir)\visuald.res&quot; $(InputPath)" outfile="$(OutDir)\visuald.res" linkoutput="true" />
<File path="Resources\WholeWord.ico" />
</Folder>
<Folder name="Templates">
Expand All @@ -594,36 +594,36 @@ rc /fo&quot;$(OutDir)\visuald.res&quot; $(InputPath)" tool="Custom" dependencies
<File path="Templates\CodeSnippets\SnippetsIndex.xml" />
</Folder>
<Folder name="Items">
<File path="Templates\Items\empty.d" tool="None" />
<File path="Templates\Items\hello.d" tool="None" />
<File tool="None" path="Templates\Items\empty.d" />
<File tool="None" path="Templates\Items\hello.d" />
<File path="Templates\Items\items.vsdir" />
</Folder>
<Folder name="ProjectItems">
<Folder name="ConsoleApp">
<File path="Templates\ProjectItems\ConsoleApp\ConsoleApp.visualdproj" />
<File path="Templates\ProjectItems\ConsoleApp\ConsoleApp.vstemplate" />
<File path="Templates\ProjectItems\ConsoleApp\main.d" tool="None" />
<File tool="None" path="Templates\ProjectItems\ConsoleApp\main.d" />
</Folder>
<Folder name="ConsoleDMDGDC">
<File path="Templates\ProjectItems\ConsoleDMDGDC\ConsoleApp.visualdproj" />
<File path="Templates\ProjectItems\ConsoleDMDGDC\ConsoleApp.vstemplate" />
<File path="Templates\ProjectItems\ConsoleDMDGDC\main.d" tool="None" />
<File tool="None" path="Templates\ProjectItems\ConsoleDMDGDC\main.d" />
</Folder>
<Folder name="DynamicLib">
<File path="Templates\ProjectItems\DynamicLib\dll.def" tool="None" />
<File path="Templates\ProjectItems\DynamicLib\dllmain.d" tool="None" />
<File tool="None" path="Templates\ProjectItems\DynamicLib\dll.def" />
<File tool="None" path="Templates\ProjectItems\DynamicLib\dllmain.d" />
<File path="Templates\ProjectItems\DynamicLib\DynamicLib.visualdproj" />
<File path="Templates\ProjectItems\DynamicLib\DynamicLib.vstemplate" />
</Folder>
<Folder name="StaticLib">
<File path="Templates\ProjectItems\StaticLib\lib.d" tool="None" />
<File tool="None" path="Templates\ProjectItems\StaticLib\lib.d" />
<File path="Templates\ProjectItems\StaticLib\StaticLib.visualdproj" />
<File path="Templates\ProjectItems\StaticLib\StaticLib.vstemplate" />
</Folder>
<Folder name="WindowsApp">
<File path="Templates\ProjectItems\WindowsApp\WindowsApp.visualdproj" />
<File path="Templates\ProjectItems\WindowsApp\WindowsApp.vstemplate" />
<File path="Templates\ProjectItems\WindowsApp\winmain.d" tool="None" />
<File tool="None" path="Templates\ProjectItems\WindowsApp\winmain.d" />
</Folder>
</Folder>
<Folder name="Projects">
Expand Down