Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup autostart #86

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Setup/Icon.ico
Binary file not shown.
101 changes: 101 additions & 0 deletions Setup/Product.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define client_TargetDir=$(var.client.TargetDir)?>
<Product Id="17a4f85a-1219-4143-a0d6-e9ebc6084064" Name="TaskbarGroups" Language="1033" Version="1.0.0.0" Manufacturer="github.com" UpgradeCode="3936e1bc-c06c-45ae-b1db-430cf31dd48b">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<Icon Id="icon.ico" SourceFile="$(var.ProjectDir)Icon.ico" />
<Property Id="ARPPRODUCTICON" Value="icon.ico" />


<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\license.rtf" />

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<UIRef Id="WixUI_InstallDir" />

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

<Feature Id="ProductFeature" Title="TaskbarGroups" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="ApplicationShortcutDesktop" />
<ComponentRef Id="config_files" />
<ComponentGroupRef Id="JITComp_files" />
<ComponentRef Id="Shortcuts_files" />
</Feature>
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="TaskbarGroups">
<Directory Id="config" Name="config">
<Component Id="config_files" Guid="e29f1a9e-3ede-40d6-aba0-bfe451002ee2" SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no" Location="either">
<CreateFolder/>
</Component>
</Directory>
<Directory Id="JITComp" Name="JITComp" />
<Directory Id="Shortcuts" Name="Shortcuts">
<Component Id="Shortcuts_files" Guid="e29f1a9e-3ede-40d6-aba0-bfe451002ee3" SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no" Location="either">
<CreateFolder/>
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="TaskbarGroups" />
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
</Fragment>

<Fragment>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="9bd13330-6540-406f-a3a8-d7f7c69ae7f9">
<Shortcut Id="ApplicationStartMenuShortcut" Name="TaskbarGroups" Description="TaskbarGroups" Target="[INSTALLFOLDER]TaskbarGroups.exe" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="RemoveApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\TaskbarGroups" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcutDesktop" Guid="cde1e030-eb64-49a5-b7b8-400b379c2d1a">
<Shortcut Id="ApplicationDesktopShortcut" Name="TaskbarGroups" Description="TaskbarGroups" Target="[INSTALLFOLDER]TaskbarGroups.exe" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="RemoveDesktopFolder" Directory="DesktopFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\TaskbarGroups" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
<Component Id="TaskbarGroups.exe" Guid="0f9a1acd-803f-4ecb-a283-7537a05a5eb1">
<File Id="TaskbarGroups.exe" Name="TaskbarGroups.exe" Source="$(var.client_TargetDir)TaskbarGroups.exe" />
</Component>
<Component Id="TaskbarGroups.exe.config" Guid="749595ae-e1ec-4afa-93ef-3a9ae3b938f7">
<File Id="TaskbarGroups.exe.config" Name="TaskbarGroups.exe.config" Source="$(var.client_TargetDir)TaskbarGroups.exe.config" />
</Component>
<Component Id="Icon.ico" Guid="16572e80-4a83-4302-b4e3-68d5d65276e2">
<File Id="Icon.ico" Name="Icon.ico" Source="$(var.client_TargetDir)Icon.ico" />
</Component>
<Component Id="TaskbarGroups.pdb" Guid="c701a409-833d-4860-abc6-e8674cfb114c">
<File Id="TaskbarGroups.pdb" Name="TaskbarGroups.pdb" Source="$(var.client_TargetDir)TaskbarGroups.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="Shortcuts_files" Directory="Shortcuts">
</ComponentGroup>
<ComponentGroup Id="JITComp_files" Directory="JITComp">
<Component Id="frmClient.Profile" Guid="aea868c1-2d18-400d-88fa-e506b16ef130">
<File Id="frmClient.Profile" Name="frmClient.Profile" Source="$(var.client_TargetDir)\JITComp\frmClient.Profile" />
</Component>
</ComponentGroup>
<ComponentGroup Id="config_files" Directory="config">
</ComponentGroup>
</Fragment>
</Wix>
10 changes: 10 additions & 0 deletions Setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Setup Installer

Above is a list of extensions used to allow the creation of a setup file for this project. Making possible install the application just by running the `setup.exe` file.

### Plugins
- Used the Wix tool to allow the setup installation build no the project:
https://wixtoolset.org/releases/

- Visual studio extension for Wix tool kit:
https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension
62 changes: 62 additions & 0 deletions Setup/Setup.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?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>e182dd9d-0ef6-4a51-8bf0-6a89ffdff3ff</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Setup</OutputName>
<OutputType>Package</OutputType>
</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>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\main\client.csproj">
<Name>client</Name>
<Project>{b6e63ae7-4433-44ec-bcde-031cd779e8cc}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Content Include="frmClient.Profile" />
<Content Include="Icon.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="license.rtf" />
<Content Include="Icon.ico" />
<Content Include="README.md" />
</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>
Binary file added Setup/frmClient.Profile
Binary file not shown.
Loading