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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [fb1512484e]

Overview
Comment:Minor fixes to Win installer/uninstall, regarding background color, and streamripper detection.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fb1512484e31e2cf6ba41870e8116d69cfb7fc62
User & Date: Oliver on 2016-12-18 20:34:33
Other Links: manifest | tags
Context
2016-12-19
20:16
Bump version check-in: c068cc2c89 user: Oliver tags: trunk
2016-12-18
20:34
Minor fixes to Win installer/uninstall, regarding background color, and streamripper detection. check-in: fb1512484e user: Oliver tags: trunk
20:32
os.access(gtk_dir, os.W_OK) in installhandler() not working on Windows (10). Incorrectly returns true for ProgramFiles paths, thus dll copying failed. Finally more cleanup code to remove the zip file, as well as dll - after successful extraction. → clear_theme() and clear_dll() are the new corresponding functions. check-in: 0ef1977fd2 user: Oliver tags: trunk
Changes

Modified dev/install_python_gtk.ps1 from [d1faae1ee5] to [864d0e4d45].

167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
|                                                                             |
|    Installer for Python 2.7.12 & Gtk 2.24.2                                 |
 ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– 
"@
}
function Ask-First {
    Write-Host ""
    if ((Ask "Do you want install Streamtuner2 and its Python dependencies now? [Y/n] ") -notmatch "^[yY]|^$") {
        #$tasks = $tasks[7..($tasks.length-1)]; return 0,0
        exit
    }
    $reuseCachedFiles = (Ask "Reuse any cached setup files or ignore them? [r/I] ") -match "^[Rr]"
    $optionalInstall =  (Ask "Install optional components? [y/N] ") -match "^[Yy]"
    Write-Host ""
    return $reuseCachedFiles, $optionalInstall
}

function Console-MaxHeight {
    if ($Host.Name -match "console") {
        $MaxHeight = $host.UI.RawUI.MaxPhysicalWindowSize.Height
        $MaxWidth = $host.UI.RawUI.MaxPhysicalWindowSize.Width
        $MyBuffer = $Host.UI.RawUI.BufferSize
        $MyWindow = $Host.UI.RawUI.WindowSize
        $MyWindow.Height = ($MaxHeight)
        $MyWindow.Width = (80)
        $MyBuffer.Height = (9999)
        #$MyBuffer.Width = (80)

        $host.UI.RawUI.set_bufferSize($MyBuffer)
        $host.UI.RawUI.set_windowSize($MyWindow)
        $host.ui.RawUI.BackgroundColor = ($bckgrnd = 'Black')
    }
}

#-- 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)) {







|



















>


<







167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
|                                                                             |
|    Installer for Python 2.7.12 & Gtk 2.24.2                                 |
 ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– 
"@
}
function Ask-First {
    Write-Host ""
    if ((Ask "Do you want to install Streamtuner2 and its Python dependencies now? [Y/n] ") -notmatch "^[yY]|^$") {
        #$tasks = $tasks[7..($tasks.length-1)]; return 0,0
        exit
    }
    $reuseCachedFiles = (Ask "Reuse any cached setup files or ignore them? [r/I] ") -match "^[Rr]"
    $optionalInstall =  (Ask "Install optional components? [y/N] ") -match "^[Yy]"
    Write-Host ""
    return $reuseCachedFiles, $optionalInstall
}

