Compare commits

...

6 Commits
v1.13 ... v1.17

Author SHA1 Message Date
Pete Batard
e0c1015ade Add Windows 10 20H2 19042.508 builds 2020-10-21 14:58:08 +01:00
Pete Batard
46c399ecd7 Add Windows 10 20H1 19041.264 builds
* Also enable going back on error
2020-05-27 22:13:51 +01:00
Pete Batard
445ca5c074 Merge pull request #13 from pbatard/whitesource/configure
Configure WhiteSource Bolt for GitHub
2020-04-14 18:09:08 +01:00
whitesource-bolt-for-github[bot]
037cd1ad9b Add .whitesource configuration file 2020-04-14 17:08:12 +00:00
Pete Batard
aa378cad13 Fix handling of ' ' in product name
* Some locales (e.g. Russian) will return something like "Windows 10"
  for the product name which threw our JSON conversion off
* Also fix a typo
* Closes #12
2019-11-23 21:52:04 +00:00
Pete Batard
3c4fafa207 Add Windows 10 19H2 18363.418 builds 2019-11-12 22:57:50 +00:00
2 changed files with 41 additions and 19 deletions

8
.whitesource Normal file
View File

@@ -0,0 +1,8 @@
{
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}

View File

@@ -1,6 +1,6 @@
# #
# Fido v1.13 - Retail Windows ISO Downloader # Fido v1.17 - Retail Windows ISO Downloader
# Copyright © 2019 Pete Batard <pete@akeo.ie> # Copyright © 2019-2020 Pete Batard <pete@akeo.ie>
# ConvertTo-ImageSource: Copyright © 2016 Chris Carter # ConvertTo-ImageSource: Copyright © 2016 Chris Carter
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@@ -75,6 +75,24 @@ $ko = 0x20000
$WindowsVersions = @( $WindowsVersions = @(
@( @(
@("Windows 10", "Windows10ISO"), @("Windows 10", "Windows10ISO"),
@(
"20H2 (Build 19042.508 - 2020.10)",
@("Windows 10 Home/Pro", 1807),
@("Windows 10 Education", 1805),
@("Windows 10 Home China ", ($zh + 1806))
),
@(
"20H1 (Build 19041.264 - 2020.05)",
@("Windows 10 Home/Pro", 1626),
@("Windows 10 Education", 1625),
@("Windows 10 Home China ", ($zh + 1627))
),
@(
"19H2 (Build 18363.418 - 2019.11)",
@("Windows 10 Home/Pro", 1429),
@("Windows 10 Education", 1431),
@("Windows 10 Home China ", ($zh + 1430))
),
@( @(
"19H1 (Build 18362.356 - 2019.09)", "19H1 (Build 18362.356 - 2019.09)",
@("Windows 10 Home/Pro", 1384), @("Windows 10 Home/Pro", 1384),
@@ -204,10 +222,10 @@ function Select-Language([string]$LangName)
($SysLocale.StartsWith("da") -and $LangName -like "*Danish*") -or ` ($SysLocale.StartsWith("da") -and $LangName -like "*Danish*") -or `
($SysLocale.StartsWith("nl") -and $LangName -like "*Dutch*") -or ` ($SysLocale.StartsWith("nl") -and $LangName -like "*Dutch*") -or `
($SysLocale -eq "en-US" -and $LangName -eq "English") -or ` ($SysLocale -eq "en-US" -and $LangName -eq "English") -or `
($SysLocale.StartsWith("en") -and $LangName -like "*English*" -and $LangName -like "*inter*") -or ` ($SysLocale.StartsWith("en") -and $LangName -like "*English*" -and ($LangName -like "*inter*" -or $LangName -like "*ingdom*")) -or `
($SysLocale.StartsWith("et") -and $LangName -like "*Eston*") -or ` ($SysLocale.StartsWith("et") -and $LangName -like "*Eston*") -or `
($SysLocale.StartsWith("fi") -and $LangName -like "*Finn*") -or ` ($SysLocale.StartsWith("fi") -and $LangName -like "*Finn*") -or `
($SysLocale -eq "fr-CA" -and $LangName -like "*French*" -and $LangName -like "*Canad*") -or ` ($SysLocale -eq "fr-CA" -and $LangName -like "*French*" -and $LangName -like "*Canad*") -or `
($SysLocale.StartsWith("fr") -and $LangName -eq "French") -or ` ($SysLocale.StartsWith("fr") -and $LangName -eq "French") -or `
($SysLocale.StartsWith("de") -and $LangName -like "*German*") -or ` ($SysLocale.StartsWith("de") -and $LangName -like "*German*") -or `
($SysLocale.StartsWith("el") -and $LangName -like "*Greek*") -or ` ($SysLocale.StartsWith("el") -and $LangName -like "*Greek*") -or `
@@ -379,12 +397,9 @@ function Error([string]$ErrorMessage)
Write-Host Error: $ErrorMessage Write-Host Error: $ErrorMessage
$XMLForm.Title = $(Get-Translation("Error")) + ": " + $ErrorMessage $XMLForm.Title = $(Get-Translation("Error")) + ": " + $ErrorMessage
Refresh-Control($XMLForm) Refresh-Control($XMLForm)
$Continue.Content = Get-Translation("Close") $XMLGrid.Children[2 * $script:Stage + 1].IsEnabled = $True
Refresh-Control($Continue)
$UserInput = [System.Windows.MessageBox]::Show($XMLForm.Title, $(Get-Translation("Error")), "OK", "Error") $UserInput = [System.Windows.MessageBox]::Show($XMLForm.Title, $(Get-Translation("Error")), "OK", "Error")
$script:ExitCode = $Stage $script:ExitCode = $script:Stage--
$script:Stage = -1
$Continue.IsEnabled = $True
} }
function Get-RandomDate() function Get-RandomDate()
@@ -502,11 +517,7 @@ $WindowsVersion.DisplayMemberPath = "Version"
# Button Action # Button Action
$Continue.add_click({ $Continue.add_click({
if ($script:Stage++ -lt 0) { $script:Stage++
Get-Process -Id $pid | Foreach-Object { $_.CloseMainWindow() | Out-Null }
return
}
$XMLGrid.Children[2 * $Stage + 1].IsEnabled = $False $XMLGrid.Children[2 * $Stage + 1].IsEnabled = $False
$Continue.IsEnabled = $False $Continue.IsEnabled = $False
$Back.IsEnabled = $False $Back.IsEnabled = $False
@@ -596,7 +607,7 @@ $Continue.add_click({
} }
} catch { } catch {
Error($_.Exception.Message) Error($_.Exception.Message)
return break
} }
$script:Language = Add-Entry $Stage "Language" $array "DisplayLanguage" $script:Language = Add-Entry $Stage "Language" $array "DisplayLanguage"
$Language.SelectedIndex = $SelectedIndex $Language.SelectedIndex = $SelectedIndex
@@ -631,6 +642,7 @@ $Continue.add_click({
$html = $html.Replace("class=product-download-hidden", "") $html = $html.Replace("class=product-download-hidden", "")
$html = $html.Replace("type=hidden", "") $html = $html.Replace("type=hidden", "")
$html = $html.Replace(">", "/>") $html = $html.Replace(">", "/>")
$html = $html.Replace("&nbsp;", " ")
$html = $html.Replace("IsoX86", """x86""") $html = $html.Replace("IsoX86", """x86""")
$html = $html.Replace("IsoX64", """x64""") $html = $html.Replace("IsoX64", """x64""")
$html = "<inputs>" + $html + "</inputs>" $html = "<inputs>" + $html + "</inputs>"
@@ -646,11 +658,11 @@ $Continue.add_click({
} }
} }
if ($array.Length -eq 0) { if ($array.Length -eq 0) {
Throw-Error -Req $r -Alt "Could not retreive ISO download links" Throw-Error -Req $r -Alt "Could not retrieve ISO download links"
} }
} catch { } catch {
Error($_.Exception.Message) Error($_.Exception.Message)
return break
} }
$script:Arch = Add-Entry $Stage "Architecture" $array "Type" $script:Arch = Add-Entry $Stage "Architecture" $array "Type"
@@ -687,7 +699,7 @@ $Continue.add_click({
} }
$Continue.IsEnabled = $True $Continue.IsEnabled = $True
if ($Stage -ge 0) { if ($Stage -ge 0) {
$Back.IsEnabled = $True; $Back.IsEnabled = $True
} }
}) })
@@ -711,10 +723,12 @@ $Back.add_click({
$Margin.Top -= $dh2 $Margin.Top -= $dh2
$Back.Margin = $Margin $Back.Margin = $Margin
$script:Stage = $Stage - 1 $script:Stage = $Stage - 1
$XMLForm.Title = $AppTitle
if ($Stage -eq 0) { if ($Stage -eq 0) {
$Back.Content = Get-Translation("Close") $Back.Content = Get-Translation("Close")
} elseif ($Stage -eq 3) { } else {
$Continue.Content = Get-Translation("Continue") $Continue.Content = Get-Translation("Continue")
Refresh-Control($Continue)
} }
} }
}) })