Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 9e85373

Browse files
authored
Merge pull request #57 from mahee96/master
Demo Plugin Cleanup Fixes #55
2 parents f0f71d6 + 100d8fd commit 9e85373

File tree

8 files changed

+87
-50
lines changed

8 files changed

+87
-50
lines changed

Demo Plugin/NppManagedPluginDemo.VS2015.sln

Lines changed: 0 additions & 27 deletions
This file was deleted.

Demo Plugin/NppManagedPluginDemo.sln

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25123.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NppManagedPluginDemo", "NppManagedPluginDemo\NppManagedPluginDemo.csproj", "{EB8FC3A3-93E8-457B-B281-FAFA5119611A}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{B976953C-50F6-4F18-A951-4338946511EE}.Debug|x64.ActiveCfg = Debug|x64
17+
{B976953C-50F6-4F18-A951-4338946511EE}.Debug|x64.Build.0 = Debug|x64
18+
{B976953C-50F6-4F18-A951-4338946511EE}.Debug|x86.ActiveCfg = Debug|x86
19+
{B976953C-50F6-4F18-A951-4338946511EE}.Debug|x86.Build.0 = Debug|x86
20+
{B976953C-50F6-4F18-A951-4338946511EE}.Release|x64.ActiveCfg = Release|x64
21+
{B976953C-50F6-4F18-A951-4338946511EE}.Release|x64.Build.0 = Release|x64
22+
{B976953C-50F6-4F18-A951-4338946511EE}.Release|x86.ActiveCfg = Release|x86
23+
{B976953C-50F6-4F18-A951-4338946511EE}.Release|x86.Build.0 = Release|x86
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal

Demo Plugin/NppManagedPluginDemo/NppManagedPluginDemo.VS2015.csproj renamed to Demo Plugin/NppManagedPluginDemo/NppManagedPluginDemo.csproj

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,67 @@
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
66
<ProductVersion>9.0.21022</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{EB8FC3A3-93E8-457B-B281-FAFA5119611A}</ProjectGuid>
8+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
99
<OutputType>Library</OutputType>
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>NppPluginNET</RootNamespace>
1212
<AssemblyName>Demo</AssemblyName>
13-
<StartupObject>
14-
</StartupObject>
15-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
16-
<FileUpgradeFlags>
17-
</FileUpgradeFlags>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1814
<OldToolsVersion>3.5</OldToolsVersion>
19-
<UpgradeBackupLocation />
20-
<TargetFrameworkProfile />
2115
</PropertyGroup>
22-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
2317
<DebugSymbols>true</DebugSymbols>
24-
<DebugType>full</DebugType>
25-
<Optimize>false</Optimize>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
2620
<OutputPath>bin\Debug</OutputPath>
2721
<DefineConstants>DEBUG;TRACE</DefineConstants>
2822
<ErrorReport>prompt</ErrorReport>
2923
<WarningLevel>4</WarningLevel>
3024
<PlatformTarget>x86</PlatformTarget>
31-
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
32-
<Prefer32Bit>false</Prefer32Bit>
3325
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
3426
</PropertyGroup>
35-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
3628
<DebugType>none</DebugType>
3729
<Optimize>true</Optimize>
3830
<OutputPath>bin\Release</OutputPath>
39-
<DefineConstants>
40-
</DefineConstants>
4131
<ErrorReport>prompt</ErrorReport>
4232
<WarningLevel>4</WarningLevel>
4333
<FileAlignment>512</FileAlignment>
4434
<PlatformTarget>x86</PlatformTarget>
4535
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
46-
<Prefer32Bit>false</Prefer32Bit>
36+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
37+
</PropertyGroup>
38+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
39+
<DebugSymbols>true</DebugSymbols>
40+
<DebugType>full</DebugType>
41+
<Optimize>false</Optimize>
42+
<OutputPath>bin\Debug-x64</OutputPath>
43+
<DefineConstants>DEBUG;TRACE</DefineConstants>
44+
<ErrorReport>prompt</ErrorReport>
45+
<WarningLevel>4</WarningLevel>
46+
<PlatformTarget>x64</PlatformTarget>
47+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
48+
</PropertyGroup>
49+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
50+
<DebugType>none</DebugType>
51+
<Optimize>true</Optimize>
52+
<OutputPath>bin\Release-x64</OutputPath>
53+
<ErrorReport>prompt</ErrorReport>
54+
<WarningLevel>4</WarningLevel>
55+
<FileAlignment>512</FileAlignment>
56+
<PlatformTarget>x64</PlatformTarget>
57+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
58+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
59+
</PropertyGroup>
60+
<PropertyGroup>
61+
<!-- Default values for debugging so it start correct version of Notepad++
62+
$(ProgramW6432) and $(MSBuildProgramFiles32) points to the 64 and 32 bit "Program Files" directories -->
63+
<StartAction>Program</StartAction>
64+
<StartProgram Condition="'$(Platform)'=='x64'">$(ProgramW6432)\Notepad++\notepad++.exe</StartProgram>
65+
<StartProgram Condition="'$(Platform)'=='x86'">$(MSBuildProgramFiles32)\Notepad++\notepad++.exe</StartProgram>
4766
</PropertyGroup>
4867
<ItemGroup>
4968
<Compile Include="..\..\Visual Studio Project Template C#\PluginInfrastructure\DllExport\DllExportAttribute.cs">
Binary file not shown.

