Skip to content

Commit

Permalink
wix installer
Browse files Browse the repository at this point in the history
  • Loading branch information
leegould committed Mar 21, 2016
1 parent 0546e0c commit 368c8b6
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 22 deletions.
18 changes: 18 additions & 0 deletions RedisExplorer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,36 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedisExplorer", "RedisExplo
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "RedisExplorerSetup", "RedisExplorerSetup\RedisExplorerSetup.vdproj", "{B5CF8FD0-6819-4FEF-95FD-11E152086CE3}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "RedisExplorerInstaller", "RedisExplorerInstaller\RedisExplorerInstaller.wixproj", "{FEEAA91E-2A74-4B9A-B272-D1670069B4CC}"
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
{40C37D45-2DDB-482F-A893-4748B92D8D3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40C37D45-2DDB-482F-A893-4748B92D8D3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40C37D45-2DDB-482F-A893-4748B92D8D3F}.Debug|x86.ActiveCfg = Debug|Any CPU
{40C37D45-2DDB-482F-A893-4748B92D8D3F}.Debug|x86.Build.0 = Debug|Any CPU
{40C37D45-2DDB-482F-A893-4748B92D8D3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40C37D45-2DDB-482F-A893-4748B92D8D3F}.Release|Any CPU.Build.0 = Release|Any CPU
{40C37D45-2DDB-482F-A893-4748B92D8D3F}.Release|x86.ActiveCfg = Release|Any CPU
{40C37D45-2DDB-482F-A893-4748B92D8D3F}.Release|x86.Build.0 = Release|Any CPU
{B5CF8FD0-6819-4FEF-95FD-11E152086CE3}.Debug|Any CPU.ActiveCfg = Debug
{B5CF8FD0-6819-4FEF-95FD-11E152086CE3}.Debug|x86.ActiveCfg = Debug
{B5CF8FD0-6819-4FEF-95FD-11E152086CE3}.Debug|x86.Build.0 = Debug
{B5CF8FD0-6819-4FEF-95FD-11E152086CE3}.Release|Any CPU.ActiveCfg = Release
{B5CF8FD0-6819-4FEF-95FD-11E152086CE3}.Release|x86.ActiveCfg = Release
{B5CF8FD0-6819-4FEF-95FD-11E152086CE3}.Release|x86.Build.0 = Release
{FEEAA91E-2A74-4B9A-B272-D1670069B4CC}.Debug|Any CPU.ActiveCfg = Debug|x86
{FEEAA91E-2A74-4B9A-B272-D1670069B4CC}.Debug|x86.ActiveCfg = Debug|x86
{FEEAA91E-2A74-4B9A-B272-D1670069B4CC}.Debug|x86.Build.0 = Debug|x86
{FEEAA91E-2A74-4B9A-B272-D1670069B4CC}.Release|Any CPU.ActiveCfg = Release|x86
{FEEAA91E-2A74-4B9A-B272-D1670069B4CC}.Release|x86.ActiveCfg = Release|x86
{FEEAA91E-2A74-4B9A-B272-D1670069B4CC}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 0 additions & 8 deletions RedisExplorer/AppWindowManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,9 @@ protected override Window EnsureWindow(object model, object view, bool isDialog)
{
var window = base.EnsureWindow(model, view, isDialog);

var m = model as AppViewModel;

window.SizeToContent = SizeToContent.Manual;

window.Title = "Redis Explorer";
//window.Icon = new BitmapImage(new Uri("pack://application:,,,/RedisExplorer;component/Assets/Images/arrows.ico"));

//window.Top = appsettings.Top;
//window.Left = appsettings.Left;
//window.Width = 600d;
//window.Height = 400d;

return window;
}
Expand Down
30 changes: 16 additions & 14 deletions RedisExplorer/Controls/KeyStringViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void Handle(TreeItemSelectedMessage message)
{
if (message?.SelectedItem is RedisKeyString && !message.SelectedItem.HasChildren)
{
DisplayStringValue(message.SelectedItem as RedisKeyString);
DisplayStringValue((RedisKeyString) message.SelectedItem);
}
}

Expand All @@ -50,7 +50,7 @@ public void Handle(RedisKeyReloadMessage message)
var redisKeyString = message.Item as RedisKeyString;
if (redisKeyString != null)
{
KeyValue = (redisKeyString.KeyValue);
DisplayStringValue(redisKeyString);
}
}

Expand All @@ -59,20 +59,22 @@ public void Handle(RedisKeyReloadMessage message)
#region Private

