Index: Win32/build/win32-packager.pl
===================================================================
--- Win32/build/win32-packager.pl	(revision 19237)
+++ Win32/build/win32-packager.pl	(working copy)
@@ -172,6 +172,7 @@
 my $mythtv  = 'C:/mythtv/';       # this is where the entire SVN checkout lives
                                   # so c:/mythtv/mythtv/ is the main codebase.
 my $build   = 'C:/mythtv/build/'; # where 'make install' installs into
+my $mysql   = 'C:/Program Files/MySQL/MySQL Server 5.0/';
 
 # Where is the users home? 
 # Script later creates $home\.mythtv\mysql.txt
@@ -192,6 +193,7 @@
 my $dossources = perl2dos($sources);
 my $dosmingw   = perl2dos($mingw); 
 my $dosmythtv  = perl2dos($mythtv);
+my $dosmysql   = perl2dos($mysql);
 
 # Unix/MSys equiv. versions of the paths (for when we shell to MSYS/UNIX mode):
 my $unixmsys  = '/';       # MSys root is always mounted here,
@@ -204,6 +206,7 @@
 my $unixmythtv  = perl2unix($mythtv);
 my $unixhome    = perl2unix($home);
 my $unixbuild   = perl2unix($build);
+my $unixmysql   = perl2unix($mysql);
 
 # The installer for MinGW:
 my $MinGWinstaller = 'MinGW-5.1.4.exe';
@@ -431,21 +434,21 @@
 [ archive => $sources.'mysql-essential-5.0.67-win32.msi', 
   'fetch' => 'http://mirror.services.wisc.edu/mysql/Downloads/MySQL-5.0/mysql-essential-5.0.67-win32.msi',
   comment => 'fetch mysql binaries - this is a big download(23MB) so it might take a while' ],
