Ticket #5213: win32-packager.diff
File win32-packager.diff, 14.9 KB (added by , 16 years ago) |
---|
-
win32-packager.pl
103 103 { $qtver = 4 } 104 104 105 105 # force us to label the DLL's as 0.21 if we are on the release 21 branch! 106 $version = '0.21' if $svnlocation eq "branches/release-0-21-fixes"; 106 # 0.22-fixes doesn't exist yet. 107 if ($svnlocation eq "branches/release-0-22-fixes") { 108 $version = '0.21'; 109 $svnlocation = "branches/release-0-21-fixes"; 110 $qtver = 3; 111 112 } 107 113 108 114 print "Config:\n\tQT version: $qtver\n\tDLL's will be labeled as: $version\n\tSVN location is: $svnlocation\n\n"; 109 115 … … 694 700 export QMAKESPEC=$QTDIR/mkspecs/win32-g++ 695 701 export LD_LIBRARY_PATH=$QTDIR/lib:/usr/lib:/mingw/lib:/lib 696 702 export PATH=$QTDIR/bin:/usr/local/bin:$PATH 703 export INSTALL_ROOT='.$unixmythtv.'build 697 704 ' ],comment => 'write a QT3 script that we can source later when inside msys to setup the environment variables'], 698 705 699 706 … … 703 710 export QMAKESPEC=$QTDIR/mkspecs/win32-g++ 704 711 export LD_LIBRARY_PATH=$QTDIR/lib:/usr/lib:/mingw/lib:/lib 705 712 export PATH=$QTDIR/bin:/usr/local/bin:$PATH 713 export INSTALL_ROOT='.$unixmythtv.'build 706 714 ' ],comment => 'write a QT4 script that we can source later when inside msys to setup the environment variables'], 707 715 708 716 … … 846 854 [ grep => ['Makefile|MAKEFILE',$mythtv.'mythtv/Makefile'], shell => ['rm '.$unixmythtv.'mythtv/Makefile','nocheck'], comment => 'broken Makefile, delete it' ], 847 855 848 856 # configure 849 [ file => $mythtv.'mythtv/Makefile', shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'mythtv','./configure --prefix=/usr --disable-dbox2 --disable-hdhomerun --disable-iptv --disable-joystick-menu --disable-xvmc-vld --disable-xvmc --enable-directx --cpu=k8 --compile-type='.$compile_type], comment => 'do we already have a Makefile for mythtv?' ], 857 [ file => $mythtv.'mythtv/Makefile', shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'mythtv','./configure --prefix=/ --disable-dbox2 --disable-hdhomerun --disable-iptv --disable-joystick-menu --disable-xvmc-vld --disable-xvmc --enable-directx --cpu=k8 --enable-memalign-hack --compile-type='.$compile_type], comment => 'do we already have a Makefile for mythtv?' ], 858 # fix depends bug 859 [ grep => ['cpsvndir', $mythtv.'mythtv/settings.pro'], shell => ['echo "win32:QMAKE_INSTALL_DIR = sh ./cpsvndir" >> '.$mythtv.'mythtv/settings.pro','nocheck'], comment => 'fix myththemes.pro' ], 860 850 861 # make 851 862 [ newer => [$mythtv."mythtv/libs/libmyth/libmyth-$version.dll", 852 863 $mythtv.'mythtv/last_build.txt'], … … 885 896 886 897 # re-install to msys /usr/bin folders etc, if we have a newer mythtv build 887 898 # ready: 888 [ newer => [$m sys.'bin/mythfrontend.exe',899 [ newer => [$mythtv.'build/bin/mythfrontend.exe', 889 900 $mythtv.'mythtv/programs/mythfrontend/mythfrontend.exe'], 890 901 shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh', 891 902 'cd '.$unixmythtv.'mythtv','make install'], … … 896 907 # copy the basic themes somewhere that mythtv can get at it. 897 908 # TODO this should really be independent of the msys folders, but it's not 898 909 # at present? 910 [dir => [$msys.'share\mythtv\themes\G.A.N.T'], shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh', 911 'cd '.$unixmythtv.'mythtv','make install_themes'], comment => 'copy the basic themes somewhere that mythtv can get at it.' ], 899 912 900 [ dir => $msys.'share\mythtv\themes\G.A.N.T', shell => ['mkdir /usr/share/mythtv','mkdir /usr/share/mythtv/themes','cp -r /c/mythtv/mythtv/themes/* /usr/share/mythtv/themes/'], comment => 'copy the basic themes somewhere that mythtv can get at it.' ],913 #[ dir => $msys.'share\mythtv\themes\G.A.N.T', shell => ['mkdir /usr/share/mythtv','mkdir /usr/share/mythtv/themes','cp -r /c/mythtv/mythtv/themes/* /usr/share/mythtv/themes/'], comment => 'copy the basic themes somewhere that mythtv can get at it.' ], 901 914 902 915 # setup_build creates the build area and copies results (apart from themes) 903 916 [ file => $mythtv.'setup_build.sh_', write => [$mythtv.'setup_build.sh', … … 906 919 cd '.$unixmythtv.' 907 920 echo renaming build to build_old for backup.... 908 921 # keep around just one earlier verion in build_old: 909 rm -rf build_old910 mv build build_old911 mkdir build922 #rm -rf build_old 923 #mv build build_old 924 #mkdir build 912 925 echo copying exes and dlls to the build folder... 913 find . -name \\*.exe | grep -v build | xargs -n1 -i__ cp __ ./build/914 find . -name \\*.dll | grep -v build | xargs -n1 -i__ cp __ ./build/926 #find . -name \\*.exe | grep -v build | xargs -n1 -i__ cp __ ./build/ 927 #find . -name \\*.dll | grep -v build | xargs -n1 -i__ cp __ ./build/ 915 928 echo copying main QT dlls to build folder... 916 929 # mythtv probably needs the qt3 dlls at runtime: 917 cp '.$unixmsys.'qt-3.3.x-p8/lib/*.dll '.$unixmythtv.'build930 cp '.$unixmsys.'qt-3.3.x-p8/lib/*.dll '.$unixmythtv.'build/bin 918 931 # mythtv probably needs the qt4 dlls at runtime: 919 cp '.$unixmsys.'qt-win-opensource-4.3.4/lib/*.dll '.$unixmythtv.'build 932 cp '.$unixmsys.'qt-win-opensource-4.3.4/lib/*.dll '.$unixmythtv.'build/bin 920 933 # qt mysql connection dll has to exist in a subfolder called sqldrivers: 921 934 echo Creating build-folder Directories... 922 935 # Assumptions … … 927 940 # plugins go into installlibdir/mythtv/plugins 928 941 # filters go into installlibdir/mythtv/filters 929 942 # translations go into <installprefix>/share/mythtv/i18n 930 mkdir '.$unixmythtv.'/build/ sqldrivers931 mkdir '.$unixmythtv.'/build/share943 mkdir '.$unixmythtv.'/build/bin/sqldrivers 944 #mkdir '.$unixmythtv.'/build/share 932 945 # mkdir $unixmythtv/build/include - dont nead headers at runtime 933 mkdir '.$unixmythtv.'/build/lib934 mkdir '.$unixmythtv.'/build/lib/mythtv935 mkdir '.$unixmythtv.'/build/share/mythtv936 mkdir '.$unixmythtv.'/build/share/mythtv/themes937 mkdir '.$unixmythtv.'build/share/mythtv/mythweather938 mkdir '.$unixmythtv.'build/share/mythtv/i18n946 #mkdir '.$unixmythtv.'/build/lib 947 #mkdir '.$unixmythtv.'/build/lib/mythtv 948 #mkdir '.$unixmythtv.'/build/share/mythtv 949 #mkdir '.$unixmythtv.'/build/share/mythtv/themes 950 #mkdir '.$unixmythtv.'build/share/mythtv/mythweather 951 #mkdir '.$unixmythtv.'build/share/mythtv/i18n 939 952 echo Copying QT plugin required dlls.... 940 cp '.$unixmsys.'qt-3.3.x-p8/plugins/sqldrivers/libqsqlmysql.dll '.$unixmythtv.'build/ sqldrivers941 cp '.$unixmsys.'qt-win-opensource-4.3.4/plugins/sqldrivers/qsqlmysql4.dll '.$unixmythtv.'build/ sqldrivers953 cp '.$unixmsys.'qt-3.3.x-p8/plugins/sqldrivers/libqsqlmysql.dll '.$unixmythtv.'build/bin/sqldrivers 954 cp '.$unixmsys.'qt-win-opensource-4.3.4/plugins/sqldrivers/qsqlmysql4.dll '.$unixmythtv.'build/bin/sqldrivers 942 955 echo Copying ming and msys dlls to build folder..... 943 956 # pthread dlls and mingwm10.dll are copied from here: 944 cp /mingw/bin/*.dll '.$unixmythtv.'build 957 cp /mingw/bin/*.dll '.$unixmythtv.'build/bin 945 958 # msys-1.0.dll dll is copied from here: 946 cp /bin/msys-1.0.dll '.$unixmythtv.'build 959 cp /bin/msys-1.0.dll '.$unixmythtv.'build/bin 947 960 # copy exes and dlls to the build folder: 948 961 #echo Copying exe files.... 949 962 #find . -name \\*.exe | grep -v build | xargs -n1 -i__ cp __ ./build/ … … 952 965 #echo Copying language files 953 966 #find . -name \\*.qm | grep -v build | xargs -n -i__ cp __ ./build/share/mythtv/i18n 954 967 echo copying share files... 955 cp -r /share/mythtv ./build/share/968 #cp -r /share/mythtv ./build/share/ 956 969 echo copying lib files... 957 cp -r /lib/mythtv/ ./build/lib/ 958 cp -r /usr/lib/mythtv/ ./build/lib/ 970 mv '.$unixmythtv.'build/lib/*.dll '.$unixmythtv.'build/bin/ 971 #cp -r /lib/mythtv/ ./build/lib/ 972 #cp -r /usr/lib/mythtv/ ./build/lib/ 959 973 #echo copying include files... 960 974 #cp -r /include/mythtv ./build/include/ 961 cp /usr/bin/myth*.exe ./build/962 cp /usr/bin/libmyth*.dll ./build/963 cp /usr/bin/mtd.exe ./build/964 cp /usr/bin/ignyte.exe ./build/975 #cp /usr/bin/myth*.exe ./build/ 976 #cp /usr/bin/libmyth*.dll ./build/ 977 #cp /usr/bin/mtd.exe ./build/ 978 #cp /usr/bin/ignyte.exe ./build/ 965 979 touch '.$unixmythtv.'/build/package_flag 966 cp '.$unixmythtv.'gdb_*.bat '.$unixmythtv.'build 967 cp '.$unixmythtv.'mythtv/contrib/Win32/debug/*.cmd '.$unixmythtv.'build 980 cp '.$unixmythtv.'gdb_*.bat '.$unixmythtv.'build/bin 981 cp '.$unixmythtv.'mythtv/contrib/Win32/debug/*.cmd '.$unixmythtv.'build/bin 968 982 ','nocheck' 969 983 ],comment => 'write a script to install mythtv to build folder'], 970 984 … … 1005 1019 1006 1020 # Change - don't run this until mythplugins are complete - otherwise dll/exe are copied twice 1007 1021 # Run setup_build.sh which creates the build area and copies executables 1008 [ file => [$mythtv.'build/package_flag '], shell => [$unixmythtv.'setup_build.sh'],1022 [ file => [$mythtv.'build/package_flag_'], shell => [$unixmythtv.'setup_build.sh', 'nocheck'], 1009 1023 comment => 'Copy mythtv into ./build folder' ], 1010 1024 ; 1011 1025 … … 1120 1134 # 1121 1135 push @{$expect}, 1122 1136 # 1137 # hack location of //include/mythtv/mythconfig.mak so that configure is successful 1138 [ file => $msys.'include/mythtv/mythconfig.mak', 1139 shell => ['mkdir /include/mythtv', 'cp '.$unixmythtv.'build/include/mythtv/mythconfig.mak /include/mythtv/mythconfig.mak', 'nocheck'], 1140 comment => 'link mythconfig.mak'], 1123 1141 ## config: 1124 [ file => $mythtv.'mythplugins/Makefile', shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'mythplugins','./configure --prefix=/usr --disable-mythgallery --disable-mythmusic --disable-mytharchive --disable-mythbrowser --disable-mythflix --disable-mythgame --disable-mythnews --disable-mythphone --disable-mythzoneminder --disable-mythweb --enable-aac --enable-libvisual --enable-fftw --compile-type='.$compile_type,'touch '.$unixmythtv.'mythplugins/cleanup/cleanup.pro'], comment => 'do we already have a Makefile for myth plugins?' ], 1142 [ file => $mythtv.'mythplugins/Makefile', 1143 shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh', 1144 'cd '.$unixmythtv.'mythplugins', 1145 './configure --prefix= --disable-mythgallery --disable-mythmusic --disable-mytharchive --disable-mythbrowser --disable-mythflix --disable-mythgame --disable-mythnews --disable-mythphone --disable-mythzoneminder --disable-mythweb --enable-aac --enable-libvisual --enable-fftw --compile-type='.$compile_type, 1146 'touch '.$unixmythtv.'mythplugins/cleanup/cleanup.pro'], 1147 comment => 'do we already have a Makefile for myth plugins?' ], 1125 1148 1149 #add cpsvndir 1150 [ grep => ['cpsvndir', $mythtv.'mythplugins/settings.pro'], shell => ['echo \'win32:QMAKE_INSTALL_DIR = sh ./cpsvndir\' >> '.$mythtv.'mythplugins/settings.pro','nocheck'], comment => 'fix settings.pro' ], 1151 [ grep => ['win32:DEPENDS', $mythtv.'mythplugins/settings.pro'], shell => ['echo \'win32:DEPENDS += ./\' >> '.$mythtv.'mythplugins/settings.pro','nocheck'], comment => 'fix settings.pro' ], 1126 1152 1153 #hack mythconfig.mak to remove /usr 1154 [ grep => ['LIBDIR=/lib', $mythtv.'mythplugins/mythconfig.mak'], 1155 shell => ['cd '.$unixmythtv.'mythplugins','sed -e \'s|/usr||\' mythconfig.mak > mythconfig2.mak', 'cp mythconfig2.mak mythconfig.mak', 'nocheck'], 1156 comment => 'hack mythconfig.mak'], 1127 1157 ## make 1128 [ newer => [$mythtv.'mythplugins/mythmovies/mythmovies/libmythmovies.dll',$mythtv.'mythtv/last_build.txt'], shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'mythplugins','make'], comment => 'PLUGINS! redo make if we need to (see the last_build.txt identifier)' ], 1158 [ newer => [$mythtv.'mythplugins/mythmovies/mythmovies/libmythmovies.dll',$mythtv.'mythtv/last_build.txt'], 1159 shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'mythplugins','make'], 1160 comment => 'PLUGINS! redo make if we need to (see the last_build.txt identifier)' ], 1129 1161 1162 # make cleanup/cleanup.pro as install fails without it 1163 [ file => $mythtv.'mythplugins/cleanup/cleanup.pro', 1164 shell => ['touch '.$unixmythtv.'mythplugins/cleanup/cleanup.pro', 'nocheck'], 1165 comment => 'make cleanup.pro'], 1130 1166 ## make install 1131 [ newer => [$m sys.'lib/mythtv/plugins/libmythmovies.dll',$mythtv.'mythplugins/mythmovies/mythmovies/libmythmovies.dll'], shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'mythplugins','make install'], comment => 'PLUGINS! make install' ],1167 [ newer => [$mythtv.'build/lib/mythtv/plugins/libmythmovies.dll',$mythtv.'mythplugins/mythmovies/mythmovies/libmythmovies.dll'], shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'mythplugins','make install'], comment => 'PLUGINS! make install' ], 1132 1168 1133 1169 # Copy to build area 1134 [ newer => [$mythtv.'build/lib/mythtv/plugins/libmythmovies.dll',$msys.'lib/mythtv/plugins/libmythmovies.dll'], shell => [$unixmythtv.'setup_plugins.sh'], comment => 'Copy mythplugins to ./build folder' ],1170 #[ newer => [$mythtv.'build/lib/mythtv/plugins/libmythmovies.dll',$msys.'lib/mythtv/plugins/libmythmovies.dll'], shell => [$unixmythtv.'setup_plugins.sh'], comment => 'Copy mythplugins to ./build folder' ], 1135 1171 ; 1136 1172 } 1137 1173 … … 1142 1178 # ------------------------------- 1143 1179 push @{$expect}, 1144 1180 ## config: 1145 [ file => $mythtv.'myththemes/Makefile', shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'myththemes','./configure --prefix= /usr'], comment => 'do we already have a Makefile for myththemes?' ],1181 [ file => $mythtv.'myththemes/Makefile', shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'myththemes','./configure --prefix= '], comment => 'do we already have a Makefile for myththemes?' ], 1146 1182 1183 ## fix myththemes.pro 1184 [ grep => ['^win32:QMAKE_INSTALL_DIR', $mythtv.'myththemes/myththemes.pro'], shell => ['echo \'win32:QMAKE_INSTALL_DIR = sh ./cpsvndir\' >> '.$mythtv.'myththemes/myththemes.pro','nocheck'], comment => 'fix myththemes.pro' ], 1185 [ grep => ['win32:DEPENDS', $mythtv.'myththemes/myththemes.pro'], shell => ['echo \'win32:DEPENDS += ./\' >> '.$mythtv.'myththemes/myththemes.pro','nocheck'], comment => 'fix myththemes.pro' ], 1186 1187 #hack mythconfig.mak to remove /usr 1188 [ grep => ['LIBDIR=/lib', $mythtv.'myththemes/mythconfig.mak'], 1189 shell => ['cd '.$unixmythtv.'myththemes','sed -e \'s|/usr||\' mythconfig.mak > mythconfig2.mak', 'cp mythconfig2.mak mythconfig.mak', 'nocheck'], 1190 comment => 'hack mythconfig.mak'], 1191 1147 1192 # fix a bug in Makefile and make COPY_DIR cp -fr instead of cp -f 1148 1193 #[ file => $mythtv.'myththemes/fix_makefile.sh', write => [$mythtv.'myththemes/fix_makefile.sh', 1149 1194 #'cd '.$unixmythtv.'myththemes … … 1154 1199 #[ grep => ['COPY_DIR\W*=\W*cp -fr',$mythtv.'myththemes/Makefile'], shell => ['cd '.$unixmythtv.'myththemes','source ./fix_makefile.sh'], comment => 'fix Makefile'], 1155 1200 1156 1201 ## make 1157 #[ newer => [$dosmsys.'/share/mythtv/themes/Retro/theme.xml',$mythtv.'mythtv/last_build.txt'], shell => ['rm /usr/share/mythtv/themes/Retro/base.xml','source '.$unixmythtv.'qt'.$qtver.'_env.sh','cd '.$unixmythtv.'myththemes','make', 'make install_themes'], comment => 'THEMES! redo make if we need to (see the last_build.txt identifier)' ], 1202 [ dir => [$mythtv.'/build/share/mythtv/themes/Retro'], 1203 shell => ['source '.$unixmythtv.'qt'.$qtver.'_env.sh', 1204 'cd '.$unixmythtv.'myththemes','make', 'make install'], 1205 comment => 'THEMES! redo make if we need to (see the last_build.txt identifier)' ], 1158 1206 1159 1207 # Copy to build area 1160 1208 #[ 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' ],