Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSIX NGen + VS Insertion Setup #1249

Merged
merged 4 commits into from
Jun 7, 2016
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions build-everything.proj
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

<ItemGroup Condition="'$(BUILD_NET40)'=='1'">
<ItemGroup Condition="'$(BUILD_NET40)'=='1' or '$(BUILD_ALL)'=='1'">
<ProjectsWithDefaultFramework Include="src/fsharp-library-build.proj" />
<ProjectsWithDefaultFramework Include="src/fsharp-compiler-build.proj" />
</ItemGroup>

<ItemGroup>
<ProjectsWithDefaultFramework Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_NET40_COREUNIT)'=='1'" />
<ProjectsWithDefaultFramework Include="src/fsharp-compiler-unittests-build.proj" Condition="'$(TEST_COMPILERUNIT)'=='1'" />
<ProjectsWithDefaultFramework Include="tests/fsharp/FSharp.Tests.fsproj" Condition="'$(TEST_FSHARP_SUITE)'=='1'" />
<ProjectsWithDefaultFramework Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_NET40_COREUNIT)'=='1' or '$(BUILD_ALL)'=='1'" />
<ProjectsWithDefaultFramework Include="src/fsharp-compiler-unittests-build.proj" Condition="'$(TEST_COMPILERUNIT)'=='1' or '$(BUILD_ALL)'=='1'" />
<ProjectsWithDefaultFramework Include="tests/fsharp/FSharp.Tests.fsproj" Condition="'$(TEST_FSHARP_SUITE)'=='1' or '$(BUILD_ALL)'=='1'" />
</ItemGroup>

<ItemGroup>
<ProjectsWithPortableFramework Include="src/fsharp-library-build.proj" Condition="'$(BUILD_PORTABLE)'=='1'"/>
<ProjectsWithPortableFramework Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_PORTABLE_COREUNIT)'=='1'" />
<ProjectsWithPortableFramework Include="src/fsharp-library-build.proj" Condition="'$(BUILD_PORTABLE)'=='1' or '$(BUILD_ALL)'=='1'"/>
<ProjectsWithPortableFramework Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_PORTABLE_COREUNIT)'=='1' or '$(BUILD_ALL)'=='1'" />
</ItemGroup>

<ItemGroup Condition="'$(BUILD_VS)'=='1'">
<ItemGroup Condition="'$(BUILD_VS)'=='1' or '$(BUILD_ALL)'=='1'">
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-src-build.proj" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-project-templates-build.proj" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-item-templates-build.proj" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-vsix-build.proj" />
</ItemGroup>

<ItemGroup>
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-unittests-build.proj" Condition="'$(TEST_VS)'=='1'" />
<ProjectsWithDefaultFramework Include="vsintegration/fsharp-vsintegration-unittests-build.proj" Condition="'$(TEST_VS)'=='1' or '$(BUILD_ALL)'=='1'" />
</ItemGroup>

<ItemGroup Condition="'$(BUILD_CORECLR)'=='1'">
<ItemGroup Condition="'$(BUILD_CORECLR)'=='1' or '$(BUILD_ALL)'=='1'">
<ProjectsWithCoreClr Include="src/fsharp-library-build.proj" />
<ProjectsWithCoreClr Include="src/fsharp-compiler-build.proj" />
</ItemGroup>

<ItemGroup>
<ProjectsWithCoreClr Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_CORECLR)'=='1'" />
<ProjectsWithCoreClr Include="src/fsharp-library-unittests-build.proj" Condition="'$(TEST_CORECLR)'=='1' or '$(BUILD_ALL)'=='1'" />
</ItemGroup>

<ItemGroup>
<SetupProjects Include="setup/fsharp-setup-build.proj" Condition="'$(BUILD_SETUP)'=='1'" />
<SetupProjects Include="setup/fsharp-setup-build.proj" Condition="'$(BUILD_SETUP)'=='1' or '$(BUILD_ALL)'=='1'" />
</ItemGroup>

<Target Name="Build">
2 changes: 1 addition & 1 deletion setup/FSharp.SDK/FSharp.SDK.wixproj
Original file line number Diff line number Diff line change
@@ -68,6 +68,6 @@
<MsiPath Include="$(OutDir)$(OutputName).msi" />
</ItemGroup>

