Ticket #4397: win32-packager.29.patch
File win32-packager.29.patch, 16.1 KB (added by , 16 years ago) |
---|
-
win32-packager.pl
141 141 print "Press [enter] to continue, or [ctrl]-c to exit now....\n"; 142 142 getc(); 143 143 144 # TODO - use this list to define the components to build - only the first of 145 # these currently works well. 144 # this list defines the components to build , to build everything, leave as-is 146 145 my @components = ( 'mythtv', 'myththemes', 'mythplugins' ); 147 146 148 147 … … 153 152 # my $sources = $ENV{SOURCES}; 154 153 # TODO - although theoretically possible to change these paths, 155 154 # it has NOT been tested much, and will with HIGH PROBABILITY fail somewhere. 156 # TODO- Only $mingw is tested and most likely is safe to change.155 # - Only $mingw is tested and most likely is safe to change. 157 156 158 157 # Perl compatible paths. DOS style, but forward slashes, and must end in slash: 159 158 my $msys = 'C:/MSys/1.0/'; … … 214 213 # an event/action. 215 214 # There are a number of different actions that can be taken. 216 215 # 217 # eg: [ dir => "c:/MinGW", exec => $dossources.'MinGW-5.1. 3.exe' ],216 # eg: [ dir => "c:/MinGW", exec => $dossources.'MinGW-5.1.4.exe' ], 218 217 # 219 218 # means: expect there to be a dir called "c:/MinGW", and if there isn't 220 # execute the file MinGW-5.1. 3.exe. (clearly there needs to be a file221 # MinGW-5.1. 3.exe on disk for that to work, so there is an earlier219 # execute the file MinGW-5.1.4.exe. (clearly there needs to be a file 220 # MinGW-5.1.4.exe on disk for that to work, so there is an earlier 222 221 # declaration to 'fetch' it) 223 222 224 223 … … 255 254 # copy a new version of a file, set mtime to the original [copy] 256 255 257 256 #TODO: 258 # copy a set of files (path/filespec, destination) not-yet-impl. use exec => 'copy /Y xxx.* yyy' 259 # apply a diff not-yet-impl use shell => 'patch -p0 < blah.patch' 260 # search-replace text in a file not-yet-impl use grep => ['pattern',subject], exec => shell 'patch < etc to replace it' 257 # copy a set of files (path/filespec, destination) not-yet-impl. 258 # => use exec => 'copy /Y xxx.* yyy' 259 # apply a diff not-yet-impl 260 # => use shell => 'patch -p0 < blah.patch' 261 # search-replace text in a file not-yet-impl 262 # => use grep => ['pattern',subject], exec => shell 'patch < etc to replace it' 261 263 262 264 263 265 # NOTES on specific actions: … … 286 288 comment => 'We download all the files from the web, and save them here:'], 287 289 288 290 289 [ archive => $sources.'MinGW-5.1. 3.exe',290 'fetch' => 'http://'.$sourceforge.'/sourceforge/mingw/MinGW-5.1. 3.exe',291 [ archive => $sources.'MinGW-5.1.4.exe', 292 'fetch' => 'http://'.$sourceforge.'/sourceforge/mingw/MinGW-5.1.4.exe', 291 293 comment => 'Get mingw and addons first, or we cant do [shell] requests!' ], 292 294 [ archive => $sources.'mingw-utils-0.3.tar.gz', 293 295 'fetch' => 'http://'.$sourceforge.'/sourceforge/mingw/mingw-utils-0.3.tar.gz' ], 294 296 295 297 296 298 [ dir => $mingw, 297 exec => $dossources.'MinGW-5.1. 3.exe',299 exec => $dossources.'MinGW-5.1.4.exe', 298 300 comment => 'install MinGW (be sure to install g++, g77 and ming make too. Leave the default directory at c:\mingw ) - it will require user interaction, but once completed, will return control to us....' ], # interactive, supposed to install g++ and ming make too, but people forget to select them? 299 301 [ file => $mingw."bin/gcc.exe", 300 exec => $dossources.'MinGW-5.1. 3.exe',302 exec => $dossources.'MinGW-5.1.4.exe', 301 303 comment => 'unable to find a gcc.exe where expected, rerunning MinGW installer!' ], # interactive, supposed to install g++ and ming make too, but people forget to select them? 302 304 303 305 [ archive => $sources.'MSYS-1.0.10.exe', … … 325 327 # if you did a default-install of MingW, then you need to try again, as we 326 328 # really need g++ and mingw32-make, and g77 is needed for fftw 327 329 [ file => $mingw.'bin/mingw32-make.exe', 328 exec => $dossources.'MinGW-5.1. 3.exe',330 exec => $dossources.'MinGW-5.1.4.exe', 329 331 comment => 'Seriously? You must have done a default install of MinGW. go try again! You MUST choose the custom installed and select the mingw make, g++ and g77 optional packages.' ], 330 332 [ file => $mingw.'bin/g++.exe', 331 exec => $dossources.'MinGW-5.1. 3.exe',333 exec => $dossources.'MinGW-5.1.4.exe', 332 334 comment => 'Seriously? You must have done a default install of MinGW. go try again! You MUST choose the custom installed and select the mingw make, g++ and g77 optional packages.' ], 333 335 [ file => $mingw.'bin/g77.exe', 334 exec => $dossources.'MinGW-5.1. 3.exe',336 exec => $dossources.'MinGW-5.1.4.exe', 335 337 comment => 'Seriously? You must have done a default install of MinGW. go try again! You MUST choose the custom installed and select the mingw make, g++ and g77 optional packages.' ], 336 338 337 339 #[ file => 'C:/MinGW/bin/mingw32-make.exe', extract => … … 416 418 417 419 # after mysql install 418 420 [ filesame => [$mingw.'bin/libmySQL.dll','c:/Program Files/MySQL/MySQL Server 5.0/bin/libmySQL.dll'], 419 copy => [''=>'',421 copy => setup_themes.sh[''=>'', 420 422 comment => 'post-mysql-install'] ], 421 423 [ filesame => [$mingw.'lib/libmySQL.dll','c:/Program Files/MySQL/MySQL Server 5.0/bin/libmySQL.dll'], 422 424 copy => [''=>'', … … 426 428 [ file => $mingw.'include/mysql.h' , 427 429 exec => 'copy /Y "c:\Program Files\MySQL\MySQL Server 5.0\include\*" '.$dosmingw."include" ], 428 430 431 432 # make sure that /mingw is mounted in MSYS properly before trying to use the /mingw folder 433 # this is supposed to happen as part of the MSYS post-install, but doesnt always work. 434 [ file => $msys.'etc/fstab', 435 write => [$msys.'etc/fstab', 436 "$mingw /mingw 437 " ],comment => 'correct a MinGW bug that prevents the /etc/fstab from existing'], 438 429 439 # 430 440 # TIP: we use a special file (with two extra _'s ) 431 441 # as a marker to say this acton is already done! … … 1154 1164 #[ filesame => [$mythtv.'mythtv/15541_undo.patch',$sources."15541_undo.patch"], copy => [''=>'',comment => 'XXXX'] ], 1155 1165 #[ grep => ['\#include \"compat.h\"',$mythtv.'mythtv/libs/libmythui/mythpainter.cpp'], shell => ["cd ".$unixmythtv."mythtv/libs/libmyth/","patch -p2 < ".$unixmythtv."mythtv/15541_undo.patch"] , comment => 'currently need this patch too, equivalemnt of: svn merge -r 15541:15540 .'], 1156 1166 1167 # Ticket 4984 1168 #[ archive => $sources.'4984_mythcontext.patch6' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4984/mythcontext.patch6', comment => 'Applying Ticket 4984'], 1169 #[ filesame => [$mythtv.'mythtv/4984_mythcontext.patch6',$sources."4984_mythcontext.patch6"], copy => [''=>'',comment => 'XXXX'] ], 1170 #[ grep => ['MYTHLIBDIR',$mythtv.'mythtv/libs/libmyth/mythcontext.cpp'], shell => ["cd ".$unixmythtv."mythtv/","patch -p0 < ".$unixmythtv."mythtv/4984_mythcontext.patch6"] , comment => ' 4984'], 1171 1172 1173 # Ticket 4699 1174 #[ archive => $sources.'4699_win32_fs.patch', 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4699/win32_fs.patch', comment => 'win32_fs.patch'], 1175 #[ filesame => [$mythtv.'mythtv/4699_win32_fs.patch',$sources."4699_win32_fs.patch"], copy => [''=>'',comment => 'XXXX'] ], 1176 #[ grep => ['setCaption',$mythtv.'mythtv/libs/libmythui/mythmainwindow.cpp'], shell => ["cd ".$unixmythtv."mythtv","patch -p0 < ".$unixmythtv."mythtv/4699_win32_fs.patch"] , comment => ' 4699'], 1177 1178 # 4718 1179 #[ archive => $sources.'4718_undo.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4718/dvd_playback.patch', comment => 'Ticket 4718 dvdplayer.patch'], 1180 #[ filesame => [$mythtv.'mythtv/4718_undo.patch',$sources."4718_undo.patch"], copy => [''=>'',comment => 'XXXX'] ], 1181 #[ grep => ['filename.right(filename.length() - 4)',$mythtv.'mythtv/libs/libmythtv/RingBuffer.cpp'], shell => ["cd ".$unixmythtv."mythtv/","patch -p0 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' .'], 1182 #[ archive => $sources.'4718_playback.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4718/dvd_playback_plugin.patch', comment => 'dvdplayer.patch - apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN'], 1183 #[ filesame => [$mythtv.'mythtv/4718_playback.patch',$sources."4718_playback.patch"], copy => [''=>'',comment => 'XXXX'] ], 1184 #[ grep => ['gc->setValue\("D:',$mythtv.'mythplugins/mythvideo/mythvideo/globalsettings.cpp'], shell => ["cd ".$unixmythtv."mythplugins/mythvideo","patch -p0 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' .'], 1185 #[ grep => ['\"dvd:\/\"',$mythtv.'mythplugins/mythvideo/mythvideo/main.cpp'], shell => ["cd ".$unixmythtv."mythplugins/mythvideo","patch -p1 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' 4718'], 1186 1187 # Ticket 15831 1188 #[ archive => $sources.'15831_win32_fs.patch', 'fetch' => 'http://svn.mythtv.org/trac/changeset/15831?format=diff&new=15831', comment => 'win32_fs.patch - apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN'], 1189 #[ filesame => [$mythtv.'mythtv/15831_win32_fs.patch',$sources."15831_win32_fs.patch"], copy => [''=>'',comment => 'XXXX'] ], 1190 #[ grep => ['\+', $mythtv.'mythtv/15831_win32_fs.patch'], shell => ["cd ".$unixmythtv."mythtv","dos2unix 15831_win32_fs.patch"], comment => ' .'], 1191 #[ grep => ['LOCALAPPDATA',$mythtv.'mythtv/libs/libmyth/mythcontext.cpp'], shell => ["cd ".$unixmythtv."mythtv","patch -p0 < ".$unixmythtv."mythtv/15831_win32_fs.patch"] , comment => ' 15831'], 1192 1157 1193 ; 1158 1194 # 1159 1195 if ($tickets == 1) { 1160 1196 push @{$expect}, 1161 # Ticket 49841162 [ archive => $sources.'4984_mythcontext.patch6' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4984/mythcontext.patch6', comment => 'Applying Ticket 4984'],1163 [ filesame => [$mythtv.'mythtv/4984_mythcontext.patch6',$sources."4984_mythcontext.patch6"], copy => [''=>'',comment => 'XXXX'] ],1164 [ grep => ['MYTHLIBDIR',$mythtv.'mythtv/libs/libmyth/mythcontext.cpp'], shell => ["cd ".$unixmythtv."mythtv/","patch -p0 < ".$unixmythtv."mythtv/4984_mythcontext.patch6"] , comment => ' .'],1165 1197 1166 # Ticket 46991167 [ archive => $sources.'4699_win32_fs.patch', 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4699/win32_fs.patch', comment => 'win32_fs.patch'],1168 [ filesame => [$mythtv.'mythtv/4699_win32_fs.patch',$sources."4699_win32_fs.patch"], copy => [''=>'',comment => 'XXXX'] ],1169 [ grep => ['setCaption',$mythtv.'mythtv/libs/libmythui/mythmainwindow.cpp'], shell => ["cd ".$unixmythtv."mythtv","patch -p0 < ".$unixmythtv."mythtv/4699_win32_fs.patch"] , comment => ' .'],1170 1171 1198 # Ticket 4702 1172 1199 [ archive => $sources.'4702_mingw.patch', 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4702/mingw.patch', comment => 'mingw.patch - apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN'], 1173 1200 [ filesame => [$mythtv.'mythtv/4702_mingw.patch',$sources."4702_mingw.patch"], copy => [''=>'',comment => 'XXXX'] ], 1174 [ grep => ['\$\$\{PREFIX\}\/bin',$mythtv.'mythtv/libs/libmythui/libmythui.pro'], shell => ["cd ".$unixmythtv."mythtv","patch -p0 < ".$unixmythtv."mythtv/4702_mingw.patch"] , comment => ' .'],1201 [ grep => ['\$\$\{PREFIX\}\/bin',$mythtv.'mythtv/libs/libmythui/libmythui.pro'], shell => ["cd ".$unixmythtv."mythtv","patch -p0 < ".$unixmythtv."mythtv/4702_mingw.patch"] , comment => ' 4702'], 1175 1202 1176 # Ticket 47181177 [ archive => $sources.'4718_undo.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4718/dvd_playback.patch', comment => 'Ticket 4718 dvdplayer.patch'],1178 [ filesame => [$mythtv.'mythtv/4718_undo.patch',$sources."4718_undo.patch"], copy => [''=>'',comment => 'XXXX'] ],1179 [ grep => ['filename.right(filename.length() - 4)',$mythtv.'mythtv/libs/libmythtv/RingBuffer.cpp'], shell => ["cd ".$unixmythtv."mythtv/","patch -p0 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' .'],1180 [ archive => $sources.'4718_playback.patch' , 'fetch' => 'http://svn.mythtv.org/trac/raw-attachment/ticket/4718/dvd_playback_plugin.patch', comment => 'dvdplayer.patch - apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN'],1181 [ filesame => [$mythtv.'mythtv/4718_playback.patch',$sources."4718_playback.patch"], copy => [''=>'',comment => 'XXXX'] ],1182 [ grep => ['gc->setValue("D:',$mythtv.'mythplugins/mythvideo/mythvideo/globalsettings.cpp'], shell => ["cd ".$unixmythtv."mythplugins/mythvideo","patch -p0 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' .'],1183 [ grep => ['\"dvd:\/\"',$mythtv.'mythplugins/mythvideo/mythvideo/main.cpp'], shell => ["cd ".$unixmythtv."mythplugins/mythvideo","patch -p1 < ".$unixmythtv."mythtv/4718_undo.patch"] , comment => ' .'],1184 1203 1185 1186 # Ticket 158311187 1188 [ archive => $sources.'15831_win32_fs.patch', 'fetch' => 'http://svn.mythtv.org/trac/changeset/15831?format=diff&new=15831', comment => 'win32_fs.patch - apply any outstanding win32 patches - this section will be hard to keep upwith HEAD/SVN'],1189 [ filesame => [$mythtv.'mythtv/15831_win32_fs.patch',$sources."15831_win32_fs.patch"], copy => [''=>'',comment => 'XXXX'] ],1190 [ grep => ['\+', $mythtv.'mythtv/15831_win32_fs.patch'], shell => ["cd ".$unixmythtv."mythtv","dos2unix 15831_win32_fs.patch"], comment => ' .'],1191 [ grep => ['LOCALAPPDATA',$mythtv.'mythtv/libs/libmyth/mythcontext.cpp'], shell => ["cd ".$unixmythtv."mythtv","patch -p0 < ".$unixmythtv."mythtv/15831_win32_fs.patch"] , comment => ' .'],1192 1204 ; 1193 1205 1194 1206 } # End if for $ticket … … 1302 1314 echo Creating build-folder Directories... 1303 1315 # Assumptions 1304 1316 # <installprefix> = ./mythtv 1305 # themes ego into <installprefix>/share/mythtv/themes1317 # themes go into <installprefix>/share/mythtv/themes 1306 1318 # fonts go into <installprefix>/share/mythtv 1307 1319 # libraries go into installlibdir/mythtv 1308 1320 # plugins go into installlibdir/mythtv/plugins … … 1350 1362 ' 1351 1363 ],comment => 'write a script to install plugins to build folder'], 1352 1364 1353 # Create file to install myththemes1354 [ always => [],1355 write => [$mythtv.'setup_themes.sh',1356 '#!/bin/bash1357 source '.$unixmythtv.'qt'.$qtver.'_env.sh1358 cd '.$unixmythtv.'1359 echo Copying themes ...1360 cp -ur /usr/share/mythtv/themes ./build/share/mythtv/1361 cp /usr/share/mythtv/mythweather/* ./build/share/mythtv/mythweather1362 echo Copying international files....1363 cp /usr/share/mythtv/i18n/* ./build/share/mythtv/i18n1364 '1365 ],comment => 'write a script that will install themes to build folder'],1366 1365 1367 1366 # chmod the shell scripts, everytime 1368 1367 [ always => [], … … 1621 1620 shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh', 1622 1621 'cd '.$unixmythtv.'myththemes','make', 'make install'], 1623 1622 comment => 'THEMES! redo make if we need to (see the last_build.txt identifier)' ], 1623 1624 1624 1625 # Copy to build area1626 #[ filesame => [$mythtv.'build/share/mythtv/themes/Retro/theme.xml',$dosmsys.'/share/mythtv/themes/Retro/theme.xml'], shell => ['source '.$unixmythtv.'setup_themes.sh'], comment => 'Copy new themes to a build directory' ],1627 1628 1625 # Get any extra Themes 1629 1626 # 1630 1627 … … 1643 1640 'find '.$unixmythtv.'build/share/mythtv/themes/ -name "*.ttf"'. 1644 1641 ' | xargs -n1 -i__ cp __ '.$unixmythtv.'build/share/mythtv'], 1645 1642 comment => 'move ttf files'], 1643 1644 1645 # install fixup for redundant themes folders/folders/folders: 1646 [ always => '', 1647 shell => [ 'cd /c/mythtv/build/share/mythtv/themes', 1648 'for f in *; do mv $f/$f/* ./$f; done' ], 1649 comment => 'relocate badly installed THEMES! ' ], 1650 1646 1651 ; 1647 1652 } 1648 1653 … … 1657 1662 'README for Win32 Installation of MythTV version: '.$version.' svn '.$SVNRELEASE.' 1658 1663 ============================================================= 1659 1664 The current installation very basic: 1660 - All exe and dlls are %PROGRAMFILES%\mythtv 1665 - All exe and dlls are %PROGRAMFILES%\mythtv\bin 1661 1666 - share/mythtv is copied to %PROGRAMFILES%\mythtv\share\mythtv 1662 1667 - lib/mythtv is copied to %PROGRAMFILES%\mythtv\lib\mythtv 1663 1668 - mysql.txt and user configuration files are set to %APPDATA%\mythtv … … 1674 1679 MYTHLIBDIR = defaulting to %PROGRAMFILES%\mythv\lib 1675 1680 MYTHTVDIR = defaulting to %APPDATA%\mythtv 1676 1681 ','nocheck'],comment => ''], 1677 [ file => $mythtv.'build/readme.txt_', shell => ['unix2dos '.$unixmythtv.'build/readme.txt', 'nocheck'],comment => '' ], 1682 [ file => $mythtv.'build/readme.txt_', 1683 shell => ['unix2dos '.$unixmythtv.'build/readme.txt', 'nocheck'],comment => '' ], 1678 1684 ; 1679 1685 1680 1686 if ($package == 1) {