From 681c1bddcbe232ec65535265aeeac0de2628179c Mon Sep 17 00:00:00 2001 From: Samsonov Date: Wed, 27 Jun 2018 08:21:06 +0300 Subject: [PATCH] revert back check win10 --- Miners/xmr-stak-245.ps1 | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/Miners/xmr-stak-245.ps1 b/Miners/xmr-stak-245.ps1 index e9d0864b..0d792ce9 100644 --- a/Miners/xmr-stak-245.ps1 +++ b/Miners/xmr-stak-245.ps1 @@ -6,6 +6,7 @@ License GPL-3.0 . .\Code\Include.ps1 if (![Config]::Is64Bit) { exit } +if ([Environment]::OSVersion.Version -lt [Version]::new(10, 0)) { exit } function Save-BaseConfig([string] $path) { $nl = [Environment]::NewLine @@ -28,8 +29,6 @@ function Save-BaseConfig([string] $path) { Out-File "$path\config.txt" -Force -Encoding ascii } -#if ([Config]::ActiveTypes -notcontains [eMinerType]::nVidia -and [Config]::ActiveTypes -notcontains [eMinerType]::AMD) { exit } - $Name = (Get-Item $script:MyInvocation.MyCommand.Path).BaseName $Dir = [IO.Path]::Combine([Config]::BinLocation, $Name) @@ -69,25 +68,23 @@ $Cfg.Algorithms | ForEach-Object { $usenicehash = "--use-nicehash" } $extrargs = Get-Join " " @($Cfg.ExtraArgs, $_.ExtraArgs) - if ([Environment]::OSVersion.Version -ge [Version]::new(10, 0)) { - [MinerInfo]@{ - Pool = $Pool.PoolName() - PoolKey = $Pool.PoolKey() - Name = $Name - Algorithm = $Algo - Type = [eMinerType]::CPU - TypeInKey = $true - API = "xmr-stak" - URI = $url - Path = "$Name\xmr-stak.exe" - ExtraArgs = $extrargs - Arguments = "--currency $($_.Algorithm) -o $($Pool.Host):$($Pool.PortUnsecure) -u $($Pool.User) -p $($Pool.Password) -r --noUAC --noAMD --noNVIDIA $usenicehash -i 9995 $extrargs" - Port = 9995 - BenchmarkSeconds = if ($_.BenchmarkSeconds) { $_.BenchmarkSeconds } else { $Cfg.BenchmarkSeconds } - RunBefore = $_.RunBefore - RunAfter = $_.RunAfter - Fee = 2 - } + [MinerInfo]@{ + Pool = $Pool.PoolName() + PoolKey = $Pool.PoolKey() + Name = $Name + Algorithm = $Algo + Type = [eMinerType]::CPU + TypeInKey = $true + API = "xmr-stak" + URI = $url + Path = "$Name\xmr-stak.exe" + ExtraArgs = $extrargs + Arguments = "--currency $($_.Algorithm) -o $($Pool.Host):$($Pool.PortUnsecure) -u $($Pool.User) -p $($Pool.Password) -r --noUAC --noAMD --noNVIDIA $usenicehash -i 9995 $extrargs" + Port = 9995 + BenchmarkSeconds = if ($_.BenchmarkSeconds) { $_.BenchmarkSeconds } else { $Cfg.BenchmarkSeconds } + RunBefore = $_.RunBefore + RunAfter = $_.RunAfter + Fee = 2 } [MinerInfo]@{ Pool = $Pool.PoolName()