<Copy SourceFiles="@(MsiPath)" DestinationFiles="@(MsiPath->'$(SetupRootFolder)\..\$(Configuration)\insertion\$(Lang)\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(MsiPath)" DestinationFiles="@(MsiPath->'$(SetupRootFolder)\..\$(Configuration)\insertion\msi\$(Lang)\%(Filename)%(Extension)')" />
</Target>
</Project>
21 changes: 21 additions & 0 deletions setup/Insertion/FSharp.SDK/FSharp.SDK.swixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSharpSourcesRoot>..\..\..\src</FSharpSourcesRoot>
<OutputArchitecture>neutral</OutputArchitecture>
<OutputLocalized>false</OutputLocalized>
<OutputType>manifest</OutputType>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\insertion\json</OutputPath>
</PropertyGroup>

<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />

<PropertyGroup>
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);InsertionFolder=$(FSharpSourcesRoot)\..\$(Configuration)\insertion</PackagePreprocessorDefinitions>
</PropertyGroup>

<ItemGroup>
<Package Include="FSharp.SDK.swr" />
</ItemGroup>
</Project>
15 changes: 15 additions & 0 deletions setup/Insertion/FSharp.SDK/FSharp.SDK.swr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use vs

package name=Microsoft.FSharp
version=4.1
vs.package.type=msi
vs.package.chip=neutral
vs.package.language=neutral

vs.localizedResources
vs.localizedResource language=en-us
title="Visual F# Tools"
description="Deploy Visual F# Tools templates to Visual Studio"

vs.payloads
vs.payload source=$(InsertionFolder)\msi\ENU\FSharp.SDK.msi
16 changes: 16 additions & 0 deletions setup/Insertion/Insertion.vsmanproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSharpSourcesRoot>..\..\src</FSharpSourcesRoot>
<FinalizeManifest>true</FinalizeManifest>
<FinalizeSkipLayout>true</FinalizeSkipLayout>
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\insertion\json</OutputPath>
</PropertyGroup>

<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />

<ItemGroup>
<MergeManifest Include="$(OutputPath)\VisualFSharpVSIX.json" />
<MergeManifest Include="$(OutputPath)\FSharp.SDK.json" />
</ItemGroup>
</Project>
20 changes: 20 additions & 0 deletions setup/Insertion/VisualFSharpVSIX/VisualFSharpVSIX.swixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSharpSourcesRoot>..\..\..\src</FSharpSourcesRoot>
<OutputArchitecture>neutral</OutputArchitecture>
<OutputLocalized>false</OutputLocalized>
<OutputType>manifest</OutputType>
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\insertion\json</OutputPath>
</PropertyGroup>

<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />

<PropertyGroup>
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);InsertionFolder=$(FSharpSourcesRoot)\..\$(Configuration)\insertion</PackagePreprocessorDefinitions>
</PropertyGroup>

<ItemGroup>
<Package Include="VisualFSharpVSIX.swr" />
</ItemGroup>
</Project>
16 changes: 16 additions & 0 deletions setup/Insertion/VisualFSharpVSIX/VisualFSharpVSIX.swr
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use vs

package name=Microsoft.FSharp
version=4.1
vs.package.chip=neutral
vs.package.language=en-us
vs.package.type=vsix
vs.package.vsixId=VisualFSharp

vs.localizedResources
vs.localizedResource language=en-us
title="Visual F# Tools"
description="Deploy Visual F# Tools templates to Visual Studio"

vs.payloads
vs.payload source=$(InsertionFolder)\vsix\VisualFSharpVsix.Professional.vsix
17 changes: 14 additions & 3 deletions setup/fsharp-setup-build.proj
Original file line number Diff line number Diff line change
@@ -16,19 +16,30 @@
<Import Project="FSharp.Setup.props" />

<Target Name="Build">
<MSBuild Projects="FSharp.Wix.Extensions\FSharp.Wix.Extensions.csproj" Targets="Build" />
<MSBuild Projects="FSharp.Wix.Extensions\FSharp.Wix.Extensions.csproj" Targets="Build" />

