Skip to content

Commit 59c62cb

Browse files
committed
- Fixed a bug where YCRUNCHER_OLD did not load all selected tests
- Also added a dedicated error message if trying to run the new y-Cruncher with the 00-x86 test mode
1 parent 9bf1cf3 commit 59c62cb

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

script-corecycler.ps1

+31-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.AUTHOR
33
sp00n
44
.VERSION
5-
0.9.5.2
5+
0.9.5.3
66
.DESCRIPTION
77
Sets the affinity of the selected stress test program process to only one core and cycles through
88
all the cores to test the stability of a Curve Optimizer setting
@@ -22,7 +22,7 @@ Set-StrictMode -Version 3.0
2222

2323

2424
# Our current version
25-
$version = '0.9.5.2'
25+
$version = '0.9.5.3'
2626

2727

2828
# Set the window title
@@ -2782,9 +2782,22 @@ function Import-Settings {
27822782
}
27832783

27842784
# The possible y-Cruncher test values
2785+
# Depends on the version of y-Cruncher the user has selected
2786+
# Hopefully we already have the [General] section parsed
27852787
$possibleTests = $stressTestPrograms.ycruncher.availableTests
27862788
$selectedTests = @()
27872789

2790+
if ($ini['General']['stressTestProgram']) {
2791+
if ($ini['General']['stressTestProgram'] -eq 'ycruncher_old') {
2792+
$possibleTests = $stressTestPrograms.ycruncher_old.availableTests
2793+
}
2794+
}
2795+
2796+
# The setting is not available yet, merge both available tests
2797+
else {
2798+
$possibleTests = @($possibleTests + $stressTestPrograms.ycruncher_old.availableTests) | Sort-Object | Get-Unique
2799+
}
2800+
27882801
# Filter for only the possible test values
27892802
$thisSetting | ForEach-Object {
27902803
if ($possibleTests.Contains($_.ToUpperInvariant())) {
@@ -5060,11 +5073,26 @@ function Initialize-yCruncher {
50605073
Write-Verbose($binaryWithPathToRun)
50615074

50625075
if (!(Test-Path ($binaryWithPathToRun) -PathType Leaf)) {
5076+
# Add a special error message if trying to run 00-x86 for the newer y-Cruncher versions
5077+
if (!$isYCruncherOld -and $binaryToRun -eq '00-x86.exe') {
5078+
Write-ColorText('FATAL ERROR: Invalid "mode" setting detected!') Red
5079+
Write-ColorText('Trying to run "00-x86", but y-Cruncher doesn''t support this anymore!') Red
5080+
Write-ColorText('To be able to use "00-x86", you will need to select "YCRUNCHER_OLD" as the stress test.') Red
5081+
Write-ColorText('The newer versions of y-Cruncher do not support this mode anymore.') Red
5082+
Write-ColorText('The new minimum "mode" is now "04-P4P" instead.') Red
5083+
Write-Text('')
5084+
Write-ColorText('You will also need to adjust the "tests" setting accordingly, as these have changed as well.') Red
5085+
Write-ColorText('See the comments in the config file for a more detailed explanation.') Red
5086+
Exit-WithFatalError
5087+
}
5088+
5089+
5090+
# Regular error, when a binary wasn't found
50635091
Write-ColorText('FATAL ERROR: Could not find y-Cruncher!') Red
50645092
Write-ColorText(' Trying to run "' + $binaryWithPathToRun + '"') Red
50655093
Write-ColorText('Make sure to download and extract y-Cruncher into the following directory:') Red
50665094
Write-ColorText($stressTestPrograms[$settings.General.stressTestProgram]['absoluteInstallPath']) Yellow
5067-
Write-Text ''
5095+
Write-Text('')
50685096
Write-ColorText('You can download y-Cruncher from:') Red
50695097
Write-ColorText('http://www.numberworld.org/y-cruncher/#Download') Cyan
50705098
Exit-WithFatalError

0 commit comments

Comments
 (0)