Skip to content

Commit 8ec741e

Browse files
author
Omar Tawfik
committed
Fix localization by producing core + resources packages
1 parent 76c82a0 commit 8ec741e

File tree

19 files changed

+196
-76
lines changed

19 files changed

+196
-76
lines changed

setup/FSharp.SDK/FSharp.SDK.wixproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
<Import Project="$(SetupRootFolder)\FSharp.Setup.props" />
1111

1212
<PropertyGroup>
13-
<OutputName>Microsoft.FSharp.SDK</OutputName>
13+
<OutputName Condition="'$(IsLangPack)' == 'false'">Microsoft.FSharp.SDK.Core</OutputName>
14+
<OutputName Condition="'$(IsLangPack)' == 'true'">Microsoft.FSharp.SDK.Resources.$(LocaleCode)</OutputName>
1415
<ProjectGuid>da0da41f-0e00-4598-8eee-b29d31b0ca04</ProjectGuid>
1516
<OutputType>Package</OutputType>
1617
<Media>net</Media>
@@ -74,6 +75,6 @@
7475
<MsiPath Include="$(OutDir)$(OutputName).msi" />
7576
</ItemGroup>
7677

77-
<Copy SourceFiles="@(MsiPath)" DestinationFiles="@(MsiPath->'$(SetupRootFolder)\..\$(Configuration)\msi\%(Filename).$(LocaleCode)%(Extension)')" />
78+
<Copy SourceFiles="@(MsiPath)" DestinationFiles="@(MsiPath->'$(SetupRootFolder)\..\$(Configuration)\msi\%(Filename)%(Extension)')" />
7879
</Target>
7980
</Project>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
use vs
2+
3+
package name=Microsoft.FSharp.Dependencies
4+
version=4.1
5+
6+
vs.dependencies
7+
vs.dependency id=Microsoft.FSharp.SDK.Core
8+
version=4.1
9+
type=Required
10+
11+
vs.dependency id=Microsoft.FSharp.SDK.Resources
12+
version=4.1
13+
type=Required
14+
15+
vs.dependency id=Microsoft.FSharp.VSIX.Full.Core
16+
version=4.1
17+
type=Required
18+
when=Microsoft.VisualStudio.Product.Enterprise,Microsoft.VisualStudio.Product.Professional,Microsoft.VisualStudio.Product.Community
19+
20+
vs.dependency id=Microsoft.FSharp.VSIX.Full.Resources
21+
version=4.1
22+
type=Required
23+
when=Microsoft.VisualStudio.Product.Enterprise,Microsoft.VisualStudio.Product.Professional,Microsoft.VisualStudio.Product.Community
24+
25+
vs.dependency id=Microsoft.FSharp.VSIX.Desktop.Core
26+
version=4.1
27+
type=Required
28+
when=Microsoft.VisualStudio.Product.DesktopExpress
29+
30+
vs.dependency id=Microsoft.FSharp.VSIX.Desktop.Resources
31+
version=4.1
32+
type=Required
33+
when=Microsoft.VisualStudio.Product.DesktopExpress
34+
35+
vs.dependency id=Microsoft.FSharp.VSIX.Web.Core
36+
version=4.1
37+
type=Required
38+
when=Microsoft.VisualStudio.Product.WebExpress
39+
40+
vs.dependency id=Microsoft.FSharp.VSIX.Web.Resources
41+
version=4.1
42+
type=Required
43+
when=Microsoft.VisualStudio.Product.WebExpress

setup/Swix/Microsoft.FSharp.Dependencies/Files.swr

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
use vs
22

3-
package name=Microsoft.FSharp.Dependencies.$(VSSku)
3+
package name=Microsoft.FSharp.Dependencies
44
version=4.1
5-
vs.package.language=neutral
6-
7-
vs.dependencies
8-
vs.dependency id=Microsoft.FSharp.VSIX.$(VSSku)
9-
version=4.1
10-
type=Required
11-
12-
vs.dependency id=Microsoft.FSharp.SDK
13-
version=4.1
14-
type=Required
155

166
folder "InstallDir:MSBuild\Microsoft\VisualStudio\v15.0\FSharp"
177
file "Microsoft.FSharp.targets" source="$(BinariesFolder)\setup\resources\Microsoft.FSharp.Shim.targets"

setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<BinariesFolder>$(FSharpSourcesRoot)\..\$(Configuration)</BinariesFolder>
1111
<PackagesFolder>$(FSharpSourcesRoot)\..\packages</PackagesFolder>
1212
<OutputPath>$(BinariesFolder)\insertion</OutputPath>
13-
<OutputName>Microsoft.FSharp.Dependencies.$(VSSku)</OutputName>
13+
<OutputName>Microsoft.FSharp.Dependencies</OutputName>
1414
<IntermediateOutputPath>$(MSBuildThisFileDirectory)obj</IntermediateOutputPath>
1515
</PropertyGroup>
1616

