Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ branch:  streamtuner2


Check-in [93eb14b5ef]

Overview
Comment:Use $t.found
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 93eb14b5ef673f1dc11b04fbb17ba0529ec94299
User & Date: mario on 2016-12-11 17:19:14
Other Links: manifest | tags
Context
2016-12-11
19:16
Update manual .chm version check-in: 697f62158c user: mario tags: trunk
17:19
Use $t.found check-in: 93eb14b5ef user: mario tags: trunk
17:11
Colorize statusbar hint about config reset / save. check-in: c98c1aca39 user: mario tags: trunk
Changes

Modified dev/install_python_gtk.ps1 from [a13bf52e4a] to [e1ab50fb3b].

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
    title  = "Streamripper 1.64.6"
    url    = "https://netcologne.dl.sourceforge.net/project/streamripper/streamripper%20%28current%29/1.64.6/streamripper-windows-installer-1.64.6.exe"
    cmd    = ""
    iargs   = "/S  /D={STREAMRIPPER}"  #NSIS does not use double quotes in /D parm
    regkey = "$regPathLM\Streamripper"
    testpth= "{STREAMRIPPER}\streamripper.exe"
    is_opt = '($optionalInstall)'     # ← could use '((Ask "Install streamripper too [y/N]") -match N)' instead
    prescn = 'if ($optionalInstall) {if ($_found = (Get-ITPV "Streamripper")) {$STREAMRIPPER = $_found}} else {$STREAMRIPPER=""; continue;}'
  },
  @{
    title  = "Uninstall script"
    cmd    = 'Create-Uninstallscript'
  },
  @{
    title  = "Desktop shortcut"







|







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
    title  = "Streamripper 1.64.6"
    url    = "https://netcologne.dl.sourceforge.net/project/streamripper/streamripper%20%28current%29/1.64.6/streamripper-windows-installer-1.64.6.exe"
    cmd    = ""
    iargs   = "/S  /D={STREAMRIPPER}"  #NSIS does not use double quotes in /D parm
    regkey = "$regPathLM\Streamripper"
    testpth= "{STREAMRIPPER}\streamripper.exe"
    is_opt = '($optionalInstall)'     # ← could use '((Ask "Install streamripper too [y/N]") -match N)' instead
    prescn = 'if ($optionalInstall) {if ($t.found = (Get-ITPV "Streamripper")) {$STREAMRIPPER = $_found}} else {$STREAMRIPPER=""; continue;}'
  },
  @{
    title  = "Uninstall script"
    cmd    = 'Create-Uninstallscript'
  },
  @{
    title  = "Desktop shortcut"
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
        $host.UI.RawUI.set_bufferSize($MyBuffer)
        $host.UI.RawUI.set_windowSize($MyWindow)
    }
}

#-- create Desktop/Startmenu shortcuts
function Make-Shortcut {
    param($dir, $name, $target, $arg=$false, $parm=$false)
    if (!(Test-Path -Path $dir)) {
        New-Item -Path $dir -ItemType directory > $null
    }
    $wsh = New-Object -ComObject WScript.Shell
    if (!$wsh) { return }
    $lnk = $wsh.CreateShortcut("$dir\$name")
    $lnk.TargetPath = $target







|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
        $host.UI.RawUI.set_bufferSize($MyBuffer)
        $host.UI.RawUI.set_windowSize($MyWindow)
    }
}

#-- create Desktop/Startmenu shortcuts
function Make-Shortcut {
    param($dir, $name, $target, $arg=$false, $parm=$false, [parameter(ValueFromRemainingArguments=$true)]$kwargs=0)
    if (!(Test-Path -Path $dir)) {
        New-Item -Path $dir -ItemType directory > $null
    }
    $wsh = New-Object -ComObject WScript.Shell
    if (!$wsh) { return }
    $lnk = $wsh.CreateShortcut("$dir\$name")
    $lnk.TargetPath = $target
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
    ForEach ($t in $tasks) {
        $t.found = 0
        $t.testpth = $t.testpth -replace "{PYTHON}","$PYTHON"
        if (!$t.regkey -and !$t.testpth) {
            continue
        }
        if ($t.prescn) {  # expression for e.g. registry → path lookup
            Invoke-Expression $t.prescn  # should set $_found + global $PLACEHOLDER variable
        }
        elseif ($t.testpth) {
            if (Test-Path $t.testpth) {
                $t.found = $t.testpth
            }
            elseif ($t.regkey -and (Test-Path $t.regkey)) {
                $t.found = "installer/registry"







|







323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
    ForEach ($t in $tasks) {
        $t.found = 0
        $t.testpth = $t.testpth -replace "{PYTHON}","$PYTHON"
        if (!$t.regkey -and !$t.testpth) {
            continue
        }
        if ($t.prescn) {  # expression for e.g. registry → path lookup
            Invoke-Expression $t.prescn  # should set $.found + global $PLACEHOLDER variable
        }
        elseif ($t.testpth) {
            if (Test-Path $t.testpth) {
                $t.found = $t.testpth
            }
            elseif ($t.regkey -and (Test-Path $t.regkey)) {
                $t.found = "installer/registry"
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
        Start-Process -Wait msiexec -ArgumentList /i,"$TEMP\$file", $iargs
        if ($regkey) {
            Set-ItemProperty -Path "$regkey" -Name "WindowsInstaller"  -Value "0"
        }
    }
    # exe
    elseif ($file -match ".+.exe$") {
        Write-Host -f DarkGray " → $file $iargs"
        if ($iargs) {
            Start-Process -Wait "$TEMP\$file" -ArgumentList $iargs
        }
        else {
            Start-Process -Wait "$TEMP\$file"
        }
    }







|







429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
        Start-Process -Wait msiexec -ArgumentList /i,"$TEMP\$file", $iargs
        if ($regkey) {
            Set-ItemProperty -Path "$regkey" -Name "WindowsInstaller"  -Value "0"
        }
    }
    # exe
    elseif ($file -match ".+.exe$") {
        write-host -f DarkGray " → $file $iargs"
        if ($iargs) {
            Start-Process -Wait "$TEMP\$file" -ArgumentList $iargs
        }
        else {
            Start-Process -Wait "$TEMP\$file"
        }
    }