www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Does Visual D support wildcards in build events?

reply Jedi <Return Lucifer.com> writes:
I'm having to hard code names and this is causing problems when I 
move the projects since they refer to the wrong locations. 

just need the output exe as a special token that changes with the 
project type.
Feb 18 2021
next sibling parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
Hi,

On 18/02/2021 09:04, Jedi wrote:
 I'm having to hard code names and this is causing problems when I move
 the projects since they refer to the wrong locations. Basically the same

 a special token that changes with the project type.
 
If you are using the visualdproj projects, this might help: https://rainers.github.io/visuald/visuald/ProjectConfig.html When using the vcxproj, you have all the VC macros available. If this isn't what you mean or doesn't help, you will have to be more specific.
Feb 20 2021
parent reply Jedi <Return Lucifer.com> writes:
On Saturday, 20 February 2021 at 08:50:53 UTC, Rainer Schuetze 
wrote:
 Hi,

 On 18/02/2021 09:04, Jedi wrote:
 I'm having to hard code names and this is causing problems 
 when I move the projects since they refer to the wrong 

 supports. I mainly just need the output exe as a special token 
 that changes with the project type.
 
If you are using the visualdproj projects, this might help: https://rainers.github.io/visuald/visuald/ProjectConfig.html When using the vcxproj, you have all the VC macros available. If this isn't what you mean or doesn't help, you will have to be more specific.
So, they do work but they give releative paths. OUTDIR gives Win32/Debug. For reference, [You could add this to the docs/link] echo DMDINSTALLDIR - $(DMDINSTALLDIR) echo WINDOWSSDKDIR - $(WINDOWSSDKDIR) echo DEVENVDIR - $(DEVENVDIR) echo VSINSTALLDIR - $(VSINSTALLDIR) echo VISUALDINSTALLDIR - $(VISUALDINSTALLDIR) echo PLATFORMNAME - $(PLATFORMNAME) echo CONFIGURATIONNAME- $(CONFIGURATIONNAME) echo OUTDIR - $(OUTDIR) echo INTDIR - $(INTDIR) echo INPUTPATH - $(INPUTPATH) echo INPUTDIR - $(INPUTDIR) echo INPUTFILENAME - $(INPUTFILENAME) echo INPUTEXT - $(INPUTEXT) echo INPUTNAME - $(INPUTNAME) echo PROJECTPATH - $(PROJECTPATH) echo PROJECTDIR - $(PROJECTDIR) echo PROJECTFILENAME - $(PROJECTFILENAME) echo PROJECTEXT - $(PROJECTEXT) echo PROJECTNAME - $(PROJECTNAME) echo SOLUTIONPATH - $(SOLUTIONPATH) echo SOLUTIONDIR - $(SOLUTIONDIR) echo SOLUTIONFILENAME - $(SOLUTIONFILENAME) echo SOLUTIONEXT - $(SOLUTIONEXT) echo SOLUTIONNAME - $(SOLUTIONNAME) echo TARGETPATH - $(TARGETPATH) echo TARGETDIR - $(TARGETDIR) echo TARGETFILENAME - $(TARGETFILENAME) echo TARGETEXT - $(TARGETEXT) echo TARGETNAME - $(TARGETNAME) I'm having to build the path to the exe, maybe you could add one directly? "$(PROJECTDIR)\$(TARGETPATH)" Seems to be the path to the exe. Or just add ABSTARGET* or similar for the absolute target path. The reason it might be a good idea to add is 1. It's easy. 2. It's confusing to have to figure out what the right combination is(although with the echo's it helps but may not be as robust as it looks).
Feb 20 2021
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 20/02/2021 10:25, Jedi wrote:
 On Saturday, 20 February 2021 at 08:50:53 UTC, Rainer Schuetze wrote:
 Hi,

 On 18/02/2021 09:04, Jedi wrote:
 I'm having to hard code names and this is causing problems when I
 move the projects since they refer to the wrong locations. Basically

 output exe as a special token that changes with the project type.
If you are using the visualdproj projects, this might help: https://rainers.github.io/visuald/visuald/ProjectConfig.html When using the vcxproj, you have all the VC macros available. If this isn't what you mean or doesn't help, you will have to be more specific.
So, they do work but they give releative paths. OUTDIR gives Win32/Debug.
The macros just contain what's set in the respective project options. I think that's ok as a default as command line options usually work this way.
 
 For reference, [You could add this to the docs/link]
 
 echo DMDINSTALLDIR - $(DMDINSTALLDIR)
 echo WINDOWSSDKDIR - $(WINDOWSSDKDIR)
 echo DEVENVDIR - $(DEVENVDIR)
 echo VSINSTALLDIR - $(VSINSTALLDIR)
 echo VISUALDINSTALLDIR - $(VISUALDINSTALLDIR)
 echo PLATFORMNAME - $(PLATFORMNAME)
 echo CONFIGURATIONNAME- $(CONFIGURATIONNAME)
 echo OUTDIR - $(OUTDIR)
 echo INTDIR - $(INTDIR)
 echo INPUTPATH - $(INPUTPATH)
 echo INPUTDIR - $(INPUTDIR)
 echo INPUTFILENAME - $(INPUTFILENAME)
 echo INPUTEXT - $(INPUTEXT)
 echo INPUTNAME - $(INPUTNAME)
 echo PROJECTPATH - $(PROJECTPATH)
 echo PROJECTDIR - $(PROJECTDIR)
 echo PROJECTFILENAME - $(PROJECTFILENAME)
 echo PROJECTEXT - $(PROJECTEXT)
 echo PROJECTNAME - $(PROJECTNAME)
 echo SOLUTIONPATH - $(SOLUTIONPATH)
 echo SOLUTIONDIR - $(SOLUTIONDIR)
 echo SOLUTIONFILENAME - $(SOLUTIONFILENAME)
 echo SOLUTIONEXT - $(SOLUTIONEXT)
 echo SOLUTIONNAME - $(SOLUTIONNAME)
 echo TARGETPATH - $(TARGETPATH)
 echo TARGETDIR - $(TARGETDIR)
 echo TARGETFILENAME - $(TARGETFILENAME)
 echo TARGETEXT - $(TARGETEXT)
 echo TARGETNAME - $(TARGETNAME)
I was considering adding the list of macro variables as in VC that also shows the expansions, but never got to it. Maybe dumping to the output pane would be good enough.
 
 I'm having to build the path to the exe, maybe you could add one directly?
 
 "$(PROJECTDIR)\$(TARGETPATH)"
 
 Seems to be the path to the exe.
%CD%\$(TARGETPATH) should also work.
 
 Or just add ABSTARGET* or similar for the absolute target path. The
 reason it might be a good idea to add is 1. It's easy. 2. It's confusing
 to have to figure out what the right combination is(although with the
 echo's it helps but may not be as robust as it looks).
 
Both versions above don't work when the path in the project is already absolute, though. VC has e.g. $(OutDirFullPath). I'll consider adding something similar.
Feb 21 2021
prev sibling parent evawillms <evawillms183 gmail.com> writes:
On Thursday, 18 February 2021 at 08:04:48 UTC, Jedi wrote:
 I'm having to hard code names and this is causing problems when 
 I move the projects since they refer to the wrong locations. 

 just need the output exe as a special token that changes with 
 the project type.
One solution is to use relative file paths instead of absolute paths. With relative paths, you specify the file or directory location relative to the current working directory. This allows the [Run 3](https://run3online.pro) project to be moved without breaking the references. Most programming languages, including
Jan 09