Skip to content

Commit

Permalink
Created the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
winseros committed Jan 23, 2021
1 parent 4ab361f commit 07680f1
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Installer/Installer.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "Installer.wixproj", "{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}.Debug|x64.ActiveCfg = Debug|x64
{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}.Debug|x64.Build.0 = Debug|x64
{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}.Debug|x86.ActiveCfg = Debug|x86
{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}.Debug|x86.Build.0 = Debug|x86
{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}.Release|x64.ActiveCfg = Release|x64
{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}.Release|x64.Build.0 = Release|x64
{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}.Release|x86.ActiveCfg = Release|x86
{2E869731-96E6-48ED-9FC2-B64FBA7DEF19}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {38681D21-A335-4520-B9C0-9C610A81EE98}
EndGlobalSection
EndGlobal
39 changes: 39 additions & 0 deletions Installer/Installer.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?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>2e869731-96e6-48ed-9fc2-b64fba7def19</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>WebpPreviewForWindowsExplorer-1.0.0</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup>
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>ArtifactsFolder=..\..\..\out\install\x64-Release\bin\</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixToolPath)WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</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' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</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>
-->
</Project>
59 changes: 59 additions & 0 deletions Installer/Product.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<?define UpgradeCode = "88EFD7FD-0668-4F64-83CB-D1167D2C1905" ?>
<?define ProductName = "Windows Webp Explorer Preview" ?>
<?define Manufacturer = "Nikita Kobzev" ?>
<?define DLL = "webpext64.dll" ?>
<!-- <?define ArtifactsFolder = "place_where_binaries_are\" ?> -->

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="$(var.ProductName)" Language="1033" Version="1.0.0.0"
Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">

<Package InstallerVersion="200" Compressed="yes" InstallScope="perUser" InstallPrivileges="limited"
Manufacturer="$(var.Manufacturer)"
Description="Windows Shell extension for preview of webp files in Windows Explorer"
Keywords="webp shell explorer preview" Platform="x64" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />

<Feature Id="ProductFeature" Title="Components" Level="1">
<ComponentGroupRef Id="CG_BC" />
</Feature>

<Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER"/>
<UI>
<UIRef Id="WixUI_InstallDir" />
<Publish Dialog="WelcomeDlg"
Control="Next"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
</UI>
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="LocalAppDataFolder">
<Directory Id="APPLICATIONFOLDER" Name="WebpPreviewForWindowsExplorer" />
</Directory>
</Directory>
</Fragment>

<Fragment>
<ComponentGroup Id="CG_BC" Directory="APPLICATIONFOLDER">
<Component Id="CMP_BC01" Guid="74A1B501-EEB2-4506-A37C-CFAFCD56FF84" Win64="yes">
<File Id="FILE_BC01" Name="$(var.DLL)"
Source="$(var.ArtifactsFolder)$(var.DLL)" SelfRegCost="1"/>
<RegistryValue Root="HKCU" Key="Software\$(var.Manufacturer)\$(var.ProductName)" Name="installed"
Type="integer" Value="1" KeyPath="yes" />
<RemoveFolder Id="CMP_REM01" Directory="APPLICATIONFOLDER" On="uninstall" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>

0 comments on commit 07680f1

Please sign in to comment.