-
Notifications
You must be signed in to change notification settings - Fork 0
/
launcher.ps1
39 lines (35 loc) · 1.18 KB
/
launcher.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Check main executable
if (!(Test-Path '.\sudoku.exe')) {
Write-Error 'sudoku.exe cannot be found.'
Exit 1
}
# Check configuration file
if (!(Test-Path '.\defaults.ini')) {
Write-Warning 'Configuration file not found; creating a default file'
(
'interactive = FALSE',
'verbose = TRUE',
'theme = Plain',
'',
'; Option values are case-insensitive',
'',
'; interactive',
'; --------------------------------------------------------------',
'; DEFAULT FALSE - ACCEPTS TRUE/FALSE',
'; Pause after each iteration with cell modified',
'',
'; verbose',
'; --------------------------------------------------------------',
'; DEFAULT TRUE - ACCEPTS TRUE/FALSE',
'; Whether or not output each step to Sudoku_Steps_xxxxxxxxx.txt',
'',
'; theme',
'; --------------------------------------------------------------',
'; DEFAULT Plain - ACCEPTS Plain',
'; Themes may be added by changing ioGrid.pas and rebuilding',
''
) | Out-File '.\defaults.ini' -Encoding ASCII
}
Write-Host
Write-Host 'Starting sudoku'
& .\sudoku.exe