mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-01 18:23:32 +00:00
Store install path in registry
Finalized auto-update code
This commit is contained in:
parent
b394c03dbb
commit
bc64ac33f8
@ -18,6 +18,7 @@
|
|||||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||||
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions>
|
<CompilerAdditionalOptions>-arch x64</CompilerAdditionalOptions>
|
||||||
|
<SuppressPdbOutput>False</SuppressPdbOutput>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DefineConstants>HarvestPath=..\Artemis\bin\Release</DefineConstants>
|
<DefineConstants>HarvestPath=..\Artemis\bin\Release</DefineConstants>
|
||||||
@ -59,6 +60,12 @@
|
|||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
<HeatDirectory Directory="..\Artemis\bin\Release" PreprocessorVariable="var.HarvestPath" OutputFile="HeatGeneratedFileList.wxs" ComponentGroupName="HeatGenerated" DirectoryRefId="INSTALLFOLDER" AutogenerateGuids="true" ToolPath="$(WixToolPath)" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" />
|
<HeatDirectory Directory="..\Artemis\bin\Release" PreprocessorVariable="var.HarvestPath" OutputFile="HeatGeneratedFileList.wxs" ComponentGroupName="HeatGenerated" DirectoryRefId="INSTALLFOLDER" AutogenerateGuids="true" ToolPath="$(WixToolPath)" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent />
|
||||||
|
</PropertyGroup>
|
||||||
<!--
|
<!--
|
||||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
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.
|
Other similar extension points exist, see Wix.targets.
|
||||||
|
|||||||
@ -38,9 +38,6 @@
|
|||||||
<Component Id="cmpA643245E2404309B3DABA70BB912DCCB" Guid="*">
|
<Component Id="cmpA643245E2404309B3DABA70BB912DCCB" Guid="*">
|
||||||
<File Id="filB4B2021C4282D7C64C5B4AD0AF512DCA" KeyPath="yes" Source="$(var.HarvestPath)\ColorBox.dll" />
|
<File Id="filB4B2021C4282D7C64C5B4AD0AF512DCA" KeyPath="yes" Source="$(var.HarvestPath)\ColorBox.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp4D0A4ED17FB1630F800FD706E2563C80" Guid="*">
|
|
||||||
<File Id="fil9AA96F00A2CBCD318E0F8757A28B4271" KeyPath="yes" Source="$(var.HarvestPath)\ColorBox.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmpFBDA3E7CEA190733BF9F05003E25D5AF" Guid="*">
|
<Component Id="cmpFBDA3E7CEA190733BF9F05003E25D5AF" Guid="*">
|
||||||
<File Id="filB20254A9D5C181C3E378CFFA814C5E33" KeyPath="yes" Source="$(var.HarvestPath)\Corale.Colore.dll" />
|
<File Id="filB20254A9D5C181C3E378CFFA814C5E33" KeyPath="yes" Source="$(var.HarvestPath)\Corale.Colore.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
@ -62,9 +59,6 @@
|
|||||||
<Component Id="cmp51BF717902634148759143BD6AD539B0" Guid="*">
|
<Component Id="cmp51BF717902634148759143BD6AD539B0" Guid="*">
|
||||||
<File Id="fil13BFD35B4184B1F8F1AAB29A7C3686BC" KeyPath="yes" Source="$(var.HarvestPath)\DynamicExpresso.Core.dll" />
|
<File Id="fil13BFD35B4184B1F8F1AAB29A7C3686BC" KeyPath="yes" Source="$(var.HarvestPath)\DynamicExpresso.Core.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp73C85F3EAF424BD70648B36B74C26770" Guid="*">
|
|
||||||
<File Id="filC2A40A556A913567A37A2740351EDC2D" KeyPath="yes" Source="$(var.HarvestPath)\DynamicExpresso.Core.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmpF91C67D347AB218E39A848636AB895E3" Guid="*">
|
<Component Id="cmpF91C67D347AB218E39A848636AB895E3" Guid="*">
|
||||||
<File Id="fil92C151A1E3668BA2B0166FD3BDCDE7CB" KeyPath="yes" Source="$(var.HarvestPath)\DynamicExpresso.Core.xml" />
|
<File Id="fil92C151A1E3668BA2B0166FD3BDCDE7CB" KeyPath="yes" Source="$(var.HarvestPath)\DynamicExpresso.Core.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
@ -74,18 +68,12 @@
|
|||||||
<Component Id="cmp781EEA928029B571EC5B4E7090BD7946" Guid="*">
|
<Component Id="cmp781EEA928029B571EC5B4E7090BD7946" Guid="*">
|
||||||
<File Id="fil093D81EF2D0F558E4AF6DBB696C8B611" KeyPath="yes" Source="$(var.HarvestPath)\GongSolutions.Wpf.DragDrop.dll" />
|
<File Id="fil093D81EF2D0F558E4AF6DBB696C8B611" KeyPath="yes" Source="$(var.HarvestPath)\GongSolutions.Wpf.DragDrop.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp247A5C6B2FC2255D2495669F4BBC5B13" Guid="*">
|
|
||||||
<File Id="fil5337173B3C652BB7E832CBB74A945243" KeyPath="yes" Source="$(var.HarvestPath)\GongSolutions.Wpf.DragDrop.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmp349050BDBF99EA8BFA2BA8F9E31ED252" Guid="*">
|
<Component Id="cmp349050BDBF99EA8BFA2BA8F9E31ED252" Guid="*">
|
||||||
<File Id="filAB2DEF8A4601402AB380F6101D5A66E0" KeyPath="yes" Source="$(var.HarvestPath)\GongSolutions.Wpf.DragDrop.xml" />
|
<File Id="filAB2DEF8A4601402AB380F6101D5A66E0" KeyPath="yes" Source="$(var.HarvestPath)\GongSolutions.Wpf.DragDrop.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpBE3C1D05C7C90455322C9F819A57A07A" Guid="*">
|
<Component Id="cmpBE3C1D05C7C90455322C9F819A57A07A" Guid="*">
|
||||||
<File Id="filE7C602A91344AD969255F20A2CA7411A" KeyPath="yes" Source="$(var.HarvestPath)\Hardcodet.Wpf.TaskbarNotification.dll" />
|
<File Id="filE7C602A91344AD969255F20A2CA7411A" KeyPath="yes" Source="$(var.HarvestPath)\Hardcodet.Wpf.TaskbarNotification.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp92758FBE7BAD0A8C22E2DF7485108D82" Guid="*">
|
|
||||||
<File Id="fil37C16A438720B34E2BAED72C2359E6B8" KeyPath="yes" Source="$(var.HarvestPath)\Hardcodet.Wpf.TaskbarNotification.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmp1AB3F692680AD43D977D2B4893C60651" Guid="*">
|
<Component Id="cmp1AB3F692680AD43D977D2B4893C60651" Guid="*">
|
||||||
<File Id="fil8DCFE8E2064CED909E7B76E107F2D738" KeyPath="yes" Source="$(var.HarvestPath)\Hardcodet.Wpf.TaskbarNotification.xml" />
|
<File Id="fil8DCFE8E2064CED909E7B76E107F2D738" KeyPath="yes" Source="$(var.HarvestPath)\Hardcodet.Wpf.TaskbarNotification.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
@ -104,18 +92,12 @@
|
|||||||
<Component Id="cmp223D4754378C01052DA8253A843FD297" Guid="*">
|
<Component Id="cmp223D4754378C01052DA8253A843FD297" Guid="*">
|
||||||
<File Id="filBC562C5B3D9848A2114F0AF7275FF1E6" KeyPath="yes" Source="$(var.HarvestPath)\MahApps.Metro.dll" />
|
<File Id="filBC562C5B3D9848A2114F0AF7275FF1E6" KeyPath="yes" Source="$(var.HarvestPath)\MahApps.Metro.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp31541C871E68AFBC70137561BF857C7B" Guid="*">
|
|
||||||
<File Id="fil109901354A5E9C0DB4A287ECF7B10D9E" KeyPath="yes" Source="$(var.HarvestPath)\MahApps.Metro.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmp43D899344ED173B0DAFCD84946D02788" Guid="*">
|
<Component Id="cmp43D899344ED173B0DAFCD84946D02788" Guid="*">
|
||||||
<File Id="fil7FCB3B29476FFB610381CD77013296AD" KeyPath="yes" Source="$(var.HarvestPath)\MahApps.Metro.xml" />
|
<File Id="fil7FCB3B29476FFB610381CD77013296AD" KeyPath="yes" Source="$(var.HarvestPath)\MahApps.Metro.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp2FCEBC7A99564B55654E85ED28E48600" Guid="*">
|
<Component Id="cmp2FCEBC7A99564B55654E85ED28E48600" Guid="*">
|
||||||
<File Id="fil4EAD90E131DF96A66C4D6F6426CE480B" KeyPath="yes" Source="$(var.HarvestPath)\MoonSharp.Interpreter.dll" />
|
<File Id="fil4EAD90E131DF96A66C4D6F6426CE480B" KeyPath="yes" Source="$(var.HarvestPath)\MoonSharp.Interpreter.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp10359C02FE64062C8403FF433E774083" Guid="*">
|
|
||||||
<File Id="fil7357720C30D1947ABE224E6EF4581E03" KeyPath="yes" Source="$(var.HarvestPath)\MoonSharp.Interpreter.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmpF3259CFFC7B5247438581E9B04AB35D8" Guid="*">
|
<Component Id="cmpF3259CFFC7B5247438581E9B04AB35D8" Guid="*">
|
||||||
<File Id="filD117DB2E80E33BDED00898D9DB2B086A" KeyPath="yes" Source="$(var.HarvestPath)\MoonSharp.Interpreter.xml" />
|
<File Id="filD117DB2E80E33BDED00898D9DB2B086A" KeyPath="yes" Source="$(var.HarvestPath)\MoonSharp.Interpreter.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
@ -158,9 +140,6 @@
|
|||||||
<Component Id="cmpC788DBAFBC9F98E69B6A163430726358" Guid="*">
|
<Component Id="cmpC788DBAFBC9F98E69B6A163430726358" Guid="*">
|
||||||
<File Id="fil90249C4571D1C5C77FEF83E6CD7C0486" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Base.dll" />
|
<File Id="fil90249C4571D1C5C77FEF83E6CD7C0486" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Base.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp0DEB91AD1FD75E285540D446C99E9C2C" Guid="*">
|
|
||||||
<File Id="fil4A9AC11AC6C5EC445B2D36E6CD933E91" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Base.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmp34B431D779DBCB134781FB546E793672" Guid="*">
|
<Component Id="cmp34B431D779DBCB134781FB546E793672" Guid="*">
|
||||||
<File Id="filF22891E372F5EE5250A214F03B209159" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Base.xml" />
|
<File Id="filF22891E372F5EE5250A214F03B209159" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Base.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
@ -170,33 +149,21 @@
|
|||||||
<Component Id="cmp880114322C539610888B6FE5E0430EFD" Guid="*">
|
<Component Id="cmp880114322C539610888B6FE5E0430EFD" Guid="*">
|
||||||
<File Id="filA3DCFB0511C279CFF23D9027A6EF8034" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Core.Extensions.dll" />
|
<File Id="filA3DCFB0511C279CFF23D9027A6EF8034" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Core.Extensions.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp52B77D4D77F60AD44714157DBA1F8386" Guid="*">
|
|
||||||
<File Id="filF397572DD5CBE63F669A23C685E278AB" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Core.Extensions.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmp2BDA3BC9AACE855B92939FAC7E485D24" Guid="*">
|
<Component Id="cmp2BDA3BC9AACE855B92939FAC7E485D24" Guid="*">
|
||||||
<File Id="fil74465812CD5B22E5E5E2DAACA2F84A09" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Core.Extensions.xml" />
|
<File Id="fil74465812CD5B22E5E5E2DAACA2F84A09" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Core.Extensions.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp571CF516DB97F7011AAF8A137D2996FF" Guid="*">
|
|
||||||
<File Id="filFFAD6D65B4CFFFAC7982074225CA6DAB" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Core.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmp0DE0CF5F9F4EBB61B3E2366D5E01ACDA" Guid="*">
|
<Component Id="cmp0DE0CF5F9F4EBB61B3E2366D5E01ACDA" Guid="*">
|
||||||
<File Id="fil2B276F38ABE0890FD005BE1FD1450AC2" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Core.xml" />
|
<File Id="fil2B276F38ABE0890FD005BE1FD1450AC2" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Core.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp5B06590B9AB52A536B50EE73700F03B7" Guid="*">
|
<Component Id="cmp5B06590B9AB52A536B50EE73700F03B7" Guid="*">
|
||||||
<File Id="filC3001B1F38283A14D605C01009EE5815" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Packets.dll" />
|
<File Id="filC3001B1F38283A14D605C01009EE5815" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Packets.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpFC6F09A2810126E4E716AE2EA4AD7E6C" Guid="*">
|
|
||||||
<File Id="fil6E76B5334F262B8C788A6ADD9E6B577F" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Packets.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmp4D8569518C357F8E84EFB1725283D60A" Guid="*">
|
<Component Id="cmp4D8569518C357F8E84EFB1725283D60A" Guid="*">
|
||||||
<File Id="fil160F2677CE3E20572D82BFFADCA3E0D4" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Packets.xml" />
|
<File Id="fil160F2677CE3E20572D82BFFADCA3E0D4" KeyPath="yes" Source="$(var.HarvestPath)\PcapDotNet.Packets.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmp2DDF6D17BE1860B9D9659B9467BE29B2" Guid="*">
|
<Component Id="cmp2DDF6D17BE1860B9D9659B9467BE29B2" Guid="*">
|
||||||
<File Id="fil7DCA2F46028FF87F6BF1D93C796F2940" KeyPath="yes" Source="$(var.HarvestPath)\Process.NET.dll" />
|
<File Id="fil7DCA2F46028FF87F6BF1D93C796F2940" KeyPath="yes" Source="$(var.HarvestPath)\Process.NET.dll" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component Id="cmpB7EBAD40DC64AFBEFD12B3567739DCEF" Guid="*">
|
|
||||||
<File Id="filCAD83C0189995547B3C00B767092E1B5" KeyPath="yes" Source="$(var.HarvestPath)\Process.NET.pdb" />
|
|
||||||
</Component>
|
|
||||||
<Component Id="cmpC4421A56E3C93C93233BC144EDDD52DE" Guid="*">
|
<Component Id="cmpC4421A56E3C93C93233BC144EDDD52DE" Guid="*">
|
||||||
<File Id="fil094D2250A8E795A10D0384375675E336" KeyPath="yes" Source="$(var.HarvestPath)\Process.NET.xml" />
|
<File Id="fil094D2250A8E795A10D0384375675E336" KeyPath="yes" Source="$(var.HarvestPath)\Process.NET.xml" />
|
||||||
</Component>
|
</Component>
|
||||||
@ -255,7 +222,6 @@
|
|||||||
<ComponentRef Id="cmp3E3AA980BDCF05810907BC4EB3821194" />
|
<ComponentRef Id="cmp3E3AA980BDCF05810907BC4EB3821194" />
|
||||||
<ComponentRef Id="cmp17D9A8147FAEAB525E5B8101916313BA" />
|
<ComponentRef Id="cmp17D9A8147FAEAB525E5B8101916313BA" />
|
||||||
<ComponentRef Id="cmpA643245E2404309B3DABA70BB912DCCB" />
|
<ComponentRef Id="cmpA643245E2404309B3DABA70BB912DCCB" />
|
||||||
<ComponentRef Id="cmp4D0A4ED17FB1630F800FD706E2563C80" />
|
|
||||||
<ComponentRef Id="cmpFBDA3E7CEA190733BF9F05003E25D5AF" />
|
<ComponentRef Id="cmpFBDA3E7CEA190733BF9F05003E25D5AF" />
|
||||||
<ComponentRef Id="cmp0215030D177DFD73F427CC3D7CA19238" />
|
<ComponentRef Id="cmp0215030D177DFD73F427CC3D7CA19238" />
|
||||||
<ComponentRef Id="cmpA1F7266A1B0ADDC69DE569177E196895" />
|
<ComponentRef Id="cmpA1F7266A1B0ADDC69DE569177E196895" />
|
||||||
@ -263,24 +229,19 @@
|
|||||||
<ComponentRef Id="cmp8D9BC4E9081E35E49D1317948B71CF9E" />
|
<ComponentRef Id="cmp8D9BC4E9081E35E49D1317948B71CF9E" />
|
||||||
<ComponentRef Id="cmp6527C67EBA0A64B342B4DFD472F51344" />
|
<ComponentRef Id="cmp6527C67EBA0A64B342B4DFD472F51344" />
|
||||||
<ComponentRef Id="cmp51BF717902634148759143BD6AD539B0" />
|
<ComponentRef Id="cmp51BF717902634148759143BD6AD539B0" />
|
||||||
<ComponentRef Id="cmp73C85F3EAF424BD70648B36B74C26770" />
|
|
||||||
<ComponentRef Id="cmpF91C67D347AB218E39A848636AB895E3" />
|
<ComponentRef Id="cmpF91C67D347AB218E39A848636AB895E3" />
|
||||||
<ComponentRef Id="cmpFDA802159822E5F335299869D8F57A96" />
|
<ComponentRef Id="cmpFDA802159822E5F335299869D8F57A96" />
|
||||||
<ComponentRef Id="cmp781EEA928029B571EC5B4E7090BD7946" />
|
<ComponentRef Id="cmp781EEA928029B571EC5B4E7090BD7946" />
|
||||||
<ComponentRef Id="cmp247A5C6B2FC2255D2495669F4BBC5B13" />
|
|
||||||
<ComponentRef Id="cmp349050BDBF99EA8BFA2BA8F9E31ED252" />
|
<ComponentRef Id="cmp349050BDBF99EA8BFA2BA8F9E31ED252" />
|
||||||
<ComponentRef Id="cmpBE3C1D05C7C90455322C9F819A57A07A" />
|
<ComponentRef Id="cmpBE3C1D05C7C90455322C9F819A57A07A" />
|
||||||
<ComponentRef Id="cmp92758FBE7BAD0A8C22E2DF7485108D82" />
|
|
||||||
<ComponentRef Id="cmp1AB3F692680AD43D977D2B4893C60651" />
|
<ComponentRef Id="cmp1AB3F692680AD43D977D2B4893C60651" />
|
||||||
<ComponentRef Id="cmp13D58469BCB864EB53214ED46E622188" />
|
<ComponentRef Id="cmp13D58469BCB864EB53214ED46E622188" />
|
||||||
<ComponentRef Id="cmp742785C9A7B88BE6B2E81C2322E3D2EE" />
|
<ComponentRef Id="cmp742785C9A7B88BE6B2E81C2322E3D2EE" />
|
||||||
<ComponentRef Id="cmp57FCE16B127552B85167E1625E9421BE" />
|
<ComponentRef Id="cmp57FCE16B127552B85167E1625E9421BE" />
|
||||||
<ComponentRef Id="cmpC92D9566450D2381C819C291B41E2EE8" />
|
<ComponentRef Id="cmpC92D9566450D2381C819C291B41E2EE8" />
|
||||||
<ComponentRef Id="cmp223D4754378C01052DA8253A843FD297" />
|
<ComponentRef Id="cmp223D4754378C01052DA8253A843FD297" />
|
||||||
<ComponentRef Id="cmp31541C871E68AFBC70137561BF857C7B" />
|
|
||||||
<ComponentRef Id="cmp43D899344ED173B0DAFCD84946D02788" />
|
<ComponentRef Id="cmp43D899344ED173B0DAFCD84946D02788" />
|
||||||
<ComponentRef Id="cmp2FCEBC7A99564B55654E85ED28E48600" />
|
<ComponentRef Id="cmp2FCEBC7A99564B55654E85ED28E48600" />
|
||||||
<ComponentRef Id="cmp10359C02FE64062C8403FF433E774083" />
|
|
||||||
<ComponentRef Id="cmpF3259CFFC7B5247438581E9B04AB35D8" />
|
<ComponentRef Id="cmpF3259CFFC7B5247438581E9B04AB35D8" />
|
||||||
<ComponentRef Id="cmpBC4FC00A26E7D32479D42D3411317FC5" />
|
<ComponentRef Id="cmpBC4FC00A26E7D32479D42D3411317FC5" />
|
||||||
<ComponentRef Id="cmp125C379E185231EFADA4CB4301BD0A9E" />
|
<ComponentRef Id="cmp125C379E185231EFADA4CB4301BD0A9E" />
|
||||||
@ -295,19 +256,14 @@
|
|||||||
<ComponentRef Id="cmpB7F1EBE42DCB1051B92D42C1EF84E2F9" />
|
<ComponentRef Id="cmpB7F1EBE42DCB1051B92D42C1EF84E2F9" />
|
||||||
<ComponentRef Id="cmpAF162B14FA6391E4D0D34D9485A3CBEB" />
|
<ComponentRef Id="cmpAF162B14FA6391E4D0D34D9485A3CBEB" />
|
||||||
<ComponentRef Id="cmpC788DBAFBC9F98E69B6A163430726358" />
|
<ComponentRef Id="cmpC788DBAFBC9F98E69B6A163430726358" />
|
||||||
<ComponentRef Id="cmp0DEB91AD1FD75E285540D446C99E9C2C" />
|
|
||||||
<ComponentRef Id="cmp34B431D779DBCB134781FB546E793672" />
|
<ComponentRef Id="cmp34B431D779DBCB134781FB546E793672" />
|
||||||
<ComponentRef Id="cmpC306A22C66D6CF8D48E8AA6050A52C97" />
|
<ComponentRef Id="cmpC306A22C66D6CF8D48E8AA6050A52C97" />
|
||||||
<ComponentRef Id="cmp880114322C539610888B6FE5E0430EFD" />
|
<ComponentRef Id="cmp880114322C539610888B6FE5E0430EFD" />
|
||||||
<ComponentRef Id="cmp52B77D4D77F60AD44714157DBA1F8386" />
|
|
||||||
<ComponentRef Id="cmp2BDA3BC9AACE855B92939FAC7E485D24" />
|
<ComponentRef Id="cmp2BDA3BC9AACE855B92939FAC7E485D24" />
|
||||||
<ComponentRef Id="cmp571CF516DB97F7011AAF8A137D2996FF" />
|
|
||||||
<ComponentRef Id="cmp0DE0CF5F9F4EBB61B3E2366D5E01ACDA" />
|
<ComponentRef Id="cmp0DE0CF5F9F4EBB61B3E2366D5E01ACDA" />
|
||||||
<ComponentRef Id="cmp5B06590B9AB52A536B50EE73700F03B7" />
|
<ComponentRef Id="cmp5B06590B9AB52A536B50EE73700F03B7" />
|
||||||
<ComponentRef Id="cmpFC6F09A2810126E4E716AE2EA4AD7E6C" />
|
|
||||||
<ComponentRef Id="cmp4D8569518C357F8E84EFB1725283D60A" />
|
<ComponentRef Id="cmp4D8569518C357F8E84EFB1725283D60A" />
|
||||||
<ComponentRef Id="cmp2DDF6D17BE1860B9D9659B9467BE29B2" />
|
<ComponentRef Id="cmp2DDF6D17BE1860B9D9659B9467BE29B2" />
|
||||||
<ComponentRef Id="cmpB7EBAD40DC64AFBEFD12B3567739DCEF" />
|
|
||||||
<ComponentRef Id="cmpC4421A56E3C93C93233BC144EDDD52DE" />
|
<ComponentRef Id="cmpC4421A56E3C93C93233BC144EDDD52DE" />
|
||||||
<ComponentRef Id="cmp5628FD27631E522C3D67C498667BC8A5" />
|
<ComponentRef Id="cmp5628FD27631E522C3D67C498667BC8A5" />
|
||||||
<ComponentRef Id="cmp3145619F7A6A826AB72CAFCEF603B974" />
|
<ComponentRef Id="cmp3145619F7A6A826AB72CAFCEF603B974" />
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
||||||
|
|
||||||
<Product Id="*" Name="Artemis" Language="1033" Version="1.12.0.0" Manufacturer="SpoinkyNL" UpgradeCode="ebc7bc50-0473-4729-8de8-32ddb99bb986">
|
<Product Id="*" Name="Artemis" Language="1033" Version="1.11.0.0" Manufacturer="SpoinkyNL" UpgradeCode="ebc7bc50-0473-4729-8de8-32ddb99bb986">
|
||||||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
|
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
|
||||||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
||||||
<MediaTemplate EmbedCab="yes" />
|
<MediaTemplate EmbedCab="yes" />
|
||||||
@ -16,11 +16,17 @@
|
|||||||
<Property Id="ARPHELPLINK" Value="https://github.com/SpoinkyNL/Artemis/wiki" />
|
<Property Id="ARPHELPLINK" Value="https://github.com/SpoinkyNL/Artemis/wiki" />
|
||||||
<Property Id="ARPURLINFOABOUT" Value="https://github.com/SpoinkyNL/Artemis" />
|
<Property Id="ARPURLINFOABOUT" Value="https://github.com/SpoinkyNL/Artemis" />
|
||||||
<Property Id="ARPNOREPAIR" Value="1" />
|
<Property Id="ARPNOREPAIR" Value="1" />
|
||||||
|
<Property Id="INSTALLFOLDER">
|
||||||
|
<RegistrySearch Id="ArtemisRegistry" Type="raw" Root="HKLM" Key="Software\[Manufacturer]\[ProductName]" Name="InstallDir" />
|
||||||
|
</Property>
|
||||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
||||||
|
|
||||||
|
|
||||||
<Feature Id="ProductFeature" Title="Artemis" Level="1">
|
<Feature Id="ProductFeature" Title="Artemis" Level="1">
|
||||||
<ComponentGroupRef Id="HeatGenerated" />
|
<ComponentGroupRef Id="HeatGenerated" />
|
||||||
|
<ComponentRef Id="InstallDirRegistry"/>
|
||||||
<ComponentRef Id="ApplicationShortcuts" />
|
<ComponentRef Id="ApplicationShortcuts" />
|
||||||
|
|
||||||
</Feature>
|
</Feature>
|
||||||
<UI Id='Mondo'>
|
<UI Id='Mondo'>
|
||||||
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Artemis" />
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Artemis" />
|
||||||
@ -42,12 +48,17 @@
|
|||||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||||
<Directory Id="ProgramFiles64Folder">
|
<Directory Id="ProgramFiles64Folder">
|
||||||
<Directory Id="INSTALLFOLDER" Name="Artemis" />
|
<Directory Id="INSTALLFOLDER" Name="Artemis" />
|
||||||
|
<!-- Retrieve install dir from registry -->
|
||||||
|
<Component Id="InstallDirRegistry">
|
||||||
|
<RegistryValue Root="HKLM" Key="Software\[Manufacturer]\[ProductName]" Name="InstallDir" Type="string" Value="[INSTALLFOLDER]" KeyPath="yes" />
|
||||||
|
</Component>
|
||||||
|
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory Id="ProgramMenuFolder">
|
<Directory Id="ProgramMenuFolder">
|
||||||
<Directory Id="ProgramMenuSubfolder" Name="Artemis">
|
<Directory Id="ProgramMenuSubfolder" Name="Artemis">
|
||||||
<Component Id="ApplicationShortcuts" Guid="b7465bd9-c8d7-4999-9695-8bbfd9306986">
|
<Component Id="ApplicationShortcuts" Guid="b7465bd9-c8d7-4999-9695-8bbfd9306986">
|
||||||
<Shortcut Id="ApplicationShortcut1" Name="Artemis" Description="Artemis" Target="[INSTALLFOLDER]Artemis.exe" WorkingDirectory="INSTALLFOLDER" />
|
<Shortcut Id="ApplicationShortcut1" Name="Artemis" Description="Artemis" Target="[INSTALLFOLDER]Artemis.exe" WorkingDirectory="INSTALLFOLDER" />
|
||||||
<RegistryValue Root="HKCU" Key="Software\SpoinkyNL\Artemis" Name="installed" Type="integer" Value="1" KeyPath="yes" />
|
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes" />
|
||||||
<RemoveFolder Id="ProgramMenuSubfolder" On="uninstall" />
|
<RemoveFolder Id="ProgramMenuSubfolder" On="uninstall" />
|
||||||
</Component>
|
</Component>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|||||||
@ -288,7 +288,7 @@
|
|||||||
<Compile Include="DeviceProviders\Corsair\CorsairMouse.cs" />
|
<Compile Include="DeviceProviders\Corsair\CorsairMouse.cs" />
|
||||||
<Compile Include="DeviceProviders\Corsair\CorsairHeadset.cs" />
|
<Compile Include="DeviceProviders\Corsair\CorsairHeadset.cs" />
|
||||||
<Compile Include="DeviceProviders\Corsair\CorsairMousemat.cs" />
|
<Compile Include="DeviceProviders\Corsair\CorsairMousemat.cs" />
|
||||||
<Compile Include="DeviceProviders\Corsair\Utilities\KeyMap.cs" />
|
<Compile Include="DeviceProviders\Corsair\Utilities\CorsairUtilities.cs" />
|
||||||
<Compile Include="DeviceProviders\DeviceProvider.cs" />
|
<Compile Include="DeviceProviders\DeviceProvider.cs" />
|
||||||
<Compile Include="DeviceProviders\Logitech\G810.cs" />
|
<Compile Include="DeviceProviders\Logitech\G810.cs" />
|
||||||
<Compile Include="DeviceProviders\Logitech\LogitechGeneric.cs" />
|
<Compile Include="DeviceProviders\Logitech\LogitechGeneric.cs" />
|
||||||
@ -1093,6 +1093,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\packages\CUE.NET.1.2.0\build\net45\CUE.NET.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CUE.NET.1.2.0\build\net45\CUE.NET.targets'))" />
|
<Error Condition="!Exists('..\packages\CUE.NET.1.2.0\build\net45\CUE.NET.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CUE.NET.1.2.0\build\net45\CUE.NET.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>if $(ConfigurationName) == Release (
|
||||||
|
attrib +r Artemis.pdb
|
||||||
|
del *.pdb
|
||||||
|
attrib -r Artemis.pdb
|
||||||
|
echo Access denied is intended, see post build event
|
||||||
|
)</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Artemis.DeviceProviders.Corsair.Utilities;
|
||||||
using CUE.NET;
|
using CUE.NET;
|
||||||
using CUE.NET.Brushes;
|
using CUE.NET.Brushes;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
@ -24,11 +25,15 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
public override bool TryEnable()
|
public override bool TryEnable()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
lock (CorsairUtilities.SDKLock)
|
||||||
{
|
{
|
||||||
CanUse = CanInitializeSdk();
|
CanUse = CanInitializeSdk();
|
||||||
if (CanUse && !CueSDK.IsInitialized)
|
if (CanUse && !CueSDK.IsInitialized)
|
||||||
CueSDK.Initialize(true);
|
CueSDK.Initialize(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
CanUse = false;
|
CanUse = false;
|
||||||
|
|||||||
@ -43,9 +43,12 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
/// Enables the SDK and sets updatemode to manual as well as the color of the background to black.
|
/// Enables the SDK and sets updatemode to manual as well as the color of the background to black.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
|
{
|
||||||
|
lock (CorsairUtilities.SDKLock)
|
||||||
{
|
{
|
||||||
if (!CueSDK.IsInitialized)
|
if (!CueSDK.IsInitialized)
|
||||||
CueSDK.Initialize(true);
|
CueSDK.Initialize(true);
|
||||||
|
}
|
||||||
|
|
||||||
CueSDK.UpdateMode = UpdateMode.Manual;
|
CueSDK.UpdateMode = UpdateMode.Manual;
|
||||||
_keyboard = CueSDK.KeyboardSDK;
|
_keyboard = CueSDK.KeyboardSDK;
|
||||||
@ -127,7 +130,7 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
cueLed = _keyboard.Leds.FirstOrDefault(k => k.Id.ToString() == keyCode.ToString()) ??
|
cueLed = _keyboard.Leds.FirstOrDefault(k => k.Id.ToString() == keyCode.ToString()) ??
|
||||||
_keyboard.Leds.FirstOrDefault(k => k.Id == KeyMap.FormsKeys[keyCode]);
|
_keyboard.Leds.FirstOrDefault(k => k.Id == CorsairUtilities.FormsKeys[keyCode]);
|
||||||
|
|
||||||
Logger.Trace("Keycode: {0} resolved to CUE LED: {1}", keyCode, cueLed);
|
Logger.Trace("Keycode: {0} resolved to CUE LED: {1}", keyCode, cueLed);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Artemis.DeviceProviders.Corsair.Utilities;
|
||||||
using CUE.NET;
|
using CUE.NET;
|
||||||
using CUE.NET.Brushes;
|
using CUE.NET.Brushes;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
@ -24,11 +25,14 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
public override bool TryEnable()
|
public override bool TryEnable()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
lock (CorsairUtilities.SDKLock)
|
||||||
{
|
{
|
||||||
CanUse = CanInitializeSdk();
|
CanUse = CanInitializeSdk();
|
||||||
if (CanUse && !CueSDK.IsInitialized)
|
if (CanUse && !CueSDK.IsInitialized)
|
||||||
CueSDK.Initialize(true);
|
CueSDK.Initialize(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
CanUse = false;
|
CanUse = false;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Artemis.DeviceProviders.Corsair.Utilities;
|
||||||
using CUE.NET;
|
using CUE.NET;
|
||||||
using CUE.NET.Brushes;
|
using CUE.NET.Brushes;
|
||||||
using CUE.NET.Devices.Generic.Enums;
|
using CUE.NET.Devices.Generic.Enums;
|
||||||
@ -24,11 +25,14 @@ namespace Artemis.DeviceProviders.Corsair
|
|||||||
public override bool TryEnable()
|
public override bool TryEnable()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
lock (CorsairUtilities.SDKLock)
|
||||||
{
|
{
|
||||||
CanUse = CanInitializeSdk();
|
CanUse = CanInitializeSdk();
|
||||||
if (CanUse && !CueSDK.IsInitialized)
|
if (CanUse && !CueSDK.IsInitialized)
|
||||||
CueSDK.Initialize(true);
|
CueSDK.Initialize(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
CanUse = false;
|
CanUse = false;
|
||||||
|
|||||||
@ -4,9 +4,9 @@ using CUE.NET.Devices.Generic.Enums;
|
|||||||
|
|
||||||
namespace Artemis.DeviceProviders.Corsair.Utilities
|
namespace Artemis.DeviceProviders.Corsair.Utilities
|
||||||
{
|
{
|
||||||
public static class KeyMap
|
public static class CorsairUtilities
|
||||||
{
|
{
|
||||||
static KeyMap()
|
static CorsairUtilities()
|
||||||
{
|
{
|
||||||
FormsKeys = new Dictionary<Keys, CorsairLedId>
|
FormsKeys = new Dictionary<Keys, CorsairLedId>
|
||||||
{
|
{
|
||||||
@ -67,5 +67,6 @@ namespace Artemis.DeviceProviders.Corsair.Utilities
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Dictionary<Keys, CorsairLedId> FormsKeys { get; set; }
|
public static Dictionary<Keys, CorsairLedId> FormsKeys { get; set; }
|
||||||
|
public static object SDKLock { get; set; } = new object();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -53,6 +53,6 @@ using System.Windows;
|
|||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.12.0.0")]
|
[assembly: AssemblyVersion("1.11.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.12.0.0")]
|
[assembly: AssemblyFileVersion("1.11.0.0")]
|
||||||
[assembly: InternalsVisibleTo("Artemis.Explorables")]
|
[assembly: InternalsVisibleTo("Artemis.Explorables")]
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
@ -9,10 +10,12 @@ using Artemis.DAL;
|
|||||||
using Artemis.Services;
|
using Artemis.Services;
|
||||||
using Artemis.Settings;
|
using Artemis.Settings;
|
||||||
using Artemis.Utilities.Memory;
|
using Artemis.Utilities.Memory;
|
||||||
|
using Caliburn.Micro;
|
||||||
using MahApps.Metro.Controls.Dialogs;
|
using MahApps.Metro.Controls.Dialogs;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
using LogManager = NLog.LogManager;
|
||||||
|
|
||||||
namespace Artemis.Utilities
|
namespace Artemis.Utilities
|
||||||
{
|
{
|
||||||
@ -25,12 +28,8 @@ namespace Artemis.Utilities
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dialogService">The dialog service to use for progress and result dialogs</param>
|
/// <param name="dialogService">The dialog service to use for progress and result dialogs</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static async void CheckForUpdate(MetroDialogService dialogService)
|
public static async Task<bool?> CheckForUpdate(MetroDialogService dialogService)
|
||||||
{
|
{
|
||||||
var settings = SettingsProvider.Load<GeneralSettings>();
|
|
||||||
if (!settings.AutoUpdate)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Check GitHub for a new version
|
// Check GitHub for a new version
|
||||||
var jsonClient = new WebClient();
|
var jsonClient = new WebClient();
|
||||||
|
|
||||||
@ -39,14 +38,28 @@ namespace Artemis.Utilities
|
|||||||
|
|
||||||
// Random number to get around cache issues
|
// Random number to get around cache issues
|
||||||
var rand = new Random(DateTime.Now.Millisecond);
|
var rand = new Random(DateTime.Now.Millisecond);
|
||||||
var json = await jsonClient.DownloadStringTaskAsync("https://api.github.com/repos/SpoinkyNL/Artemis/releases/latest?random=" + rand.Next());
|
string json;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
json = await jsonClient.DownloadStringTaskAsync("https://api.github.com/repos/SpoinkyNL/Artemis/releases/latest?random=" + rand.Next());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.Warn(e, "Update check failed.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
var release = JObject.Parse(json);
|
var release = JObject.Parse(json);
|
||||||
var releaseVersion = Version.Parse(release["tag_name"].Value<string>());
|
var releaseVersion = Version.Parse(release["tag_name"].Value<string>());
|
||||||
var currentVersion = Assembly.GetExecutingAssembly().GetName().Version;
|
var currentVersion = Assembly.GetExecutingAssembly().GetName().Version;
|
||||||
|
|
||||||
// if (releaseVersion > currentVersion)
|
if (releaseVersion > currentVersion)
|
||||||
await ShowChanges(dialogService, release);
|
{
|
||||||
|
await Execute.OnUIThreadAsync(async () => await ShowChanges(dialogService, release));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -69,20 +82,31 @@ namespace Artemis.Utilities
|
|||||||
|
|
||||||
// Show a process dialog
|
// Show a process dialog
|
||||||
var dialog = await dialogService.ShowProgressDialog("Applying update", "The new update is being downloaded right now...");
|
var dialog = await dialogService.ShowProgressDialog("Applying update", "The new update is being downloaded right now...");
|
||||||
|
dialog.SetIndeterminate();
|
||||||
// Download the release file, it's the one starting with "artemis-setup"
|
// Download the release file, it's the one starting with "artemis-setup"
|
||||||
// var releaseFile = release["assets"].Children().FirstOrDefault(c => c["name"].Value<string>().StartsWith("artemis-setup"));
|
var releaseFile = release["assets"].Children().FirstOrDefault(c => c["name"].Value<string>().StartsWith("artemis-setup") &&
|
||||||
var releaseFile = release["assets"].Children().FirstOrDefault(c => c["name"].Value<string>().StartsWith("Artemis-1.9.0.1-delta"));
|
c["name"].Value<string>().EndsWith(".exe"));
|
||||||
|
|
||||||
// If there's no matching release it means whoever published the new version fucked up, can't do much about that
|
// If there's no matching release it means whoever published the new version fucked up, can't do much about that
|
||||||
if (releaseFile == null)
|
if (releaseFile == null)
|
||||||
{
|
{
|
||||||
|
await dialog.CloseAsync();
|
||||||
dialogService.ShowMessageBox("Applying update failed", "Couldn't find the update file. Please install the latest version manually, sorry!");
|
dialogService.ShowMessageBox("Applying update failed", "Couldn't find the update file. Please install the latest version manually, sorry!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var downloadClient = new WebClient();
|
var downloadClient = new WebClient();
|
||||||
downloadClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
|
downloadClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
|
||||||
var download = downloadClient.DownloadDataTaskAsync(releaseFile["browser_download_url"].Value<string>());
|
Task<byte[]> download;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
download = downloadClient.DownloadDataTaskAsync(releaseFile["browser_download_url"].Value<string>());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
dialogService.ShowMessageBox("Applying update failed", "We ran into an issue downloaidng the update: \n\n" + e.Message);
|
||||||
|
Logger.Warn(e, "Update check failed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
downloadClient.DownloadProgressChanged += (sender, args) =>
|
downloadClient.DownloadProgressChanged += (sender, args) =>
|
||||||
{
|
{
|
||||||
dialog.SetMessage("The new update is being downloaded right now...\n\n" +
|
dialog.SetMessage("The new update is being downloaded right now...\n\n" +
|
||||||
@ -94,19 +118,31 @@ namespace Artemis.Utilities
|
|||||||
dialog.SetIndeterminate();
|
dialog.SetIndeterminate();
|
||||||
|
|
||||||
// Ensure the update folder exists
|
// Ensure the update folder exists
|
||||||
|
var artemisFolder = AppDomain.CurrentDomain.BaseDirectory.Substring(0, AppDomain.CurrentDomain.BaseDirectory.Length - 1);
|
||||||
var updateFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\Artemis\\updates";
|
var updateFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\Artemis\\updates";
|
||||||
|
var updatePath = updateFolder + "\\" + releaseFile["name"].Value<string>();
|
||||||
if (!Directory.Exists(updateFolder))
|
if (!Directory.Exists(updateFolder))
|
||||||
Directory.CreateDirectory(updateFolder);
|
Directory.CreateDirectory(updateFolder);
|
||||||
|
|
||||||
// Store the bytes
|
// Store the bytes
|
||||||
File.WriteAllBytes(updateFolder + "\\" + releaseFile["name"].Value<string>(), setupBytes);
|
File.WriteAllBytes(updatePath, setupBytes);
|
||||||
// Create a bat file that'll take care of the installation (Artemis gets shut down during install) the bat file will
|
// Create a bat file that'll take care of the installation (Artemis gets shut down during install) the bat file will
|
||||||
// carry forth our legacy (read that in an heroic tone)
|
// carry forth our legacy (read that in an heroic tone)
|
||||||
//ECHO OFF
|
var updateScript = "ECHO OFF\r\n" +
|
||||||
//CLS
|
"CLS\r\n" +
|
||||||
//"C:\Repos\Artemis\Artemis\Artemis.Installer\bin\Release\Artemis.msi" / passive
|
$"\"{updatePath}\" /passive\r\n" +
|
||||||
//cd "C:\Program Files\Artemis"
|
$"cd \"{artemisFolder}\"\r\n" +
|
||||||
//start Artemis.exe
|
"start Artemis.exe --show";
|
||||||
|
File.WriteAllText(updateFolder + "\\updateScript.bat", updateScript);
|
||||||
|
var psi = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = updateFolder + "\\updateScript.bat",
|
||||||
|
Verb = "runas"
|
||||||
|
};
|
||||||
|
|
||||||
|
var process = new System.Diagnostics.Process {StartInfo = psi};
|
||||||
|
process.Start();
|
||||||
|
process.WaitForExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static object ConvertBytesToMegabytes(long bytes)
|
private static object ConvertBytesToMegabytes(long bytes)
|
||||||
|
|||||||
@ -8,6 +8,7 @@ using Artemis.Events;
|
|||||||
using Artemis.Managers;
|
using Artemis.Managers;
|
||||||
using Artemis.Services;
|
using Artemis.Services;
|
||||||
using Artemis.Settings;
|
using Artemis.Settings;
|
||||||
|
using Artemis.Utilities;
|
||||||
using Artemis.Utilities.ActiveWindowDetection;
|
using Artemis.Utilities.ActiveWindowDetection;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
using MahApps.Metro.Controls;
|
using MahApps.Metro.Controls;
|
||||||
@ -20,15 +21,17 @@ namespace Artemis.ViewModels.Flyouts
|
|||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly WindowService _windowService;
|
private readonly WindowService _windowService;
|
||||||
|
private readonly MetroDialogService _metroDialogService;
|
||||||
private string _activeEffectName;
|
private string _activeEffectName;
|
||||||
private bool _enableDebug;
|
private bool _enableDebug;
|
||||||
private GeneralSettings _generalSettings;
|
private GeneralSettings _generalSettings;
|
||||||
private string _selectedKeyboardProvider;
|
private string _selectedKeyboardProvider;
|
||||||
|
|
||||||
public FlyoutSettingsViewModel(MainManager mainManager, ILogger logger, WindowService windowService)
|
public FlyoutSettingsViewModel(MainManager mainManager, ILogger logger, WindowService windowService, MetroDialogService metroDialogService)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_windowService = windowService;
|
_windowService = windowService;
|
||||||
|
_metroDialogService = metroDialogService;
|
||||||
|
|
||||||
MainManager = mainManager;
|
MainManager = mainManager;
|
||||||
Header = "Settings";
|
Header = "Settings";
|
||||||
@ -244,6 +247,21 @@ namespace Artemis.ViewModels.Flyouts
|
|||||||
GeneralSettings.Save();
|
GeneralSettings.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async void CheckForUpdate()
|
||||||
|
{
|
||||||
|
var update = await Updater.CheckForUpdate(_metroDialogService);
|
||||||
|
if (update == null)
|
||||||
|
{
|
||||||
|
_metroDialogService.ShowMessageBox("Update check failed",
|
||||||
|
"Couldn't perform the update check, please check your internet connection and try again." +
|
||||||
|
"You can also perform a manual update by downloading and installing the latest version from GitHub");
|
||||||
|
}
|
||||||
|
else if (!update.Value)
|
||||||
|
{
|
||||||
|
_metroDialogService.ShowMessageBox("No update available", "You're running the latest version of Artemis.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void NavigateTo(string url)
|
public void NavigateTo(string url)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start(new ProcessStartInfo(url));
|
System.Diagnostics.Process.Start(new ProcessStartInfo(url));
|
||||||
|
|||||||
@ -20,15 +20,15 @@ namespace Artemis.ViewModels
|
|||||||
{
|
{
|
||||||
private readonly IKernel _kernel;
|
private readonly IKernel _kernel;
|
||||||
private string _activeIcon;
|
private string _activeIcon;
|
||||||
private bool _checked;
|
private bool _checkedForDuplicate;
|
||||||
private bool _enabled;
|
private bool _enabled;
|
||||||
private bool _exiting;
|
private bool _exiting;
|
||||||
private string _toggleText;
|
private string _toggleText;
|
||||||
|
|
||||||
public ShellViewModel(IKernel kernel, MainManager mainManager, MetroDialogService metroDialogService,
|
public ShellViewModel(IKernel kernel, MainManager mainManager, MetroDialogService metroDialogService, FlyoutSettingsViewModel flyoutSettings)
|
||||||
FlyoutSettingsViewModel flyoutSettings)
|
|
||||||
{
|
{
|
||||||
_kernel = kernel;
|
_kernel = kernel;
|
||||||
|
var checkedForUpdate = false;
|
||||||
|
|
||||||
MainManager = mainManager;
|
MainManager = mainManager;
|
||||||
MetroDialogService = metroDialogService;
|
MetroDialogService = metroDialogService;
|
||||||
@ -41,7 +41,17 @@ namespace Artemis.ViewModels
|
|||||||
flyoutSettings
|
flyoutSettings
|
||||||
};
|
};
|
||||||
|
|
||||||
MainManager.EnabledChanged += (sender, args) => Enabled = args.Enabled;
|
MainManager.EnabledChanged += (sender, args) =>
|
||||||
|
{
|
||||||
|
Enabled = args.Enabled;
|
||||||
|
// Check for updates once if auto update is enabled and the window is shown
|
||||||
|
if (GeneralSettings.AutoUpdate && !checkedForUpdate && CanHideWindow)
|
||||||
|
{
|
||||||
|
checkedForUpdate = true;
|
||||||
|
Updater.CheckForUpdate(MetroDialogService);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// This gets updated automatically but during startup lets quickly preset it
|
// This gets updated automatically but during startup lets quickly preset it
|
||||||
Enabled = GeneralSettings.Suspended;
|
Enabled = GeneralSettings.Suspended;
|
||||||
@ -106,7 +116,7 @@ namespace Artemis.ViewModels
|
|||||||
// TODO: This is probably an awful idea. I can't reliably hook into the view being ready to be hidden
|
// TODO: This is probably an awful idea. I can't reliably hook into the view being ready to be hidden
|
||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
|
|
||||||
if (GeneralSettings.ShowOnStartup)
|
if (GeneralSettings.ShowOnStartup || Environment.GetCommandLineArgs().Contains("--show"))
|
||||||
ShowWindow();
|
ShowWindow();
|
||||||
else
|
else
|
||||||
HideWindow();
|
HideWindow();
|
||||||
@ -129,20 +139,17 @@ namespace Artemis.ViewModels
|
|||||||
public void ShowWindow()
|
public void ShowWindow()
|
||||||
{
|
{
|
||||||
if (CanShowWindow)
|
if (CanShowWindow)
|
||||||
{
|
|
||||||
Window?.Dispatcher.Invoke(() =>
|
Window?.Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
Window.Show();
|
Window.Show();
|
||||||
Window.Activate();
|
Window.Activate();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
GeneralSettings.ApplyTheme();
|
GeneralSettings.ApplyTheme();
|
||||||
|
|
||||||
// Show certain dialogs if needed
|
// Show certain dialogs if needed
|
||||||
CheckKeyboardState();
|
CheckKeyboardState();
|
||||||
CheckDuplicateInstances();
|
CheckDuplicateInstances();
|
||||||
Updater.CheckForUpdate(MetroDialogService);
|
|
||||||
|
|
||||||
// Run this on the UI thread to avoid having to use dispatchers in VMs
|
// Run this on the UI thread to avoid having to use dispatchers in VMs
|
||||||
Execute.OnUIThread(ActivateViews);
|
Execute.OnUIThread(ActivateViews);
|
||||||
@ -237,12 +244,11 @@ namespace Artemis.ViewModels
|
|||||||
|
|
||||||
private void CheckDuplicateInstances()
|
private void CheckDuplicateInstances()
|
||||||
{
|
{
|
||||||
if (_checked)
|
if (_checkedForDuplicate)
|
||||||
return;
|
return;
|
||||||
_checked = true;
|
_checkedForDuplicate = true;
|
||||||
|
|
||||||
bool aIsNewInstance;
|
Mutex = new Mutex(true, "ArtemisMutex", out var aIsNewInstance);
|
||||||
Mutex = new Mutex(true, "ArtemisMutex", out aIsNewInstance);
|
|
||||||
if (aIsNewInstance)
|
if (aIsNewInstance)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
@ -122,9 +123,12 @@
|
|||||||
<Button Grid.Row="12" Grid.Column="1" Margin="11" x:Name="SaveSettings" Content="Save changes"
|
<Button Grid.Row="12" Grid.Column="1" Margin="11" x:Name="SaveSettings" Content="Save changes"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Right" Width="100"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Width="100"
|
||||||
Style="{DynamicResource SquareButtonStyle}" />
|
Style="{DynamicResource SquareButtonStyle}" />
|
||||||
|
<Button Grid.Row="13" Grid.Column="0" Margin="10" x:Name="CheckForUpdate" Content="Check for update"
|
||||||
|
VerticalAlignment="Center" HorizontalAlignment="Left" Width="100"
|
||||||
|
Style="{DynamicResource SquareButtonStyle}" />
|
||||||
|
|
||||||
<!-- Version -->
|
<!-- Version -->
|
||||||
<Grid Grid.Row="13" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom">
|
<Grid Grid.Row="14" Grid.Column="0" Grid.ColumnSpan="2" Margin="10" VerticalAlignment="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user