[mythtv] Windows pl install script tweaks
Leslie Kaye
les.kaye at couchmansfarm.plus.com
Thu Mar 18 12:10:53 UTC 2010
Sorry if this is a duplicate. I recently joined the list and do not know
if my first message got posted.
I am trying to install the "bleeding edge" version of MythTV on my
OpenSuSE 11.2 home server box and my Windows clients from subversion.
The Linux installation went fine and is working great.
I have a number of issues with
http://svn.mythtv.org/svn/trunk/packaging/Win32/build/win32-packager.pl
which I am executing on a Windows 7 x64 box. It should be building the
"bleeding edge" 0.23 version but seems to report version 0.22 ??
(1)
There is a newer version of MinGW reported by the MinGW installer than
the version in the script.
(2)
MySQL installs in "C:\Program files (x86)\MySQL\" on Windows 7 by
default not "C:\Program files\MySQL\" as assumed by the script. There
seems to be a bug in the MySQL installer which allows the path to be
changed but then goes ahead and installs it in the (x86) programs folder
regardless. I am using my server's MySQL installation for Mythtv so I
just copied and pasted the local MySQL program files to the expected
location to proceed past this point in the script.
(3)
The DX9 files have now moved to
https://sites.google.com/site/davidbuzz/mythtv-files/DX9SDK_dsound_Include_subset.zip.
The pl script needs to be amended for this.
(4)
typo at around line 227?
my $qt4dir = '/qt/4.5.1/';
should be
my $qt4dir = 'C:/qt/4.5.1/';
else it will not work if the script happens to be on a different drive
as in my case.
(5)
Most (if not all?) of the pl script zip file extracts do not work for me
so they have to be done manually and the script re-run.
(the extracted file list is echoed in the cmd window but no files are
written to disc! )
(6)
At around line 780, taglib is not available from
http://ftp.musicbrainz.org/pub/musicbrainz/users/luks/taglib/taglib-1.5-mingw-bin.zip
therefore I used this one
http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/taglib-1.6.1-mingw-bin.zip
and changed "5" to "6.1" as below
**************************
# taglib 1.6.1 sources changed it's build system under win32 to use 'cmake',
# which we don't have, however pre-compiled mingw 1.6.1 binaries are
available:
[ archive => $sources.'taglib-1.6.1-mingw-bin.zip',
fetch => 'http://users.physik.fu-berlin.de'.
'/~glaubitz/linux-minidisc/taglib-1.6.1-mingw-bin.zip'],
[ dir => $sources.'taglib-1.6.1-mingw-bin',
extract => $sources.'taglib-1.6.1-mingw-bin.zip' ],
[ file => $mingw.'lib/libtag.dll.a',
shell => ['cd '.$sources.'taglib-1.6.1-mingw-bin',
"cp -vr * $unixmingw"],
comment => 'installing: mingw taglib' ],
[ file => $msys.'lib/libtag.dll.a',
shell => ['cd '.$sources.'taglib-1.6.1-mingw-bin',
"cp -vr * $unixmsys"],
comment => 'installing: msys taglib' ],
# Hack for mythplugins/configure to detect taglib version:
[ file => $mingw.'bin/taglib-config',
write => [$mingw.'bin/taglib-config',
'#!/bin/sh
case $1 in
"--version") echo 1.6.1 ;;
"--prefix") echo /mingw ;;
esac'] ],
[ always => [],
shell => ["chmod 755 $mingw/bin/taglib-config"] ],
**************************
(7)
I got this output regarding the the libvisual patch
***************
COMMENTS:------------------------------
COMMENTS:Create patch for libvisual
COMMENTS:------------------------------
grep-ing for pattern(sched_setscheduler \(getpid \(\), SCHED_OTHER\);)
in file(C
:/MSys/1.0/sources/libvisual-0.4.0/libvisual/lv_os.c):
shell:C:\MSys\1.0\bin\bash.exe -c "( export
PATH=/bin:/mingw/bin:$PATH;cd /sourc
es//libvisual-0.4.0/libvisual;patch -p0 <
C:/MSys/1.0/sources/libvisual.patch) 2
>&1 "
patching file lv_os.c
Hunk #1 FAILED at 59.
Hunk #2 FAILED at 77.
2 out of 2 hunks FAILED -- saving rejects to file lv_os.c.rej
EFFECT FAILED (grep -> shell): unable to locate regex pattern
(sched_setschedule
r \(getpid \(\), SCHED_OTHER\);) in file
(C:/MSys/1.0/sources/libvisual-0.4.0/li
bvisual/lv_os.c)
***************
and the lv_os.c.rej file says
***************
*** 59,65 ****
attr.sched_priority = 99;
/* FIXME: Do we want RR or FIFO here ? */
- ret = sched_setscheduler (getpid (), SCHED_FIFO, &attr);
return ret >= 0 ? VISUAL_OK : -VISUAL_ERROR_OS_SCHED;
#else
--- 59,65 ----
attr.sched_priority = 99;
/* FIXME: Do we want RR or FIFO here ? */
+ ret = sched_setscheduler (getpid (), SCHED_FIFO);
return ret >= 0 ? VISUAL_OK : -VISUAL_ERROR_OS_SCHED;
#else
*** 77,83 ****
int ret;
attr.sched_priority = 0;
- ret = sched_setscheduler (getpid (), SCHED_OTHER, &attr);
return ret >= 0 ? VISUAL_OK : -VISUAL_ERROR_OS_SCHED;
#else
--- 77,83 ----
int ret;
attr.sched_priority = 0;
+ ret = sched_setscheduler (getpid (), SCHED_OTHER);
return ret >= 0 ? VISUAL_OK : -VISUAL_ERROR_OS_SCHED;
#else
***************
which does not mean a whole lot to me (maybe the date is different in
the file ID?) so I commented the patch stuff out of the pl script and
did the patch manually.
(8)
the next problem I hit is this...
***************
COMMENTS:------------------------------
COMMENTS:Create patch1 for QT4
COMMENTS:------------------------------
grep-ing for pattern(Option::shellPath.isEmpty) in
file(C:/qt/4.5.1/qmake/option
.cpp):
shell:C:\MSys\1.0\bin\bash.exe -c "( export
PATH=/bin:/mingw/bin:$PATH;cd /c/C/q
t/4.5.1/;dos2unix qmake/option.cpp;patch -p1 <
C:/MSys/1.0/sources/qt-4.5.1.patc
h1) 2>&1 "
/bin/bash: line 0: cd: /c/C/qt/4.5.1/: No such file or directory
dos2unix: converting file qmake/option.cpp to UNIX format ...
dos2unix: problems converting file qmake/option.cpp
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- 4.5.1/qmake/option.cpp.bak 2009-06-28 16:35:29 -0500
|+++ 4.5.1/qmake/option.cpp 2009-06-28 16:35:47 -0500
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
EFFECT FAILED (grep -> shell): unable to locate regex pattern
(Option::shellPath
.isEmpty) in file (C:/qt/4.5.1/qmake/option.cpp)
***************
caused by an error on or around line 1145
shell => ['cd '.$unixqt4dir, 'dos2unix qmake/option.cpp',
'patch -p1 < '.$sources.'qt-4.5.1.patch1'] ],
which should read
shell => ['cd '.$qt4dir, 'dos2unix qmake/option.cpp',
'patch -p1 < '.$sources.'qt-4.5.1.patch1'] ],
and at or around line 1190
shell => ['cd '.$unixqt4dir, 'dos2unix mkspecs/win32-g++/qmake.conf',
'patch -p1 < '.$sources.'qt-4.5.1.patch2'] ],
should be
shell => ['cd '.$qt4dir, 'dos2unix mkspecs/win32-g++/qmake.conf',
'patch -p1 < '.$sources.'qt-4.5.1.patch2'] ],
Thinking this problem might be repeated, I did a search "$unixqt4dir"
and replace with "$qt4dir" which replaced 4 instances.
re-run the pl script and now we get
***************
COMMENTS:------------------------------
COMMENTS:Create patch2 for QT4
COMMENTS:------------------------------
grep-ing for pattern(QMAKE_COPY_DIR.*?= cp -r) in
file(C:/qt/4.5.1/mkspecs/win32
-g++/qmake.conf):
shell:C:\MSys\1.0\bin\bash.exe -c "( export
PATH=/bin:/mingw/bin:$PATH;cd C:/qt/
4.5.1/;dos2unix mkspecs/win32-g++/qmake.conf;patch -p1 <
C:/MSys/1.0/sources/qt-
4.5.1.patch2) 2>&1 "
dos2unix: converting file mkspecs/win32-g++/qmake.conf to UNIX format ...
patching file mkspecs/win32-g++/qmake.conf
Hunk #1 FAILED at 76.
Hunk #2 FAILED at 93.
2 out of 2 hunks FAILED -- saving rejects to file
mkspecs/win32-g++/qmake.conf.r
ej
EFFECT FAILED (grep -> shell): unable to locate regex pattern
(QMAKE_COPY_DIR.*?
= cp -r) in file (C:/qt/4.5.1/mkspecs/win32-g++/qmake.conf)
***************
here is the patch rej file
***************
*** 76,87 ****
MINGW_IN_SHELL = 1
QMAKE_DIR_SEP = /
QMAKE_COPY = cp
- QMAKE_COPY_DIR = xcopy /s /q /y /i
QMAKE_MOVE = mv
QMAKE_DEL_FILE = rm
- QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
} else {
QMAKE_COPY = copy /y
QMAKE_COPY_DIR = xcopy /s /q /y /i
--- 76,90 ----
MINGW_IN_SHELL = 1
QMAKE_DIR_SEP = /
QMAKE_COPY = cp
+ QMAKE_COPY_DIR = cp -r
QMAKE_MOVE = mv
QMAKE_DEL_FILE = rm
+ QMAKE_MKDIR = mkdir -p
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
+ QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+ QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+ QMAKE_IDC = $$[QT_INSTALL_BINS]/idc
} else {
QMAKE_COPY = copy /y
QMAKE_COPY_DIR = xcopy /s /q /y /i
***************
*** 90,101 ****
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = if not exist
}
- QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
- QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
- QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
-
QMAKE_IDL = midl
QMAKE_LIB = ar -ru
QMAKE_RC = windres
--- 93,103 ----
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = if not exist
+ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
+ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
+ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
}
QMAKE_IDL = midl
QMAKE_LIB = ar -ru
QMAKE_RC = windres
***************
My eyes glaze over when I see "regex" so I just comment it all out and
make the patch manually.
(9)
At or around line 1200 there are errors in
set PATH=%QTDIR%\bin;%MINGW%\bin;%SystemRoot%\System32
which should read
set PATH=%QTDIR%bin;%MINGW%bin;%SystemRoot%\System32
because the %QTDIR% and %MINGW% variables already have trailing slashes.
(10)
The next error is around line 1215
the output is
E:\>rem This compiles only the sqldrivers folder:
E:\>C:\MSys\1.0\bin\yes | configure -opensource -plugin-sql-mysql
-no-sql-sqlite -debug-and-release -fast -no-sql-odbc -no-qdbus
'configure' is not recognized as an internal or external command,
operable program or batch file.
This is fixed by modifying the line
'.$dosmsys.'bin\yes | configure -opensource -plugin-sql-mysql
-no-sql-sqlite -debug-and-release -fast -no-sql-odbc -no-qdbus
to
'.$dosmsys.'bin\yes | %QTDIR%configure -opensource -plugin-sql-mysql
-no-sql-sqlite -debug-and-release -fast -no-sql-odbc -no-qdbus
and this fix can be made to the other 3 instances of "configure" in this
area of code.
I then did a search to replace "%QTDIR%\" with "%QTDIR%" (to remove the
following slashes) because the variable already contains a following slash.
running the pl script again I get
E:\>rem This compiles only the sqldrivers folder:
E:\>C:\MSys\1.0\bin\yes | C:\qt\4.5.1\configure -opensource
-plugin-sql-mysql-no-sql-sqlite -debug-and-release -fast -no-sql-odbc
-no-qdbus
Error: Creating a shadow build of Qt requires perl to be in the PATH
environment
this is my PATH with the correct path to perl.exe as the very first
item... (which I had to insert using Control Panel as the Perl installer
failed to do so)
PATH=C:\Perl64\bin;C:\Program Files (x86)\Embarcadero\RAD
Studio\7.0\bin;C:\User
s\Public\Documents\RAD
Studio\7.0\Bpl;C:\Windows\system32;C:\Windows;C:\Windows\
System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Torto
iseSVN\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files
(x86)\MyS
QL\MySQL Server 5.1\bin
I messed with this problem for a while including re-boot etc. but I seem
to be stuck at this point. The coffee has run out so I am going to bed.
Any help with this would be very welcome.
As a temporary solution I installed the v22 23616 build from
http://members.iinet.net.au/~davco/ and then built this version from svn
on my Linux box.
regards
Leslie Kaye
More information about the mythtv-dev
mailing list