-[ file    => "c:/Program Files/MySQL/MySQL Server 5.0/bin/libmySQL.dll",
+[ file    => $dosmysql . "bin/libmySQL.dll",
   exec    => $dossources.'mysql-essential-5.0.67-win32.msi INSTALLLEVEL=2',
   comment => 'Install mysql - be sure to choose to do a "COMPLETE" install. You should also choose NOT to "configure the server now" ' ],
 
 # after mysql install 
-[ filesame => [$mingw.'bin/libmySQL.dll','c:/Program Files/MySQL/MySQL Server 5.0/bin/libmySQL.dll'],  
+[ filesame => [$mingw.'bin/libmySQL.dll', $dosmysql . 'bin/libmySQL.dll'],  
   copy     => [''=>'',
   comment  => 'post-mysql-install'] ],
-[ filesame => [$mingw.'lib/libmySQL.dll','c:/Program Files/MySQL/MySQL Server 5.0/bin/libmySQL.dll'],  
+[ filesame => [$mingw.'lib/libmySQL.dll', $dosmysql . 'bin/libmySQL.dll'],  
   copy     => [''=>'',
   comment  => 'post-mysql-install'] ],
-[ filesame => [$mingw.'lib/libmysql.lib','c:/Program Files/MySQL/MySQL Server 5.0/lib/opt/libmysql.lib'],  
+[ filesame => [$mingw.'lib/libmysql.lib', $dosmysql . 'lib/opt/libmysql.lib'],  
   copy     => [''=>''] ],
 [ file     => $mingw.'include/mysql.h'  ,   
-  exec     => 'copy /Y "c:\Program Files\MySQL\MySQL Server 5.0\include\*" '.$dosmingw."include" ],
+  exec     => 'copy /Y "' . $dosmysql . 'include\*" '.$dosmingw."include" ],
   
   
 # make sure that /mingw is mounted in MSYS properly before trying to use the /mingw folder
@@ -491,7 +494,6 @@
   shell   => ["cd /mingw/include","patch -p0 < mysql___h.patch"],
   comment => 'Apply mysql.h patch file, if not already applied....' ],
 
-
 # fetch it
 [ dir     => $sources.'pthread', 
   mkdirs  => $sources.'pthread' ],
@@ -1625,7 +1627,7 @@
 [ grep   => ['SERVICE_NAME',$mythtv.'testmysqlsrv.bat'],
   exec   => ['sc start mysql','nocheck']],
 [ grep   => ['does not exist',$mythtv.'testmysqlsrv.bat'],
-  exec   => ['C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLd-nt.exe'.
+  exec   => [$dosmysql . 'bin\MySQLd-nt.exe'.
              ' --standalone  -console','nocheck']],
 
  
@@ -1635,7 +1637,7 @@
 echo testing connection to a local mysql server...
 sleep 5
 del '.$dosmythtv.'_mysqlshow_err.txt
-"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqlshow.exe" -u mythtv --password=mythtv 2> '.$dosmythtv.'_mysqlshow_err.txt  > '.$dosmythtv.'_mysqlshow_out.txt 
+"' . $dosmysql . 'bin\mysqlshow.exe" -u mythtv --password=mythtv 2> '.$dosmythtv.'_mysqlshow_err.txt  > '.$dosmythtv.'_mysqlshow_out.txt 
 type '.$dosmythtv.'_mysqlshow_out.txt >> '.$dosmythtv.'_mysqlshow_err.txt 
 del '.$dosmythtv.'_mysqlshow_out.txt
 sleep 1
@@ -1649,7 +1651,7 @@
 # if the connection was good, or the permissions were wrong, but the server 
 # was there, there's no need to reconfigure the server!
 [ grep    => ['(\+--------------------\+|Access denied for user)',$mythtv.'_mysqlshow_err.txt'], 
-  exec    => ['C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLd-nt.exe --standalone  -console','nocheck'], 
+  exec    => [$dosmysql . 'bin\MySQLd-nt.exe --standalone  -console','nocheck'], 
   comment => 'See if we couldnt connect to a local mysql server. Please re-configure the MySQL server to start as a service.'],
 
 # try again to connect as mythtv/mythtv first (the best case scenario) - the
@@ -1673,13 +1675,13 @@
 echo REPLACE INTO user VALUES ('localhost','mythtv', PASSWORD('mythtv'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); >>resetmythtv.sql
 echo INSERT IGNORE INTO user VALUES ('\%\%','mythtv', PASSWORD('mythtv'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); >>resetmythtv.sql
 echo REPLACE INTO user VALUES ('\%\%','mythtv', PASSWORD('mythtv'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); >>resetmythtv.sql
-echo trying to reset mythtv/mythtv passwords:
-\"C:\\Program Files\\MySQL\\MySQL Server 5.0\\bin\\mysqld-nt.exe\" --no-defaults --bind-address=127.0.0.1 --bootstrap --console --skip-grant-tables --skip-innodb --standalone <resetmythtv.sql
+echo trying to reset mythtv/mythtv passwords:" . 
+'"' . $dosmysql . 'bin\mysqld-nt.exe" --no-defaults --bind-address=127.0.0.1 --bootstrap --console --skip-grant-tables --skip-innodb --standalone <resetmythtv.sql
 del resetmythtv.sql
 echo trying to re-start mysql
 rem net stop MySQL
 net start MySQL
 rem so that the server has time to start before we query it again
 echo.
 echo Password for user 'mythtv' was reset to 'mythtv'
 echo.
@@ -1705,7 +1707,7 @@
 # this has the 'nocheck' flag because the creation of the DB doesn't
 # instantly reflect in the .txt file we are looking at:
 [ grep    => ['mythconverg',$mythtv.'_mysqlshow_err.txt'], 
-  exec    => [ 'echo create database mythconverg; | "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe" -u mythtv --password=mythtv','nocheck'], 
+  exec    => [ 'echo create database mythconverg; | "' . $dosmysql . 'bin\mysql.exe" -u mythtv --password=mythtv','nocheck'], 
   comment => ' does the mythconverg database exist? (and can this user see it?) '],
 
 # Make mysql.txt file required for testing