private void DisplayStringValue(RedisKeyString item)
{
if (item != null)
{
var value = item.KeyValue;
{
if (item == null)
{
return;
}

var value = item.KeyValue;

try
{
KeyValue = JObject.Parse(value).ToString(Formatting.Indented);
}
catch (JsonReaderException)
{
KeyValue = value;
}
try
{
KeyValue = JObject.Parse(value).ToString(Formatting.Indented);
}
catch (JsonReaderException)
{
KeyValue = value;
}
}

#endregion
Expand Down
45 changes: 45 additions & 0 deletions RedisExplorerInstaller/RedisExplorerInstaller.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.9</ProductVersion>
<ProjectGuid>feeaa91e-2a74-4b9a-b272-d1670069b4cc</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>RedisExplorerInstaller</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\WiX Toolset\v4\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\WiX Toolset\v4\Wix.targets</WixTargetsPath>
</PropertyGroup>
<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>
<ItemGroup>
<ProjectReference Include="..\RedisExplorer\RedisExplorer.csproj">
<Name>RedisExplorer</Name>
<Project>{40c37d45-2ddb-482f-a893-4748b92d8d3f}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="RedisExplorerInstaller.wxs" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
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>
97 changes: 97 additions & 0 deletions RedisExplorerInstaller/RedisExplorerInstaller.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">

<Product Id="*" Name="Redis Explorer" Language="1033" Version="1.0.0.0" Manufacturer="Redis Explorer" UpgradeCode="A8BE4DB2-6A11-4CCC-96AE-657D7C1E0187">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Media Id="1" Cabinet="redisexplorer.cab" EmbedCab="yes" />

<Feature Id="ProductFeature" Title="Redis Explorer" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ProgramMenuDir"/>
</Feature>

<Icon Id="icon.ico" SourceFile="..\RedisExplorer\Assets\redis-icon.png"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="RedisExplorer" />
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Redis Explorer">

<Component Id="ProgramMenuDir" Guid="{A118046E-FEC6-46A4-A4CB-39FEC6D1823D}">
<RemoveFolder Id="ProgramMenuDir" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\Installer" Type="integer" Value="1" Name="installed" KeyPath="yes" />
</Component>

</Directory>
</Directory>
</Directory>
</Fragment>

<!--<Fragment>
<Component Id="executable" Guid="{7B30C885-B7F8-4BA0-9B16-8BD596D1E21F}" Directory="INSTALLFOLDER">
<File Id="" Source="..\RedisExplorer\bin\Release\RedisExplorer.exe" KeyPath="yes" Checksum="yes">
<Shortcut Id="startMenuShotcut" Directory="ApplicationProgramsFolder"
Name="Redis Explorer" WorkingDirectory="INSTALLFOLDER"
Icon="icon.ico" IconIndex="0" Advertise="yes">
</Shortcut>
</File>
</Component>
</Fragment>-->

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">

<Component Id="executable" Guid="{7B30C885-B7F8-4BA0-9B16-8BD596D1E21F}" Directory="INSTALLFOLDER">
<File Id="" Source="..\RedisExplorer\bin\Release\RedisExplorer.exe" KeyPath="yes" Checksum="yes">

<Shortcut Id="startMenuShotcut" Directory="ApplicationProgramsFolder"
Name="Redis Explorer" WorkingDirectory="INSTALLFOLDER"
Icon="icon.ico" IconIndex="0" Advertise="yes">
</Shortcut>

</File>
</Component>

<Component Id="ProductComponent" Guid="{1C791AE4-C2F6-4B6C-ACE5-54ADF2970073}">
<File Id="" Source="..\RedisExplorer\bin\Release\RedisExplorer.exe.config"/>
<File Id="" Source="..\RedisExplorer\bin\Release\StackExchange.Redis.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Caliburn.Micro.Platform.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Caliburn.Micro.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Newtonsoft.Json.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\MahApps.Metro.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Xceed.Wpf.AvalonDock.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\System.Windows.Interactivity.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Xceed.Wpf.AvalonDock.Themes.Aero.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Xceed.Wpf.AvalonDock.Themes.Metro.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Xceed.Wpf.AvalonDock.Themes.VS2010.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Xceed.Wpf.DataGrid.dll"/>
<File Id="" Source="..\RedisExplorer\bin\Release\Xceed.Wpf.Toolkit.dll"/>
</Component>

</ComponentGroup>
</Fragment>

<!--<Fragment>
<ComponentGroup Id="ShortcutComponents" Directory="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="{E1573CDC-389F-4897-8767-AED445D17B07}">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="Redis Explorer"
Description="A Desktop Redis Client"
Target="[#executable]"
WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\RedisExplorer" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</ComponentGroup>
</Fragment>-->

</Wix>

0 comments on commit 368c8b6

Please sign in to comment.