<!-- Wix targets files doesn't handle localization parameters correctly. Rebuilding all to clean obj files between languages -->
<MSBuild Projects="FSharp.SDK\FSharp.SDK.wixproj" Targets="Rebuild" Properties="Lang=%(SetupLanguages.Identity)"/>

<MSBuild Projects="Insertion\FSharp.SDK\FSharp.SDK.swixproj" Targets="Build" />
<MSBuild Projects="Insertion\VisualFSharpVSIX\VisualFSharpVSIX.swixproj" Targets="Build" />
<MSBuild Projects="Insertion\Insertion.vsmanproj" Targets="Build" />
</Target>

<Target Name="Rebuild">
<MSBuild Projects="FSharp.Wix.Extensions\FSharp.Wix.Extensions.csproj" Targets="Rebuild" />
<MSBuild Projects="FSharp.SDK\FSharp.SDK.wixproj" Targets="Rebuild" Properties="Lang=%(SetupLanguages.Identity)"/>
<MSBuild Projects="FSharp.SDK\FSharp.SDK.wixproj" Targets="Rebuild" Properties="Lang=%(SetupLanguages.Identity)"/>
<MSBuild Projects="Insertion\FSharp.SDK\FSharp.SDK.swixproj" Targets="Rebuild" />
<MSBuild Projects="Insertion\VisualFSharpVSIX\VisualFSharpVSIX.swixproj" Targets="Rebuild" />
<MSBuild Projects="Insertion\Insertion.vsmanproj" Targets="Rebuild" />
</Target>

<Target Name="Clean">
<MSBuild Projects="FSharp.Wix.Extensions\FSharp.Wix.Extensions.csproj" Targets="Clean" />
<MSBuild Projects="FSharp.SDK\FSharp.SDK.wixproj" Targets="Clean" Properties="Lang=%(SetupLanguages.Identity)"/>
<MSBuild Projects="FSharp.SDK\FSharp.SDK.wixproj" Targets="Clean" Properties="Lang=%(SetupLanguages.Identity)"/>
<MSBuild Projects="Insertion\FSharp.SDK\FSharp.SDK.swixproj" Targets="Clean" />
<MSBuild Projects="Insertion\VisualFSharpVSIX\VisualFSharpVSIX.swixproj" Targets="Clean" />
<MSBuild Projects="Insertion\Insertion.vsmanproj" Targets="Clean" />
</Target>

<Target Name="CopyLocalizationResources" BeforeTargets="Build">
Original file line number Diff line number Diff line change
@@ -5,10 +5,29 @@
<Identity Id="VisualFSharp" Version="15.4.1.0" Language="en-US" Publisher="Microsoft.VisualFSharpTools" />
<DisplayName>Visual F# Tools</DisplayName>
<Description xml:space="preserve">Deploy Visual F# Tools templates to Visual Studio</Description>
<ShortcutPath>..\CommonExtensions\Microsoft\FSharp</ShortcutPath>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.VSWinDesktopExpress" Version="[15.0]" />
</Installation>
<Installer>
<Actions>
<Action Type="Ngen" Path="FsiAnyCPU.exe" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does MicroBuild ensure that these are all signed before the vsix is made?

And is the resulting vsix signed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the VsixManifest not need to specify the optdata and sigdata files?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also drop licence.txt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KevinRansom
Will ensure vsix binaries are signed before zipping.
License/optdata/sigdata is attached in the vsix as well (before that PR).

