Skip to content

Commit

Permalink
Add support for Visual Studio 2019
Browse files Browse the repository at this point in the history
* Bump version to 1.2.1
* Changed chm build to look for hhc.exe in the install directory instead of %PATH%.
* chm and gpl.rtf copy is performed by pre-build events now instead of relying on the chm build to do it.
* Update .gitignore for VS 2019.
  • Loading branch information
kmunson committed Feb 23, 2019
1 parent 6181d7c commit c96551b
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $RECYCLE.BIN/
*.lnk

# CommentReflowerVSIX
*.cache
*.chm
*.log
*.opensdf
Expand All @@ -27,6 +28,7 @@ $RECYCLE.BIN/
*.VC.db
*.VC.VC.opendb
CommentReflower/gpl.rtf
.vs/
obj/
bin/
/Backup*/
Expand Down
6 changes: 6 additions & 0 deletions CommentReflower/CommentReflower.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup>
<PreBuildEvent>copy /Y "$(ProjectDir)..\CommentReflowerHelp\CommentReflowerHelp.chm"
if errorlevel 1 echo error: Failed to copy chm.
copy /Y "$(ProjectDir)..\gpl.rtf"
if errorlevel 1 echo error: Failed to copy license agreement.</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 1 addition & 1 deletion CommentReflower/CommentReflowerPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace CommentReflower
[PackageRegistration(UseManagedResourcesOnly = true)]
// This attribute is used to register the information needed to show this package
// in the Help/About dialog of Visual Studio.
[InstalledProductRegistration("#110", "#112", "1.2", IconResourceID = 400)]
[InstalledProductRegistration("#110", "#112", "1.2.1", IconResourceID = 400)]
// This attribute is needed to let the shell know that this package exposes some menus.
[ProvideMenuResource("Menus.ctmenu", 1)]
// Initialize the package when a text editor window is opened. This ensures that the visibility
Expand Down
43 changes: 21 additions & 22 deletions CommentReflower/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="df158482-14ea-4165-8977-6a57ececffe7" Version="1.2" Language="en-US" Publisher="Kristofel Munson" />
<DisplayName>Comment Reflower</DisplayName>
<Description>VSIX version of Comment Reflower.</Description>
<MoreInfo>https://github.com/kmunson/CommentReflowerVSIX/</MoreInfo>
<License>gpl.rtf</License>
<Icon>Resources\Package.ico</Icon>
<PreviewImage>Resources\Package.ico</PreviewImage>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0, 15.0]" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
<Dependency Id="Microsoft.VisualStudio.MPF.11.0" DisplayName="Visual Studio MPF 11.0" d:Source="Installed" Version="11.0" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0.26208.0,16.0)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Metadata>
<Identity Id="df158482-14ea-4165-8977-6a57ececffe7" Version="1.2.1" Language="en-US" Publisher="Kristofel Munson" />
<DisplayName>Comment Reflower</DisplayName>
<Description>VSIX version of Comment Reflower.</Description>
<MoreInfo>https://github.com/kmunson/CommentReflowerVSIX/</MoreInfo>
<License>gpl.rtf</License>
<Icon>Resources\Package.ico</Icon>
<PreviewImage>Resources\Package.ico</PreviewImage>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0, 17.0)" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
</Prerequisites>
</PackageManifest>
19 changes: 11 additions & 8 deletions CommentReflowerHelp/build.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
copy /Y ..\gpl.rtf ..\CommentReflower
if errorlevel 1 exit /B 1
rem Check for existence first due to the reversed error output.
if not exist "%ProgramFiles(x86)%\HTML Help Workshop\hhc.exe" (
echo HTML Help Workshop is not installed. https://www.microsoft.com/en-us/download/details.aspx?id=21138
exit /B 1
)

rem hhc returns 0 on failure and 1 on success
hhc %1.hhp
if not errorlevel 1 exit /B 1

copy /Y %1.chm ..\CommentReflower
if errorlevel 1 exit /B 1
rem hhc returns 0 on failure and 1 on success.
"%ProgramFiles(x86)%\HTML Help Workshop\hhc.exe" %1.hhp
if not errorlevel 1 (
echo Failed to compile help.
exit /B 1
)

0 comments on commit c96551b

Please sign in to comment.