diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2019-06-17 22:04:33 +0300 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2019-06-17 22:04:33 +0300 |
| commit | d25f2a4358076b3d7c569e3dc26aabd0ffdd4156 (patch) | |
| tree | 51bf3957cceb95ac3a266a87472df80865bf82d9 | |
| download | portablepython-d25f2a4358076b3d7c569e3dc26aabd0ffdd4156.tar.gz portablepython-d25f2a4358076b3d7c569e3dc26aabd0ffdd4156.zip | |
Initial commit
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | download.ps1 | 34 | ||||
| -rw-r--r-- | unattend.xml.in | 9 |
3 files changed, 45 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..86d03ca --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.log +Python-*/ diff --git a/download.ps1 b/download.ps1 new file mode 100644 index 0000000..b77b8f5 --- /dev/null +++ b/download.ps1 @@ -0,0 +1,34 @@ +# https://www.python.org/ftp/python/3.7.3/python-3.7.3-amd64.exe +# https://www.python.org/ftp/python/3.7.3/python-3.7.3.exe +# https://www.python.org/ftp/python/3.5.1/python-3.5.1-amd64.exe.asc + +# https://www.python.org/ftp/python/3.5.1/python-3.5.1-amd64.exe +# https://www.python.org/ftp/python/3.5.1/python-3.5.1.exe +# https://www.python.org/ftp/python/3.5.1/python-3.5.1.exe.asc + +if ($env:PYARCH -eq "amd64") { + $filename = "python-${env:PYVERSION}-amd64.exe" + $arch = "64" +} else { + $filename = "python-${env:PYVERSION}.exe" + $arch = "32" +} + +$url = "https://www.python.org/ftp/python/${env:PYVERSION}/${filename}" +$target = $PSScriptRoot + "\" + $filename +$targetdir = $PSScriptRoot + "\Python-${env:PYVERSION}-${arch}" +$logfile = $PSScriptRoot + "\install.log" + +Write-Output "URL: $url" +Write-Output "Target: $target" +Write-Output "Target dir: $targetdir" +Write-Output "Log file: $logfile" + +# $client = New-Object System.Net.WebClient +# $client.DownloadFile($url, $target) + +# ((Get-Content -path unattend.xml.in -raw) -replace 'TARGET_DIR',$targetdir) | Set-Content -path unattend.xml + +# & "$target" /quiet /log "$logfile" + +Start-Process -FilePath "$target" -ArgumentList "/quiet","/log","$logfile" -Wait diff --git a/unattend.xml.in b/unattend.xml.in new file mode 100644 index 0000000..0bd0265 --- /dev/null +++ b/unattend.xml.in @@ -0,0 +1,9 @@ +<Options> + <Option Name="InstallAllUsers" Value="0" /> + <Option Name="TargetDir" Value="TARGET_DIR" /> + <Option Name="AssociateFiles" Value="0" /> + <Option Name="Shortcuts" Value="0" /> + <Option Name="Include_launcher" Value="0" /> + <Option Name="InstallLauncherAllUsers" Value="0" /> + <Option Name="Include_test" Value="0" /> +</Options> |