Demo Plugin/NppManagedPluginDemo/PluginInfrastructure/DllExport/NppPlugin.DllExport.targets

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
<Target Name="AfterBuild"
66
DependsOnTargets="GetFrameworkPaths"
77
>
8+
<PropertyGroup>
9+
<!-- LibToolPath is optional - it's needed to debug C++, but you can still debug the C# code without it
10+
If you don't have the C++ toolchain installed this is missing, but then you can't' debug C++ anyway -->
11+
<LibToolPath Condition="Exists('$(DevEnvDir)\..\..\VC\bin')">$(DevEnvDir)\..\..\VC\bin</LibToolPath>
12+
</PropertyGroup>
813
<DllExportTask Platform="$(Platform)"
914
PlatformTarget="$(PlatformTarget)"
1015
CpuType="$(CpuType)"
@@ -17,14 +22,25 @@
1722
ProjectDirectory="$(MSBuildProjectDirectory)"
1823
InputFileName="$(TargetPath)"
1924
FrameworkPath="$(TargetedFrameworkDir);$(TargetFrameworkDirectory)"
20-
LibToolPath="$(DevEnvDir)\..\..\VC\bin"
25+
LibToolPath="$(LibToolPath)"
2126
LibToolDllPath="$(DevEnvDir)"
2227
SdkPath="$(SDK40ToolsPath)"/>
2328

29+
<!-- $(MSBuildProgramFiles32) points to the 32 bit program files dir.
30+
On 32 bit windows usually C:\Program Files\
31+
On 64 bit windows usually C:\Program Files (x86)\
32+
$(ProgramW6432) points to the 64bit Program Files (on 32 bit windows it is blank) -->
33+
<MakeDir Directories="$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\" Condition="Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\') AND !Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\') AND '$(Platform)'=='x86'" />
2434
<Copy
25-
SourceFiles="$(TargetPath)"
26-
DestinationFolder="C:\Program Files (x86)\Notepad++\plugins\"
27-
Condition="Exists('C:\Program Files (x86)\Notepad++\plugins\')"
28-
ContinueOnError="false" />
35+
SourceFiles="$(TargetPath)"
36+
DestinationFolder="$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\"
37+
Condition="Exists('$(MSBuildProgramFiles32)\Notepad++\plugins\$(TargetName)\') AND '$(Platform)'=='x86'"
38+
ContinueOnError="false" />
39+
<MakeDir Directories="$(ProgramW6432)\Notepad++\plugins\$(TargetName)\" Condition="Exists('$(ProgramW6432)\Notepad++\plugins\') AND !Exists('$(ProgramW6432)\Notepad++\plugins\$(TargetName)\') AND '$(Platform)'=='x64'" />
40+
<Copy
41+
SourceFiles="$(TargetPath)"
42+
DestinationFolder="$(ProgramW6432)\Notepad++\plugins\$(TargetName)\"
43+
Condition="Exists('$(ProgramW6432)\Notepad++\plugins\$(TargetName)\') AND '$(Platform)'=='x64'"
44+
ContinueOnError="false" />
2945
</Target>
3046
</Project>

Visual Studio Project Template C#/$projectname$.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
67
<ProjectGuid>{$guid1$}</ProjectGuid>
78
<OutputType>Library</OutputType>
89
<AppDesignerFolder>Properties</AppDesignerFolder>

0 commit comments

Comments
 (0)