diff options
author | Miguel Costa <miguel.costa@qt.io> | 2017-07-26 15:35:18 +0200 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2017-07-27 11:25:42 +0000 |
commit | 6026578b71cf8946c290611654075fab574eda0b (patch) | |
tree | d8a39ea65d0d0fe2e6613e255bde87989d11f767 | |
parent | ac3c444443e1828796abe8654405490159f62afc (diff) |
Fix package containing corrupted data
Post build modifications to the VSIX package are now configured in the
project. The post build produced a package that would fail on install
with the following error:
System.IO.FileFormatException: File contains corrupted data.
Task-number: QTVSADDINBUG-460
Change-Id: I36e8aac3dc2877b128ffe5a9cd112f6bf1605e73
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r-- | src/config/12.0/source.extension.vsixmanifest | 6 | ||||
-rw-r--r-- | src/config/14.0/source.extension.vsixmanifest | 6 | ||||
-rw-r--r-- | src/config/15.0/source.extension.vsixmanifest | 6 | ||||
-rw-r--r-- | src/config/qtvstools.afterbuild.targets | 25 | ||||
-rw-r--r-- | src/qtvstools/QtVsTools.csproj | 24 |
5 files changed, 39 insertions, 28 deletions
diff --git a/src/config/12.0/source.extension.vsixmanifest b/src/config/12.0/source.extension.vsixmanifest index e51eedc1..fdf569c0 100644 --- a/src/config/12.0/source.extension.vsixmanifest +++ b/src/config/12.0/source.extension.vsixmanifest @@ -42,6 +42,12 @@ <Icon>qt.ico</Icon> <PreviewImage>preview.png</PreviewImage> </Metadata> + <Installation InstalledByMsi="false"> + <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[12.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Premium" Version="[12.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Ultimate" Version="[12.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[12.0]" /> + </Installation> <Dependencies> <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" /> </Dependencies> diff --git a/src/config/14.0/source.extension.vsixmanifest b/src/config/14.0/source.extension.vsixmanifest index dd470203..141f2a33 100644 --- a/src/config/14.0/source.extension.vsixmanifest +++ b/src/config/14.0/source.extension.vsixmanifest @@ -42,6 +42,12 @@ <Icon>qt.ico</Icon> <PreviewImage>preview.png</PreviewImage> </Metadata> + <Installation InstalledByMsi="false"> + <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[14.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Premium" Version="[14.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Ultimate" Version="[14.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0]" /> + </Installation> <Dependencies> <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" /> </Dependencies> diff --git a/src/config/15.0/source.extension.vsixmanifest b/src/config/15.0/source.extension.vsixmanifest index ae5423a0..b47fa777 100644 --- a/src/config/15.0/source.extension.vsixmanifest +++ b/src/config/15.0/source.extension.vsixmanifest @@ -42,6 +42,12 @@ <Icon>qt.ico</Icon> <PreviewImage>preview.png</PreviewImage> </Metadata> + <Installation InstalledByMsi="false"> + <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[15.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Premium" Version="[15.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Ultimate" Version="[15.0]" /> + <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0]" /> + </Installation> <Dependencies> <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6,)" /> </Dependencies> diff --git a/src/config/qtvstools.afterbuild.targets b/src/config/qtvstools.afterbuild.targets index b75e2c8c..bbe6697e 100644 --- a/src/config/qtvstools.afterbuild.targets +++ b/src/config/qtvstools.afterbuild.targets @@ -2,32 +2,7 @@ <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="AfterBuild"> - <PropertyGroup> - <QrcEditor>$(SolutionDir)\qrceditor\bin\QrcEditor.exe</QrcEditor> - <QtArchiveGen>$(SolutionDir)\qtarchivegen\$(OutDir)\QtArchiveGen.exe</QtArchiveGen> - <QMakeFileReader>$(SolutionDir)\qmakefilereader\bin\QMakeFileReader.exe</QMakeFileReader> - <DestFolder>$(LOCALAPPDATA)\Microsoft\VisualStudio\$(VisualStudioVersion)Exp\Extensions\The Qt Company Ltd\Qt Visual Studio Tools\$(VsixVersion)\</DestFolder> - </PropertyGroup> - <Message Text="Running post build target for $(ProjectName)." Importance="high" /> - <Message Text="Set $(ProjectName) installation target to [$(VisualStudioVersion)]." Importance="high" /> - <Exec Command="$(QtArchiveGen) target=$(TargetDir)\$(TargetName).vsix version=[$(VisualStudioVersion)]" /> - <Message Text="Copy '$(QrcEditor)' to '$(DestFolder)'." Importance="high" /> - <Copy SourceFiles="$(QrcEditor)" DestinationFolder="$(DestFolder)" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" /> - <Message Text="Copy '$(QMakeFileReader)' to '$(DestFolder)'." Importance="high" /> - <Copy SourceFiles="$(QMakeFileReader)" DestinationFolder="$(DestFolder)" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" /> - <Message Text="Copy '$(QrcEditor)' into '$(TargetDir)\$(TargetName).vsix'." Importance="high" /> - <Exec Command="$(QtArchiveGen) source=$(QrcEditor) target=$(TargetDir)\$(TargetName).vsix" /> - <Message Text="Copy '$(QMakeFileReader)' into '$(TargetDir)\$(TargetName).vsix'." Importance="high" /> - <Exec Command="$(QtArchiveGen) source=$(QMakeFileReader) target=$(TargetDir)\$(TargetName).vsix" /> - - <ItemGroup> - <QtTmLanguage Include="$(SolutionDir)\qttmlanguage\**\*.*" /> - </ItemGroup> - <Message Text="Copy '@(QtTmLanguage)' to '$(DestFolder)\qttmlanguage'." Importance="high" /> - <Copy SourceFiles="@(QtTmLanguage)" DestinationFiles="@(QtTmLanguage->'$(DestFolder)\qttmlanguage\%(RecursiveDir)%(Filename)%(Extension)')" OverwriteReadOnlyFiles="true" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" /> - - <Message Text="Completed post build target for $(ProjectName)." Importance="high" /> </Target> </Project> diff --git a/src/qtvstools/QtVsTools.csproj b/src/qtvstools/QtVsTools.csproj index 9418c4a7..a5c8c89a 100644 --- a/src/qtvstools/QtVsTools.csproj +++ b/src/qtvstools/QtVsTools.csproj @@ -123,12 +123,30 @@ <CopyToOutputDirectory>Always</CopyToOutputDirectory> <IncludeInVSIX>true</IncludeInVSIX> </Content> - <Content Include="..\qttmlanguage\**\*"> + <None Include="..\config\$(VisualStudioVersion)\source.extension.vsixmanifest" /> + <None Include="packages.config" /> + </ItemGroup> + <PropertyGroup> + <QtTmLanguage>$(SolutionDir)\qttmlanguage</QtTmLanguage> + </PropertyGroup> + <ItemGroup> + <Content Include="$(QtTmLanguage)\**\*.*"> + <Link>QtTmLanguage\%(RecursiveDir)%(Filename)%(Extension)</Link> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + <IncludeInVSIX>true</IncludeInVSIX> + </Content> + </ItemGroup> + <ItemGroup> + <Content Include="..\qrceditor\bin\QrcEditor.exe"> + <Link>QrcEditor.exe</Link> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> <IncludeInVSIX>true</IncludeInVSIX> + </Content> + <Content Include="..\qmakefilereader\bin\QMakeFileReader.exe"> + <Link>QMakeFileReader.exe</Link> <CopyToOutputDirectory>Always</CopyToOutputDirectory> + <IncludeInVSIX>true</IncludeInVSIX> </Content> - <None Include="..\config\$(VisualStudioVersion)\source.extension.vsixmanifest" /> - <None Include="packages.config" /> </ItemGroup> <ItemGroup> <Content Include="..\packages\System.Data.SQLite.Core.1.0.102.0\build\net45\x64\SQLite.Interop.dll"> |