Skip to content

Commit

Permalink
Added installer
Browse files Browse the repository at this point in the history
  • Loading branch information
emoacht committed Dec 30, 2017
1 parent 8a3f808 commit a04b288
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 1 deletion.
50 changes: 50 additions & 0 deletions Source/Installer/Installer.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?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>053f50a8-e2c9-4f92-ba1b-b8f71603585f</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Wifinian.Installer</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
<SuppressIces>ICE69</SuppressIces>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<SuppressValidation>False</SuppressValidation>
<SuppressIces>ICE69</SuppressIces>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Wifinian\Wifinian.csproj">
<Name>Wifinian</Name>
<Project>{056ef371-bf6b-42c3-82b7-a113cafa5718}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</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>
150 changes: 150 additions & 0 deletions Source/Installer/Product.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Wifinian" Manufacturer="emoacht" Version="2.0.0"
Language="1033" Codepage="1252" UpgradeCode="{A8357D71-600C-462A-AEEE-BF1B988DD2E4}">
<Package Id="*" InstallerVersion="500" Compressed="yes"
InstallScope="perMachine" InstallPrivileges="elevated"
Description="Installer for [ProductName]" />

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

<Media Id="1" Cabinet="source.cab" EmbedCab="yes"/>

<Property Id="VEM" Value="yes"/>

<Directory Id="TARGETDIR" Name="SourceDir">
<!-- Program Files -->
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="$(var.Wifinian.ProjectName)"/>
</Directory>

<!-- Program Menu -->
<Directory Id="ProgramMenuFolder"/>

<!-- Local AppData -->
<Directory Id="LocalAppDataFolder">
<Directory Id="ApplicationLocalAppDataFolder" Name="$(var.Wifinian.ProjectName)"/>
</Directory>
</Directory>

<DirectoryRef Id="INSTALLDIR">
<Component Id="MainExecutable" Guid="{55649EB0-5DB2-4466-A042-969BF97139B0}">
<File Id="MainExecutableEXE"
Source="$(var.Wifinian.TargetPath)" Name="$(var.Wifinian.TargetFileName)" KeyPath="yes"/>
</Component>

<Component Id="MainExecutableConfig" Guid="{BFF1C1AF-F676-4DA8-A126-3341FAFF7F62}">
<File Id="MainExecutableCONFIG"
Source="$(var.Wifinian.TargetDir)" Name="$(var.Wifinian.TargetName).exe.config" KeyPath="yes"/>
</Component>

<Component Id="InteractionsLibrary" Guid="{1E37729C-6161-453D-81BC-1BE333FCA178}">
<File Id="InteractionsDLL"
Source="$(var.Wifinian.TargetDir)" Name="Microsoft.Expression.Interactions.dll" KeyPath="yes"/>
</Component>

<Component Id="InteractivityLibrary" Guid="{3AD5129A-E3D9-4A46-B2E1-94A70543AFE1}">
<File Id="InteractivityDLL"
Source="$(var.Wifinian.TargetDir)" Name="System.Windows.Interactivity.dll" KeyPath="yes"/>
</Component>

<Component Id="RxLibrary1" Guid="{11FE0FBB-888D-407A-93E5-F881B293326E}">
<File Id="RxDLL1"
Source="$(var.Wifinian.TargetDir)" Name="System.Reactive.Core.dll" KeyPath="yes"/>
</Component>
<Component Id="RxLibrary2" Guid="{85EA74C1-1DE3-47D0-84DB-CB8475174BFD}">
<File Id="RxDLL2"
Source="$(var.Wifinian.TargetDir)" Name="System.Reactive.Interfaces.dll" KeyPath="yes"/>
</Component>
<Component Id="RxLibrary3" Guid="{0392631C-7877-47E4-AB9D-DB6D6F0D79B5}">
<File Id="RxDLL3"
Source="$(var.Wifinian.TargetDir)" Name="System.Reactive.Linq.dll" KeyPath="yes"/>
</Component>
<Component Id="RxLibrary4" Guid="{ED468260-8D34-4D9F-B18A-1A717E0587A5}">
<File Id="RxDLL4"
Source="$(var.Wifinian.TargetDir)" Name="System.Reactive.PlatformServices.dll" KeyPath="yes"/>
</Component>
<Component Id="RxLibrary5" Guid="{E4E4D6AA-FA11-41C7-BD7A-B0E875CCD32A}">
<File Id="RxDLL5"
Source="$(var.Wifinian.TargetDir)" Name="System.Reactive.Windows.Threading.dll" KeyPath="yes"/>
</Component>