@@ -19,18 +19,14 @@
1919
<PropertyGroup>
2020
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder)</PackagePreprocessorDefinitions>
2121
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);PackagesFolder=$(PackagesFolder)</PackagePreprocessorDefinitions>
22-
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);VSSku=$(VSSku)</PackagePreprocessorDefinitions>
2322
</PropertyGroup>
2423

2524
<ItemGroup>
2625
<Package Include="Files.swr" />
26+
<Package Include="Dependencies.swr" />
2727
</ItemGroup>
2828

2929
<Target Name="GatherBinariesToBeSigned" AfterTargets="Localize">
3030
<!-- SWIX plugin adds the built vsix to signing automatically -->
3131
</Target>
32-
33-
<Target Name="CheckPropertiesArePassed" BeforeTargets="Build">
34-
<Error Condition="'$(VSSku)' == ''" Text="A 'VSSku' property must be passed to the project." />
35-
</Target>
3632
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
use vs
2+
3+
package name=Microsoft.FSharp.SDK.Core
4+
version=4.1
5+
vs.package.type=msi
6+
7+
vs.payloads
8+
vs.payload source="$(BinariesFolder)\msi\Microsoft.FSharp.SDK.Core.msi"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<FSharpSourcesRoot>..\..\..\src</FSharpSourcesRoot>
5+
<OutputArchitecture>neutral</OutputArchitecture>
6+
<OutputLocalized>false</OutputLocalized>
7+
<OutputType>manifest</OutputType>
8+
<OutputName>Microsoft.FSharp.SDK.Core</OutputName>
9+
<IsPackage>true</IsPackage>
10+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
11+
<BinariesFolder>$(FSharpSourcesRoot)\..\$(Configuration)</BinariesFolder>
12+
<OutputPath>$(BinariesFolder)\insertion</OutputPath>
13+
</PropertyGroup>
14+
15+
<Import Project="$(FSharpSourcesRoot)\Microbuild.Settings.targets" />
16+
17+
<PropertyGroup>
18+
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder)</PackagePreprocessorDefinitions>
19+
</PropertyGroup>
20+
21+
<ItemGroup>
22+
<Package Include="Files.swr" />
23+
</ItemGroup>
24+
25+
<Target Name="GatherBinariesToBeSigned" AfterTargets="Localize">
26+
<!-- MSI is already signed before wrapping it here -->
27+
</Target>
28+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
use vs
2+
3+
package name=Microsoft.FSharp.SDK.Resources
4+
version=4.1
5+
vs.package.type=msi
6+
vs.package.language=$(LocaleRegion)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use vs
22

3-
package name=Microsoft.FSharp.SDK
3+
package name=Microsoft.FSharp.SDK.Resources
44
version=4.1
55
vs.package.type=msi
66
vs.package.language=$(LocaleRegion)
77

88
vs.payloads
9-
vs.payload source="$(BinariesFolder)\msi\Microsoft.FSharp.SDK.$(LocaleCode).msi"
9+
vs.payload source="$(BinariesFolder)\msi\Microsoft.FSharp.SDK.Resources.$(LocaleCode).msi"

setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.swixproj renamed to setup/Swix/Microsoft.FSharp.SDK.Resources/Microsoft.FSharp.SDK.Resources.swixproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<OutputArchitecture>neutral</OutputArchitecture>
66
<OutputLocalized>false</OutputLocalized>
77
<OutputType>manifest</OutputType>
8-
<OutputName>Microsoft.FSharp.SDK.$(LocaleCode)</OutputName>
8+
<OutputName>Microsoft.FSharp.SDK.Resources.$(LocaleCode)</OutputName>
99
<IsPackage>true</IsPackage>
1010
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
1111
<BinariesFolder>$(FSharpSourcesRoot)\..\$(Configuration)</BinariesFolder>
@@ -22,7 +22,11 @@
2222
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);IsLangPack=$(IsLangPack)</PackagePreprocessorDefinitions>
2323
</PropertyGroup>
2424

25-
<ItemGroup>
25+
<ItemGroup Condition="'$(IsLangPack)' == 'false'">
26+
<Package Include="Empty.swr" />
27+
</ItemGroup>
28+
29+
<ItemGroup Condition="'$(IsLangPack)' == 'true'">
2630
<Package Include="Files.swr" />
2731
</ItemGroup>
2832

setup/Swix/Microsoft.FSharp.Vsix/Core.Files.swr renamed to setup/Swix/Microsoft.FSharp.Vsix.Core/Files.swr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
use vs
22

3-
package name=Microsoft.FSharp.VSIX.$(VSSku)
3+
package name=Microsoft.FSharp.VSIX.$(VSSku).Core
44
version=4.1
55
vs.package.type=vsix
6-
vs.package.language=$(LocaleRegion)
76
vs.package.vsixId=VisualFSharp
87

98
vs.payloads

0 commit comments

Comments
 (0)