<Action Type="Ngen" Path="Fsi.exe" />
<Action Type="Ngen" Path="FSharp.Compiler.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Interactive.Settings.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Server.Shared.dll" />
<Action Type="Ngen" Path="FSharp.Core.dll" />
<Action Type="Ngen" Path="FSharp.Editor.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.Base.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.Compiler.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.Base.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.FSharp.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.PropertyPages.dll" />
<Action Type="Ngen" Path="FSharp.VS.FSI.dll" />
</Actions>
</Installer>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6,)" />
</Dependencies>
Original file line number Diff line number Diff line change
@@ -5,10 +5,29 @@
<Identity Id="VisualFSharp" Version="15.4.1.0" Language="en-US" Publisher="Microsoft.VisualFSharpTools" />
<DisplayName>Visual F# Tools</DisplayName>
<Description xml:space="preserve">Deploy Visual F# Tools templates to Visual Studio</Description>
<ShortcutPath>..\CommonExtensions\Microsoft\FSharp</ShortcutPath>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[15.0]" />
</Installation>
<Installer>
<Actions>
<Action Type="Ngen" Path="FsiAnyCPU.exe" />
<Action Type="Ngen" Path="Fsi.exe" />
<Action Type="Ngen" Path="FSharp.Compiler.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Interactive.Settings.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Server.Shared.dll" />
<Action Type="Ngen" Path="FSharp.Core.dll" />
<Action Type="Ngen" Path="FSharp.Editor.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.Base.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.Compiler.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.Base.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.FSharp.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.PropertyPages.dll" />
<Action Type="Ngen" Path="FSharp.VS.FSI.dll" />
</Actions>
</Installer>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6,)" />
</Dependencies>
Original file line number Diff line number Diff line change
@@ -5,10 +5,29 @@
<Identity Id="VisualFSharp" Version="15.4.1.0" Language="en-US" Publisher="Microsoft.VisualFSharpTools" />
<DisplayName>Visual F# Tools</DisplayName>
<Description xml:space="preserve">Deploy Visual F# Tools templates to Visual Studio</Description>
<ShortcutPath>..\CommonExtensions\Microsoft\FSharp</ShortcutPath>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.VWDExpress" Version="[15.0]" />
</Installation>
<Installer>
<Actions>
<Action Type="Ngen" Path="FsiAnyCPU.exe" />
<Action Type="Ngen" Path="Fsi.exe" />
<Action Type="Ngen" Path="FSharp.Compiler.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Interactive.Settings.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Server.Shared.dll" />
<Action Type="Ngen" Path="FSharp.Core.dll" />
<Action Type="Ngen" Path="FSharp.Editor.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.Base.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.Compiler.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.Base.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.FSharp.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.PropertyPages.dll" />
<Action Type="Ngen" Path="FSharp.VS.FSI.dll" />
</Actions>
</Installer>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6,)" />
</Dependencies>
19 changes: 19 additions & 0 deletions vsintegration/VisualFSharpVsix/Source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -5,10 +5,29 @@
<Identity Id="VisualFSharp" Version="15.4.1.0" Language="en-US" Publisher="Microsoft.VisualFSharpTools" />
<DisplayName>Visual F# Tools</DisplayName>
<Description xml:space="preserve">Deploy Visual F# Tools templates to Visual Studio</Description>
<ShortcutPath>..\CommonExtensions\Microsoft\FSharp</ShortcutPath>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[15.0]" />
</Installation>
<Installer>
<Actions>
<Action Type="Ngen" Path="FsiAnyCPU.exe" />
<Action Type="Ngen" Path="Fsi.exe" />
<Action Type="Ngen" Path="FSharp.Compiler.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Interactive.Settings.dll" />
<Action Type="Ngen" Path="FSharp.Compiler.Server.Shared.dll" />
<Action Type="Ngen" Path="FSharp.Core.dll" />
<Action Type="Ngen" Path="FSharp.Editor.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.Base.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.Compiler.dll" />
<Action Type="Ngen" Path="FSharp.LanguageService.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.Base.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.FSharp.dll" />
<Action Type="Ngen" Path="FSharp.ProjectSystem.PropertyPages.dll" />
<Action Type="Ngen" Path="FSharp.VS.FSI.dll" />
</Actions>
</Installer>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6,)" />
</Dependencies>
2 changes: 1 addition & 1 deletion vsintegration/VisualFSharpVsix/VisualFSharpVsix.csproj
Original file line number Diff line number Diff line change
@@ -344,6 +344,6 @@
<ItemGroup>
<VsixPath Include="$(OutDir)$(AssemblyName).vsix" />
</ItemGroup>
<Copy SourceFiles="@(VsixPath)" DestinationFiles="@(VsixPath->'$(FSharpSourcesRoot)\..\$(Configuration)\insertion\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(VsixPath)" DestinationFiles="@(VsixPath->'$(FSharpSourcesRoot)\..\$(Configuration)\insertion\vsix\%(Filename)%(Extension)')" />
</Target>
</Project>