<Component Id="RpLibrary1" Guid="{15E45C59-C490-40F9-BA1B-C36E6932132F}">
<File Id="RpDLL1"
Source="$(var.Wifinian.TargetDir)" Name="ReactiveProperty.dll" KeyPath="yes"/>
</Component>
<Component Id="RpLibrary2" Guid="{4EBEE85A-C063-43BF-B3C8-CE68787D5F63}">
<File Id="RpDLL2"
Source="$(var.Wifinian.TargetDir)" Name="ReactiveProperty.NET46.dll" KeyPath="yes"/>
</Component>

<Component Id="WifiLibrary" Guid="{50B8A962-E276-4DF8-8737-A1BE78B33153}">
<File Id="WifiDLL"
Source="$(var.Wifinian.TargetDir)" Name="ManagedNativeWifi.dll" KeyPath="yes"/>
</Component>

<Component Id="FrameLibrary" Guid="{E7F84162-087A-4A1F-BB6A-01FE78A29C8E}">
<File Id="FrameDLL"
Source="$(var.Wifinian.TargetDir)" Name="ScreenFrame.dll" KeyPath="yes"/>
</Component>

<Component Id="VisualManifest" Guid="{4DD773D0-D642-40DC-9576-D535D0AF89EB}">
<Condition><![CDATA[VEM = "yes"]]></Condition>
<File Id="VisualManifestXML"
Source="$(var.Wifinian.TargetDir)" Name="$(var.Wifinian.TargetName).VisualElementsManifest.xml" KeyPath="yes"/>
</Component>
</DirectoryRef>

<!-- Shortcut in Program Menu -->
<DirectoryRef Id="ProgramMenuFolder">
<Component Id="ApplicationShortcut" Guid="{CA94F3D2-1BB8-4581-9B37-BA3C31049DC4}">
<Shortcut Id="ApplicationProgramMenuShortcut" Name="$(var.Wifinian.ProjectName)"
Target="[#MainExecutableEXE]" WorkingDirectory="INSTALLDIR"
Icon="AppIcon.exe" IconIndex="0">
<ShortcutProperty Key="System.AppUserModel.ID" Value="[ProductName]"/>
</Shortcut>
<RegistryValue Root="HKCU" Key="Software\[ProductName]"
Name="ApplicationShortcut" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>

<!-- Working Folder in Local AppData -->
<DirectoryRef Id="ApplicationLocalAppDataFolder">
<Component Id="ApplicationWorkingFolder" Guid="{64995AFD-6A46-47D7-8FFE-67C6376F0FF5}">
<RemoveFile Id="ApplicationLocalAppDataFiles" Directory="ApplicationLocalAppDataFolder" Name="*.*" On="uninstall"/>
<RemoveFolder Id="ApplicationLocalAppDataFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[ProductName]"
Name="ApplicationWorkingFolder" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>

<Icon Id="AppIcon.exe" SourceFile="$(var.Wifinian.TargetPath)"/>
<Property Id="ARPPRODUCTICON" Value="AppIcon.exe"/>

<Feature Id="ProductFeature" Level="1">
<ComponentRef Id="MainExecutable"/>
<ComponentRef Id="MainExecutableConfig"/>
<ComponentRef Id="InteractionsLibrary"/>
<ComponentRef Id="InteractivityLibrary"/>
<ComponentRef Id="RxLibrary1"/>
<ComponentRef Id="RxLibrary2"/>
<ComponentRef Id="RxLibrary3"/>
<ComponentRef Id="RxLibrary4"/>
<ComponentRef Id="RxLibrary5"/>
<ComponentRef Id="RpLibrary1"/>
<ComponentRef Id="RpLibrary2"/>
<ComponentRef Id="WifiLibrary"/>
<ComponentRef Id="FrameLibrary"/>
<ComponentRef Id="VisualManifest"/>
<ComponentRef Id="ApplicationShortcut"/>
<ComponentRef Id="ApplicationWorkingFolder"/>
</Feature>

