Skip to content

Commit

Permalink
Upgrade WiX from v3 to v4, then add French translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxhy committed Aug 16, 2023
1 parent cb1181a commit 07ada74
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 139 deletions.
50 changes: 5 additions & 45 deletions KeyManager.Setup/KeyManager.Setup.wixproj
Original file line number Diff line number Diff line change
@@ -1,41 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>6d7024d4-f698-4c90-98fe-a3e609d7014f</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>KeyManager.Setup</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Project Sdk="WixToolset.Sdk/4.0.1">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixToolPath)WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KeyManager.Library.KeyStore.File.UI\KeyManager.Library.KeyStore.File.UI.csproj">
<Name>KeyManager.Library.KeyStore.File.UI</Name>
Expand Down Expand Up @@ -150,17 +119,8 @@
<Content Include="leosac.ico" />
<Content Include="leosac_key.ico" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' AND ('$(Configuration)' == 'Debug' OR '$(Configuration)' == 'Release')">
<Error Text="The WiX Toolset v3.11 build tools must be installed to build this project. To download the WiX Toolset, see https://wixtoolset.org/releases/v3.11/stable" />
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<PackageReference Include="WixToolset.Netfx.wixext" Version="4.0.1" />
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.1" />
</ItemGroup>
</Project>
16 changes: 16 additions & 0 deletions KeyManager.Setup/Product.en-us.wxl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">

<String Id="DowngradeError" Value="A newer version of [ProductName] is already installed." />
<String Id="DotNetRequiredError" Value="[ProductName] requires Microsoft .NET 7 Desktop." />
<String Id="LaunchApp" Value="Launch [ProductName] when setup exits." />
<String Id="ProductDescr" Value="The [ProductName] application" />
<String Id="Translations" Value="Translations" />
<String Id="TranslationsDescr" Value="Available application translations" />
<String Id="FrenchTranslation" Value="French Translation" />
<String Id="FrenchTranslationDescr" Value="The application French translation" />
<String Id="RFIDMiddleware" Value="LibLogicalAccess" />
<String Id="RFIDMiddlewareDescr" Value="The RFID/SmartCard middleware" />
<String Id="StartMenuShortcut" Value="Start Menu Shortcut" />
<String Id="DesktopShortcut" Value="Desktop Shortcut" />

</WixLocalization>
16 changes: 16 additions & 0 deletions KeyManager.Setup/Product.fr-fr.wxl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="fr-FR">

<String Id="DowngradeError" Value="Une version plus récente de [ProductName] est déjà installée." />
<String Id="DotNetRequiredError" Value="[ProductName] nécessite Microsoft .NET 7 Desktop." />
<String Id="LaunchApp" Value="Démarrer [ProductName] à la fin de l'installation." />
<String Id="ProductDescr" Value="L'application [ProductName]" />
<String Id="Translations" Value="Traductions" />
<String Id="TranslationsDescr" Value="Traductions disponibles pour l'application" />
<String Id="FrenchTranslation" Value="Langue Française" />
<String Id="FrenchTranslationDescr" Value="Les ressources françaises pour l'application" />
<String Id="RFIDMiddleware" Value="LibLogicalAccess" />
<String Id="RFIDMiddlewareDescr" Value="Le middleware RFID/SmartCard" />
<String Id="StartMenuShortcut" Value="Raccourci dans le menu démarrer" />
<String Id="DesktopShortcut" Value="Raccourci sur le bureau" />

</WixLocalization>
Loading

0 comments on commit 07ada74

Please sign in to comment.