function Console-MaxHeight {
    if ($Host.Name -match "console") {
        $MaxHeight = $host.UI.RawUI.MaxPhysicalWindowSize.Height
        $MaxWidth = $host.UI.RawUI.MaxPhysicalWindowSize.Width
        $MyBuffer = $Host.UI.RawUI.BufferSize
        $MyWindow = $Host.UI.RawUI.WindowSize
        $MyWindow.Height = ($MaxHeight)
        $MyWindow.Width = (80)
        $MyBuffer.Height = (9999)
        #$MyBuffer.Width = (80)
        $host.ui.RawUI.BackgroundColor = ($bckgrnd = 'Black')
        $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)) {

Modified dev/uninstall.cmd from [67ad8c5176] to [a1f67aab14].

1
2
3
4
5
6
7
8
9
10
11
@set installFolder=Do_not_change
@set usrFolder=Do_not_change
@set Python=Do_not_change
@set StreamripperFolder=Do_not_change
@echo off
set ST2=Streamtuner2

>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

if '%errorlevel%' NEQ '0' (
    goto goUAC
|
|
|
|







1
2
3
4
5
6
7
8
9
10
11
@set installFolder=Do_not_Change
@set usrFolder=Do_not_Change
@set Python=Do_not_Change
@set StreamripperFolder=Do_not_Change
@echo off
set ST2=Streamtuner2

>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

if '%errorlevel%' NEQ '0' (
    goto goUAC
66
67
68
69
70
71
72





73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
:ST2isRunning
echo %ST2% is still running!
echo Please close all instances of %ST2% before uninstalling!
pause
exit








:NotRunning
echo | set /p=Do you want to uninstall %ST2% for Windows? [y/N]
set /P INPUT=%=%
If /I NOT '%INPUT%' == 'Y' exit

echo | set /p=Do you want to keep your %ST2% settings? [Y/n]
set /P INPUT=%=%
If /I '%INPUT%' == 'N' (
	echo Deleting personal settings...
	del "%APPDATA%\streamtuner2\*.*" /F /S /Q 1>nul
)
set INPUT=

if '"%StreamripperFolder%"' NEQ '' ( 
	echo | set /p=Do you want to uninstall Streamripper? [y/N]
	goto uninstallSR
)
% goto uninstallPython

:uninstallSR
set /P INPUT=%=%
If /I '%INPUT%' == 'Y'  (
	echo Uninstalling Streamripper...
	"%StreamripperFolder%\Uninstall.exe" /S
 	reg delete HKCU\SOFTWARE\Streamripper /f 1>nul 2>&1
 	reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Streamripper /f 1>nul 2>&1
 	reg delete HKLM\SOFTWARE\WoW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Streamripper /f 1>nul 2>&1
)
set INPUT=

:uninstallPython
if '%Pythonrun%' EQU 'Y' (
	echo Skipping uninstall of Python
	goto uninstallST2







>
>
>
>
>
|
|












|



|







|
<







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104

105
106
107
108
109
110
111
:ST2isRunning
echo %ST2% is still running!
echo Please close all instances of %ST2% before uninstalling!
pause
exit


:NotRunning
if exist "%windir%\SysWOW64" (
	set RegUninstallBase="HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
) else (
	set RegUninstallBase="HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall"
)

echo | set /p=Do you want to uninstall %ST2% for Windows? [y/N]
set /P INPUT=%=%
If /I NOT '%INPUT%' == 'Y' exit

echo | set /p=Do you want to keep your %ST2% settings? [Y/n]
set /P INPUT=%=%
If /I '%INPUT%' == 'N' (
	echo Deleting personal settings...
	del "%APPDATA%\streamtuner2\*.*" /F /S /Q 1>nul
)
set INPUT=

if '"%StreamripperFolder%"' NEQ '""' ( 
	echo | set /p=Do you want to uninstall Streamripper? [y/N]
	goto uninstallSR
)
goto uninstallPython

:uninstallSR
set /P INPUT=%=%
If /I '%INPUT%' == 'Y'  (
	echo Uninstalling Streamripper...
	"%StreamripperFolder%\Uninstall.exe" /S
 	reg delete HKCU\SOFTWARE\Streamripper /f 1>nul 2>&1
 	reg delete %RegUninstallBase%\Streamripper /f 1>nul 2>&1

)
set INPUT=

:uninstallPython
if '%Pythonrun%' EQU 'Y' (
	echo Skipping uninstall of Python
	goto uninstallST2
119
120
121
122
123
124
125

126
127

128
129
130
131

132
133
134
135
136
137
138
139
140
141
	echo Removing requests
	"%Python%\scripts\pip.exe" uninstall requests -y -q
	echo Removing cssselect
	"%Python%\scripts\pip.exe" uninstall cssselect -y -q
	echo Removing PyGtk 2.24.2
	MsiExec.exe /x{09F82967-D26B-48AC-830E-33191EC177C8} /qb-!
	echo Removing Python 2.7.12

	MsiExec.exe /x{9DA28CE5-0AA5-429E-86D8-686ED898C665} /qb-!
	reg delete HKCU\SOFTWARE\Python\PythonCore\2.7 /f 1>nul 2>&1

	rd "%Python%"  /S /Q
)

:uninstallST2 echo Removing %ST2%...

rd "%installFolder%" /S /Q

echo Removing shortcuts...
rd "%APPDATA%\Microsoft\Windows\Start Menu\Programs\%ST2%" /S /Q 1>nul
del "%USERPROFILE%\Desktop\Streamtuner2.lnk" 1>nul

reg delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ST2% /f 1>nul  2>&1

echo Finished uninstalling %ST2%
pause







>


>



|
>










123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
	echo Removing requests
	"%Python%\scripts\pip.exe" uninstall requests -y -q
	echo Removing cssselect
	"%Python%\scripts\pip.exe" uninstall cssselect -y -q
	echo Removing PyGtk 2.24.2
	MsiExec.exe /x{09F82967-D26B-48AC-830E-33191EC177C8} /qb-!
	echo Removing Python 2.7.12
	reg delete %RegUninstallBase%\{09F82967-D26B-48AC-830E-33191EC177C8} /f 1>nul 2>&1
	MsiExec.exe /x{9DA28CE5-0AA5-429E-86D8-686ED898C665} /qb-!
	reg delete HKCU\SOFTWARE\Python\PythonCore\2.7 /f 1>nul 2>&1
	reg delete %RegUninstallBase%\{9DA28CE5-0AA5-429E-86D8-686ED898C665} /f 1>nul 2>&1
	rd "%Python%"  /S /Q
)

:uninstallST2 
echo Removing %ST2%...
rd "%installFolder%" /S /Q

echo Removing shortcuts...
rd "%APPDATA%\Microsoft\Windows\Start Menu\Programs\%ST2%" /S /Q 1>nul
del "%USERPROFILE%\Desktop\Streamtuner2.lnk" 1>nul

reg delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%ST2% /f 1>nul  2>&1

echo Finished uninstalling %ST2%
pause