<!-- Clean Current User Run -->
<CustomAction Id="CleanCurrentUserRun" Directory="TARGETDIR" Execute="immediate" Return="ignore"
ExeCommand="[SystemFolder]reg.exe delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v [ProductName] /f"/>
<InstallExecuteSequence>
<Custom Action="CleanCurrentUserRun" After="InstallFinalize">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
</InstallExecuteSequence>
</Product>
</Wix>
28 changes: 27 additions & 1 deletion Source/Wifinian.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2003
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wifinian", "Wifinian\Wifinian.csproj", "{056EF371-BF6B-42C3-82B7-A113CAFA5718}"
EndProject
Expand All @@ -11,28 +11,54 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactivePropertyTest", "Rea
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconImage", "IconImage\IconImage.csproj", "{566D20ED-A863-43BA-BC28-D21E46FEC661}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "Installer\Installer.wixproj", "{053F50A8-E2C9-4F92-BA1B-B8F71603585F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{056EF371-BF6B-42C3-82B7-A113CAFA5718}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{056EF371-BF6B-42C3-82B7-A113CAFA5718}.Debug|Any CPU.Build.0 = Debug|Any CPU
{056EF371-BF6B-42C3-82B7-A113CAFA5718}.Debug|x86.ActiveCfg = Debug|Any CPU
{056EF371-BF6B-42C3-82B7-A113CAFA5718}.Debug|x86.Build.0 = Debug|Any CPU
{056EF371-BF6B-42C3-82B7-A113CAFA5718}.Release|Any CPU.ActiveCfg = Release|Any CPU
{056EF371-BF6B-42C3-82B7-A113CAFA5718}.Release|Any CPU.Build.0 = Release|Any CPU
{056EF371-BF6B-42C3-82B7-A113CAFA5718}.Release|x86.ActiveCfg = Release|Any CPU
{056EF371-BF6B-42C3-82B7-A113CAFA5718}.Release|x86.Build.0 = Release|Any CPU
{BCE9DA19-3C0D-4F17-8927-1320CF13CF2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCE9DA19-3C0D-4F17-8927-1320CF13CF2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCE9DA19-3C0D-4F17-8927-1320CF13CF2F}.Debug|x86.ActiveCfg = Debug|Any CPU
{BCE9DA19-3C0D-4F17-8927-1320CF13CF2F}.Debug|x86.Build.0 = Debug|Any CPU
{BCE9DA19-3C0D-4F17-8927-1320CF13CF2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCE9DA19-3C0D-4F17-8927-1320CF13CF2F}.Release|Any CPU.Build.0 = Release|Any CPU
{BCE9DA19-3C0D-4F17-8927-1320CF13CF2F}.Release|x86.ActiveCfg = Release|Any CPU
{BCE9DA19-3C0D-4F17-8927-1320CF13CF2F}.Release|x86.Build.0 = Release|Any CPU
{2010B70C-7FEF-4C71-9E96-E09860401833}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2010B70C-7FEF-4C71-9E96-E09860401833}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2010B70C-7FEF-4C71-9E96-E09860401833}.Debug|x86.ActiveCfg = Debug|Any CPU
{2010B70C-7FEF-4C71-9E96-E09860401833}.Debug|x86.Build.0 = Debug|Any CPU
{2010B70C-7FEF-4C71-9E96-E09860401833}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2010B70C-7FEF-4C71-9E96-E09860401833}.Release|Any CPU.Build.0 = Release|Any CPU
{2010B70C-7FEF-4C71-9E96-E09860401833}.Release|x86.ActiveCfg = Release|Any CPU
{2010B70C-7FEF-4C71-9E96-E09860401833}.Release|x86.Build.0 = Release|Any CPU
{566D20ED-A863-43BA-BC28-D21E46FEC661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{566D20ED-A863-43BA-BC28-D21E46FEC661}.Debug|Any CPU.Build.0 = Debug|Any CPU
{566D20ED-A863-43BA-BC28-D21E46FEC661}.Debug|x86.ActiveCfg = Debug|Any CPU
{566D20ED-A863-43BA-BC28-D21E46FEC661}.Debug|x86.Build.0 = Debug|Any CPU
{566D20ED-A863-43BA-BC28-D21E46FEC661}.Release|Any CPU.ActiveCfg = Release|Any CPU
{566D20ED-A863-43BA-BC28-D21E46FEC661}.Release|Any CPU.Build.0 = Release|Any CPU
{566D20ED-A863-43BA-BC28-D21E46FEC661}.Release|x86.ActiveCfg = Release|Any CPU
{566D20ED-A863-43BA-BC28-D21E46FEC661}.Release|x86.Build.0 = Release|Any CPU
{053F50A8-E2C9-4F92-BA1B-B8F71603585F}.Debug|Any CPU.ActiveCfg = Debug|x86
{053F50A8-E2C9-4F92-BA1B-B8F71603585F}.Debug|x86.ActiveCfg = Debug|x86
{053F50A8-E2C9-4F92-BA1B-B8F71603585F}.Debug|x86.Build.0 = Debug|x86
{053F50A8-E2C9-4F92-BA1B-B8F71603585F}.Release|Any CPU.ActiveCfg = Release|x86
{053F50A8-E2C9-4F92-BA1B-B8F71603585F}.Release|x86.ActiveCfg = Release|x86
{053F50A8-E2C9-4F92-BA1B-B8F71603585F}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit a04b288

Please sign in to comment.