-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPublish.Dll.To.Notepad.targets
57 lines (55 loc) · 3.31 KB
/
Publish.Dll.To.Notepad.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!--
This file is set to be imported automatically by the application inside NWScript-Lexer.vcxproj XML file.
It is just to facilitate debugging. If you don't want to publish to notepad automatically, just edit the vcxproj file
and remove the Import reference in the end of file. -->
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="NotepadPlugin.DllExport.MSBuild.DllExportTask"
AssemblyFile="NotepadPlugin.DllExport.MSBuild.dll"/>
<Target Name="AfterBuild">
<PropertyGroup>
<!-- LibToolPath is optional - it's needed to debug C++, but you can still debug the C# code without it
If you don't have the C++ toolchain installed this is missing, but then you can't' debug C++ anyway -->
<LibToolPath Condition="Exists('$(DevEnvDir)\..\..\VC\bin')">$(DevEnvDir)\..\..\VC\bin</LibToolPath>
<CopyRetryCount>0</CopyRetryCount>
</PropertyGroup>
<!-- $(MSBuildProgramFiles32) points to the 32 bit program files dir.
On 32 bit windows usually C:\Program Files\
On 64 bit windows usually C:\Program Files (x86)\
$(ProgramW6432) points to the 64bit Program Files (on 32 bit windows it is blank) -->
<!-- 32bit section-->
<Message Text=" Creating directory -> $(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\"
Condition="Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\') AND !Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\')
AND '$(Platform)'=='x86'"
Importance="high" />
<MakeDir Directories="$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\"
Condition="Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\') AND !Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\')
AND '$(Platform)'=='x86'"
ContinueOnError="ErrorAndStop" />
<Message Text="Copying $(TargetFileName) -> $(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\"
Condition="'$(Platform)'=='x86'"
Importance="high" />
<Copy SourceFiles="$(TargetPath)"
DestinationFolder="$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\"
Condition="Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\') AND '$(Platform)'=='x86'"
Retries="0"
ContinueOnError="ErrorAndStop"/>
<!-- 64bit section-->
<Message Text=" Creating directory -> $(ProgramW6432)\Notepad++\plugins\$(TargetName)\"
Condition="Exists('$(ProgramW6432)\Notepad++\plugins\') AND !Exists('$(ProgramW6432)\Notepad++\plugins\$(TargetName)\')
AND '$(Platform)'=='x64' AND '$(ProgramW6432)'!=''"
Importance="high" />
<MakeDir Directories="$(ProgramW6432)\Notepad++\plugins\$(TargetName)\"
Condition="Exists('$(ProgramW6432)\Notepad++\plugins\') AND !Exists('$(ProgramW6432)\Notepad++\plugins\$(TargetName)\')
AND '$(Platform)'=='x64' AND '$(ProgramW6432)'!=''"
ContinueOnError="ErrorAndStop" />
<Message Text="Copying $(TargetFileName) -> $(ProgramW6432)\Notepad++\plugins\$(TargetName)\"
Condition="'$(Platform)'=='x64' AND '$(ProgramW6432)'!=''"
Importance="high" />
<Copy SourceFiles="$(TargetPath)"
DestinationFolder="$(ProgramW6432)\Notepad++\plugins\$(TargetName)\"
Condition="Exists('$(ProgramW6432)\Notepad++\plugins\$(TargetName)\') AND '$(Platform)'=='x64' AND '$(ProgramW6432)'!=''"
Retries="0"
ContinueOnError="ErrorAndStop"/>
</Target>
</Project>