Ticket #5981: MythTV-win32_packager.pl-mysql.patch
File MythTV-win32_packager.pl-mysql.patch, 6.5 KB (added by , 15 years ago) |
---|
-
Win32/build/win32-packager.pl
172 172 my $mythtv = 'C:/mythtv/'; # this is where the entire SVN checkout lives 173 173 # so c:/mythtv/mythtv/ is the main codebase. 174 174 my $build = 'C:/mythtv/build/'; # where 'make install' installs into 175 my $mysql = 'C:/Program Files/MySQL/MySQL Server 5.0/'; 175 176 176 177 # Where is the users home? 177 178 # Script later creates $home\.mythtv\mysql.txt … … 192 193 my $dossources = perl2dos($sources); 193 194 my $dosmingw = perl2dos($mingw); 194 195 my $dosmythtv = perl2dos($mythtv); 196 my $dosmysql = perl2dos($mysql); 195 197 196 198 # Unix/MSys equiv. versions of the paths (for when we shell to MSYS/UNIX mode): 197 199 my $unixmsys = '/'; # MSys root is always mounted here, … … 204 206 my $unixmythtv = perl2unix($mythtv); 205 207 my $unixhome = perl2unix($home); 206 208 my $unixbuild = perl2unix($build); 209 my $unixmysql = perl2unix($mysql); 207 210 208 211 # The installer for MinGW: 209 212 my $MinGWinstaller = 'MinGW-5.1.4.exe'; … … 431 434 [ archive => $sources.'mysql-essential-5.0.67-win32.msi', 432 435 'fetch' => 'http://mirror.services.wisc.edu/mysql/Downloads/MySQL-5.0/mysql-essential-5.0.67-win32.msi', 433 436 comment => 'fetch mysql binaries - this is a big download(23MB) so it might take a while' ], 434 [ file => "c:/Program Files/MySQL/MySQL Server 5.0/bin/libmySQL.dll",437 [ file => $dosmysql . "bin/libmySQL.dll", 435 438 exec => $dossources.'mysql-essential-5.0.67-win32.msi INSTALLLEVEL=2', 436 439 comment => 'Install mysql - be sure to choose to do a "COMPLETE" install. You should also choose NOT to "configure the server now" ' ], 437 440 438 441 # after mysql install 439 [ filesame => [$mingw.'bin/libmySQL.dll', 'c:/Program Files/MySQL/MySQL Server 5.0/bin/libmySQL.dll'],442 [ filesame => [$mingw.'bin/libmySQL.dll', $dosmysql . 'bin/libmySQL.dll'], 440 443 copy => [''=>'', 441 444 comment => 'post-mysql-install'] ], 442 [ filesame => [$mingw.'lib/libmySQL.dll', 'c:/Program Files/MySQL/MySQL Server 5.0/bin/libmySQL.dll'],445 [ filesame => [$mingw.'lib/libmySQL.dll', $dosmysql . 'bin/libmySQL.dll'], 443 446 copy => [''=>'', 444 447 comment => 'post-mysql-install'] ], 445 [ filesame => [$mingw.'lib/libmysql.lib', 'c:/Program Files/MySQL/MySQL Server 5.0/lib/opt/libmysql.lib'],448 [ filesame => [$mingw.'lib/libmysql.lib', $dosmysql . 'lib/opt/libmysql.lib'], 446 449 copy => [''=>''] ], 447 450 [ file => $mingw.'include/mysql.h' , 448 exec => 'copy /Y " c:\Program Files\MySQL\MySQL Server 5.0\include\*" '.$dosmingw."include" ],451 exec => 'copy /Y "' . $dosmysql . 'include\*" '.$dosmingw."include" ], 449 452 450 453 451 454 # make sure that /mingw is mounted in MSYS properly before trying to use the /mingw folder … … 491 494 shell => ["cd /mingw/include","patch -p0 < mysql___h.patch"], 492 495 comment => 'Apply mysql.h patch file, if not already applied....' ], 493 496 494 495 497 # fetch it 496 498 [ dir => $sources.'pthread', 497 499 mkdirs => $sources.'pthread' ], … … 1625 1627 [ grep => ['SERVICE_NAME',$mythtv.'testmysqlsrv.bat'], 1626 1628 exec => ['sc start mysql','nocheck']], 1627 1629 [ grep => ['does not exist',$mythtv.'testmysqlsrv.bat'], 1628 exec => [ 'C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLd-nt.exe'.1630 exec => [$dosmysql . 'bin\MySQLd-nt.exe'. 1629 1631 ' --standalone -console','nocheck']], 1630 1632 1631 1633 … … 1635 1637 echo testing connection to a local mysql server... 1636 1638 sleep 5 1637 1639 del '.$dosmythtv.'_mysqlshow_err.txt 1638 " C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqlshow.exe" -u mythtv --password=mythtv 2> '.$dosmythtv.'_mysqlshow_err.txt > '.$dosmythtv.'_mysqlshow_out.txt1640 "' . $dosmysql . 'bin\mysqlshow.exe" -u mythtv --password=mythtv 2> '.$dosmythtv.'_mysqlshow_err.txt > '.$dosmythtv.'_mysqlshow_out.txt 1639 1641 type '.$dosmythtv.'_mysqlshow_out.txt >> '.$dosmythtv.'_mysqlshow_err.txt 1640 1642 del '.$dosmythtv.'_mysqlshow_out.txt 1641 1643 sleep 1 … … 1649 1651 # if the connection was good, or the permissions were wrong, but the server 1650 1652 # was there, there's no need to reconfigure the server! 1651 1653 [ grep => ['(\+--------------------\+|Access denied for user)',$mythtv.'_mysqlshow_err.txt'], 1652 exec => [ 'C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLd-nt.exe --standalone -console','nocheck'],1654 exec => [$dosmysql . 'bin\MySQLd-nt.exe --standalone -console','nocheck'], 1653 1655 comment => 'See if we couldnt connect to a local mysql server. Please re-configure the MySQL server to start as a service.'], 1654 1656 1655 1657 # try again to connect as mythtv/mythtv first (the best case scenario) - the … … 1673 1675 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 1674 1676 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 1675 1677 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 1676 echo trying to reset mythtv/mythtv passwords: 1677 \"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.sql1678 echo trying to reset mythtv/mythtv passwords:" . 1679 '"' . $dosmysql . 'bin\mysqld-nt.exe" --no-defaults --bind-address=127.0.0.1 --bootstrap --console --skip-grant-tables --skip-innodb --standalone <resetmythtv.sql 1678 1680 del resetmythtv.sql 1679 1681 echo trying to re-start mysql 1680 1682 rem net stop MySQL 1681 1683 net start MySQL 1682 1684 rem so that the server has time to start before we query it again 1683 1685 echo. 1684 1686 echo Password for user 'mythtv' was reset to 'mythtv' 1685 1687 echo. … … 1705 1707 # this has the 'nocheck' flag because the creation of the DB doesn't 1706 1708 # instantly reflect in the .txt file we are looking at: 1707 1709 [ grep => ['mythconverg',$mythtv.'_mysqlshow_err.txt'], 1708 exec => [ 'echo create database mythconverg; | " C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe" -u mythtv --password=mythtv','nocheck'],1710 exec => [ 'echo create database mythconverg; | "' . $dosmysql . 'bin\mysql.exe" -u mythtv --password=mythtv','nocheck'], 1709 1711 comment => ' does the mythconverg database exist? (and can this user see it?) '], 1710 1712 1711 1713 # Make mysql.txt file required for testing