Opened 12 years ago

Closed 10 years ago

#4397 closed enhancement (fixed)

win32 dependancy resolver and build script

Reported by: David Bussenschutt <davidbuzz@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.22
Component: Ports - Windows Version: unknown
Severity: medium Keywords: Win32 Windows
Cc: Ticket locked: no

Description

Just wanted to let the Win32 interested parties know I'm working on a build script for Windows that will be aiming to replicate all the steps found in: http://www.mythtv.org/wiki/index.php/Windows_Port So far, I have it downloading, extracting, and compiling 90% of the archives automatically. it's not doing any patching/etc yet. It's still a real "work-in-progress", and is not truly usable to actually complete a full build with, but I thought that there are others out there that might benefit from it. It's a perl script, just like the OSX one is, so you need to have perl installed. I recommend Activestate perl for windows ( http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.8.822-MSWin32-x86-280952.msi ) I'd be interested in getting this put into SVN 'contrib' like the OSX-packager.pl - how would the core developers feel about this? ( I guess you'll want to see the code first, so I've opened a new trac ticket to attach the code to! )

Attachments (35)

win32-packager.zip (4.1 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
the script (you'll have to unzip it first!)
win32-packager2.zip (5.5 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
win32-packager3.zip (6.4 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
latest version - again.
win32-packager4.zip (9.8 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
be sure to only download the latest version, all earlier ones are superceded
win32-packager5.zip (10.2 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
fixed typos, SVN integral support.
win32-packager6.zip (10.7 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
initial proxy support (not for svn use tho). more typos fixed.
win32-packager7.zip (11.4 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
win32-packager8.zip (12.0 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
win32-packager9.zip (12.1 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
win32-packager10.zip (12.2 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
win32-packager11.zip (13.6 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
win32-packager12.zip (13.6 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 12 years ago.
win32-packager.13.patch (7.3 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
patch against current version of script found: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl
win32-packager.14.patch (2.3 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
fixes bug in mysql msi dependancies for installing libmysql.dll
win32-packager.14.2.patch (52.8 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
superceedes patch 13 (incorporated), diff is against current SVN head. many enhancements, see trac log.
win32-packager.15.patch (52.8 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
ignore all 13 and 14 series patches, please use this roll-up patch.
win32-packager.16.patch (59.4 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
apply agains current SVN head, superceedes all previous patches.
win32-packager.17.patch (22.4 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
latest, superceeded all previous. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl
win32-packager.18.patch (13.5 KB) - added by David Bussenschutt <davidbuzz@…> 12 years ago.
latest, superceeded all previous. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl
win32-packager.19.patch (19.4 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 11 years ago.
win32-packager.20.patch (6.0 KB) - added by davidbuzz@… 11 years ago.
v20 - superceeds all previous vers. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl
win32-packager.21.patch (7.0 KB) - added by David Bussenschutt (aka buzz) <davidbuzz@…> 11 years ago.
v21 - superceeds all previous vers. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl
mysqlhpatcherror.txt (713 bytes) - added by DannyCan@… 11 years ago.
The mysql.h patch error
win32-packager.21_2.patch (6.6 KB) - added by Jay Modi <jaymode@…> 11 years ago.
Redo of V21 created by Buzz to fix patching issues as some formatting in the script was changed in r16550
win32-packager.22.patch.zip (15.1 KB) - added by davidbuzz@… 11 years ago.
v22 - superceeds all previous vers. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/build/win32-packager.pl (zipped because trac thought the unzipped file was spam)
win32-packager.23.patch (17.6 KB) - added by Buzz <davidbuzz@…> 11 years ago.
v23 - superceeds all previous vers. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl
win32-packager.24.patch (3.5 KB) - added by davidbuzz@… 11 years ago.
patch to remove 4706 which is no longer required, tweak QT4 build parameters (both debug and release), and to comment-out the part of the QT4 build that skips the examples as it's flawed.
win32-packager.25.patch (14.9 KB) - added by davidbuzz@… 11 years ago.
patch v25, adds 'always' functionality, converts existing code to use it, a few other minor fixes
win32-packager.27.patch (3.8 KB) - added by Buzz <davidbuzz@…> 11 years ago.
latest patch for win32-packager
win32-packager.28.zip (14.5 KB) - added by Buzz <davidbuzz@…> 11 years ago.
first win32-packager to create working QT4 based binaries. (zipped because trac thought it was spam)
win32-packager.29.patch (16.1 KB) - added by Buzz <davidbuzz@…> 11 years ago.
latest patch for win32-packager
win32-packager.2ndAug2008patch.zip (7.3 KB) - added by davidbuzz@… 11 years ago.
latest patch for win32-packager
win32-packager_22_sep_2008.patch.zip (7.8 KB) - added by davidbuzz@… 11 years ago.
latest enhancements
win32-packager_27_sep_2008.patch (2.7 KB) - added by davidbuzz@… 11 years ago.
minor enhancement and correction - change 'lib' to 'bin' to allow plugins to build to completion.
win32-packager_26_jan_2009.zip (12.2 KB) - added by davidbuzz@… 10 years ago.
win32 build script - upgraded version of many packages(qt,mysql,etc), and added patches so it now should build HEAD.

Download all attachments as: .zip

Change History (119)

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager.zip added

the script (you'll have to unzip it first!)

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager2.zip added

comment:1 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

please download version 2 of the script, I have added significantly better comments, and flagged thsoe parts oof the code that are TODO. see: win32-packager2.zip

comment:2 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

please download version 3 of the script, previous iterations should be removed/deleted ( I don't have permissions to remove from trac, or I would). errors in previous versions that are fixed in this one include:

  • missing binmode() was causing some downloads to be corrupted (especially .exe's)
  • SDL extract/build had a typo causing fftw to be used (bah!)
  • long delays with no visible output have been fixed with all command output now displayed to screen in an unbuffered way
  • now aborts the script if it was unable to perform the action (test after action to see if cause of action os resolved)
  • cause and effect code re-worked to separate them logically
  • now supports extracting downloaded .zip archives (previousy .gz and .bz2 only)
  • also downloads/extracts command-line SVN client, although it does not use it yet.
  • still has a fairly long TODO list ( see the code for some of them) - I'm working on it!

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager3.zip added

latest version - again.

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager4.zip added

be sure to only download the latest version, all earlier ones are superceded

comment:3 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

version 4 of the script ( win32-packager4.zip ) now has the following additions:

  • builds QT, including necessary patches ( which are downloaded automatically)
  • attempt to build mythtv, including necessary patches (delete c:\mythtv\no_build.txt and re-execute this script to re-try building the myth source code)
  • [write] keyword supports writing config/shell/text/patch files on-the-fly, allowing the environment and utility tools to be created and used.
  • more , and clearer commenting
  • build macro's now follow along in the same order as the http://www.mythtv.org/wiki/index.php/Windows_Port wiki page (which is the definitive instruction set still)

making it easier to see differences in logic between the two

  • supports actions that need to occur everytime the script is executed, irrespective of dependancies (ie always-trigger actions)
  • creates batch script for building QT (and uses it)
  • creates shell script/s for building mythtv (and uses it)
  • patches the mysql.h file automatically according to requirements.

Apart from the requirement to download/update the mythtv SVN code automatically ( shouldn't be hard), this build script SHOULD be an almost complete run-and-wait-a-few-hours methodology for getting a win32 developer build off the ground.

I'd consider this code now alpha, testers welcome...but expect bugs.

Next version will allow a "virgin" Win32 PC to get everything it needs automatically, and will be more thoroughly tested.

Devs, can this put this in SVN soon?

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager5.zip added

fixed typos, SVN integral support.

comment:4 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Thanks for your feedback Simon! I've corrected all the issues you identified, and some others, and will be uploading the newer version of it in a few minutes. (check here in 5 minutes: http://svn.mythtv.org/trac/ticket/4397 ) So far, I've had mostly typos/spelling errors (sorry), but I've added SVN checkout/update code for mythtv code too:

  • for some reason the sourceforge server 'intermap' is/was timing out last night (I hit that problem too), so I changed all the servers like you did, and added it as a declaration near the top of the script , so you can pick one you like. ( to be closer to where you are, hopefully).
  • In a number of places, I saved downloaded files as a .tar.gz instead of a .tar.bz2 (oops) - may cause grief with "unknown gzip format"
  • I put $msys or $sources variables inside single quited strings (derh!) - in a couple of places.
  • I had some folder names blatently incorrect ( trying to save to a folder that is possibly non-existant at that time) eg: qt tries to extract to a folder that doesn't exist yet.
  • for your fix, I did just this tiny change (note the extra slash), avoiding adding them all over the rest of the script:

from: $t =~ s#$msys##i;

to: $t =~ s#$msys#/#i;

  • I've added the ability to get/update mythtv code via SVN.

let's call this next one: alpha-release-2

comment:5 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

there are still a few more typos to iron out, another version coming soon....

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager6.zip added

initial proxy support (not for svn use tho). more typos fixed.

comment:6 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

  • I have added the proxy code (actually already had it written prior to your suggestion, but we had the same idea), but as you suggested SVN features don't work through typical firewalls, so I've added a feature to avoid the auto-SVN-update , anf if possible continue.
  • I have also fixed other typo's, including the SVN checkout process checking-out way more than was needed, AND to the wrong folder.
  • couple of other typos fixed.
  • I think I have all the bugs now, except for the mysql-server.msi thingy not autodownloading.

comment:7 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

TIP, using latest SVN, the required mythtv patches have now changed. using SVN:15290, the following win32 patches are required at a minimum to complete a win32 build: #4409 #4411 other patches may be necessary for functionality, but may also break build (unknown): #4392 #4391

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager7.zip added

comment:8 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

  • latest version (7) uploaded.
  • reworked all path variables so that there should be no outstanding reasons why the $sources folder can't be located anywhere you want. it's not been 100% tested though
  • mysql-server. msi file will now download properly (uses a specific US mirror).
  • applies currently relevant patch set/s to latest SVN.
  • is not yet as thoroughly tested as v6, especially the path/slash\otherslash handling code.
  • supports a new action [mkdirs] that will recursively create subfolders.
  • if a non-empty proxy is used, no SVN updates are done. If made empty, it's reenabled.
  • @components list ( mythtv,mythplugins,myththemes ) is now used as the list of folders to SVN checkout/update, allowing easier changes.

# currently auto-applies patches from #4391, #4392, #4409, #4411 to mythtv, as well as http://tanas.ca/qt.patch to QT sources.

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager8.zip added

comment:9 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

  • latest version (8) uploaded.
  • added perl2dos and perl2unix functions to convert path handling consistently.
  • reworked all variables to use correct $dosxxx,$unixxxx or $xxx variables according to the location the execution will occur in - ie [exec], [shell] or perl, respectively.
  • tar/bz2/zip extraction fixed as per Harold's suggestion ( although I refactored to take advantage of perl2dos and perl2unix ). creates a sh2.exe for this purpose too.
  • now assumes that msys mounts for / and /ming are correct, and simplifies paths.
  • removed all incorrect "double slashing" from msys commands ie /blahblah or bin/tar.exe which are not always correctly handled as equivalent to a single slash, especially at the start of a path.
  • no longer downloads/requires entire dx9 sdk from MS, instead uses a mythtv developer supplied zipfile (supplied by buzz). saves a 438MB download, now only downloads 92K.

CAUTION: script as NOT be run right through from the beginning at this time, alpha code still.

comment:10 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

apologies, I left the proxy setting enabled in v8, try v9

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager9.zip added

comment:11 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

regarding V10:

  • v8/9 script has now undergone end-to-end testing, and numerous silly errors have been corrected. Bah.
  • SHOULD NOW ACTUALLY WORK! :-) Lets call this a FIRST BETA. :-)

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager10.zip added

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager11.zip added

comment:12 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

v11 of script adds the following:

  • executes the mysql server installer
  • added user-visible comments, as suggested by Simon Kenyon
  • puts zlib files into MinGW (as well as msys), for taglibs sake.
  • re-worked all the causes/actions that use multiple parameters, and converted them all to use a sub-array structure that more consistent, and easire to debug. (thus made adding comments possible).
  • added new [grep] cause that can check if a patch is already applied, and thus does away with most of the requirements to use 'marker' files. some still exist tho. All the patch related code actions now use this.
  • fixed patch for mysql.h
  • made script emit the TODO/NOTES to the screen at the end, so we can see the not-yet-done bits.

Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager12.zip added

comment:13 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

  • v12 is a very minor change to v11 (bug fix only):
  • actually installs the 'coreutils' package now, rather than just downloading it. thanks to simon for picking this up.

comment:14 Changed 12 years ago by Nigel

(In [15333]) Place David Bussenschutt's windows build stript somewhere sensible. This is v12 with minor whitespace changes. See #4397.

comment:15 Changed 12 years ago by Nigel

Brave Windows builders, this script can probably now be downloaded using http://cvs.mythtv.org/trac/browser/trunk/mythtv/contrib/Win32/win32-packager.pl?format=txt
David, I hope I didn't stuff anything up with the formatting changes. Attach future changes here as v13.patch et c.

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager.13.patch added

patch against current version of script found: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl

comment:16 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

script v13 has been released, it adds:

  • information about the version of SVN that the script has been most recently tested with, so that users can at least make it work with that version. (because SVN, especially on Win32 at the moment is a moving target).
  • revised the patch set/s that need to be applied.

Hint for existing users of this script: If you dont have any local changes of your own that you want to keep, then you may find that doing a 'svn revert .' in the c:\mythtv\mythtv folder prior to running/re-running this latest version will help remove any earlier unnecessary patches, and give you a "working Win32 build" to start your own development/testing from.

comment:17 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

correction: make that 'svn revert -R .' in my previous statement.

comment:18 Changed 12 years ago by Nigel

v13 now checked in [15375]

comment:19 Changed 12 years ago by achew22

When I tried this on my laptop (which I already had MySQL on it) it wouldn't let me continue past the MySQL install part since I had already configured it to allow me to do work on my laptop if I don't have internet. This prevented me from continuing. It shouldn't really be necessary to have the MySQL server on the computer since its (for me at least) just going to be a front end.

comment:20 Changed 12 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Actually, it's only really necessary to install the Include/Lib? files as per the instructions here: http://www.mythtv.org/wiki/index.php/Windows_Port#MySQL which say: "Ensure that C Include Files / Lib Files are installed onto the local drive"

That is done by choosing a "custom" install, and just selecting that component to install as a minimum.

Intil you do that you will be unable to continue.

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager.14.patch added

fixes bug in mysql msi dependancies for installing libmysql.dll

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager.14.2.patch added

superceedes patch 13 (incorporated), diff is against current SVN head. many enhancements, see trac log.

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager.15.patch added

ignore all 13 and 14 series patches, please use this roll-up patch.

comment:21 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

v15 (aka 14.2 by mistake) is a larger changeset including the follwoing new features:

  • dodgy regular expression munging of directory slashes is GONE. all [exec] and [shell] actions must now bne written using their respecive slashing styles. (ie \backslashs\ in [exec] and /forwardslashes/ in [shell]. this is much easier to read and maintain.
  • two new 'cause's for building the dependancies list :- [filesame] tests if two files are identical by both size and mtime [newer] tests if the first of two files given is newer by mtime only
  • one new 'event' which is for copying single files :- [copy] will copy the src to the destn. If empty parameters are given and it's a [filesame] test, it uses the files fiven in the cause for the action.
  • MUCH improved the dependancies in both the QT build AND the MYTHTV build steps, so that it no longer blindly rebuilds all-or-nothing, not perfect yet, but its more intelligent.
  • Added more post-QT-build steps to verify that the QT build was actually successful before blindly moving on to mythtv.

comment:22 in reply to:  21 Changed 12 years ago by Jay Modi <jaymode@…>

Replying to David Bussenschutt <davidbuzz@gmail.com>:

v15 (aka 14.2 by mistake) is a larger changeset including the follwoing new features:

I used v15 on a new box and I seem to be experiencing an error when trying to apply the qt patches: file exists: C:/msys/1.0/sources/qt.patch no parameters defined, so applying effect(copy) as ( 2nd src parameter => 1st sr c parameter)!

unknown effecttype copy from cause 'dir'

Seems to be in this portion of code: [ archive => $sources.'qt.patch' , 'fetch' => 'http://tanas.ca/qt.patch',comment => ' patch the QT sources'], [ filesame => [$msys.'qt-3.3.x-p8/qt.patch',$sources."qt.patch"], copy => [=>] ], [ grep => ["\-lws2_32", $msys.'qt-3.3.x-p8/mkspecs/win32-g++/qmake.conf'], shell => ["cd ".$unixmsys."qt-3.3.x-p8/","patch -p1 < qt.patch"] ],

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager.16.patch added

apply agains current SVN head, superceedes all previous patches.

comment:23 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

changes in V16:

  • more debugging in the case of an unknown cause or event
  • uses pattern matching on event names, so they are case and whitespace insensitive
  • detection code to find if a local mysql server is running/connectable
  • gets you to install a local mysql server if its not
  • auto-configures the mythtv/mythtv username/password into the local mysql database * auto-creates an empty mythconverg database
  • auto-creates a mysql.txt connection file for connecting to the local database.

WARNINGS:

  • this script currently assumes that you want a local Win32 mysql server, TODO is to allow a remote server.
  • auto-resets the password to mythtv if it wasn't before, sorry.

comment:24 Changed 12 years ago by Nigel

(In [15462]) Patch from David Bussenschutt, bring this up to V16. See #4397.

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager.17.patch added

latest, superceeded all previous. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl

comment:25 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

changes in v17:

  • fixes issue with zlib.h dependancies identified by Jay.
  • no longer defaults to latest SVN, instead defaults to a "known good" Win32 SVN version to at least get the build to work initially.
  • improved readability of error messages for when script fails to run to completion (which is frequently).
  • corrected minor dependancy problems with getting an SVN update not causing mythtv to undergo a re'make'.
  • added basics to support building myhtplugins (disabled though, as SVN is currently broken for mythplugins).
  • better support for turning $NOISY off.

comment:26 Changed 12 years ago by Nigel

(In [15514]) Patch from David Bussenschutt, brings this up to v17. See #4397

Changed 12 years ago by David Bussenschutt <davidbuzz@…>

Attachment: win32-packager.18.patch added

latest, superceeded all previous. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl

comment:27 Changed 12 years ago by David Bussenschutt <davidbuzz@…>

changes in V18:

  • builds with recent SVN - 15528.
  • includes the 5 known current patches for this svn version for win32.
  • fixes the 2 spurious messages that were being emitted at the start of the script.
  • fixes/pervents zero-length Makefile that might be created by previous version/s.
  • doesn't bomb-out when trying to grep a non-existant file for a pattern.

Changed 11 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager.19.patch added

comment:28 Changed 11 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

changes in v19:

  • builds with most recent SVN! no patches to main mythtv trunk for win32.
  • corrects/extends some dependancies to cause a rebuild under the correct instances.
  • starts work on building mythplugins automatically ( commented out, but written).

comment:29 Changed 11 years ago by Nigel

(In [15715]) V19 from David Bussenschutt. See #4397

comment:30 Changed 11 years ago by Jay Modi <jaymode@…>

I am testing out the latest version of the script and I had issues with downloading the gdb file. It created a file that was 0 bytes. I was able to continue by manually downloading the file from the same link that the script was using and placing it in the sources folder.

Changed 11 years ago by davidbuzz@…

Attachment: win32-packager.20.patch added

v20 - superceeds all previous vers. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl

comment:31 Changed 11 years ago by anonymous

changes in v20 of this script:

  • now correctly ensures that zlib exists in both /mingw/lib and /lib.
  • updated to support the fact that SVN libraries are now labeled as 0.21
  • emits a hopefully-useful error message, and dies when it is unable to automatically download a file and it's non-existant or zero-length.
  • minor cleanups.

comment:32 Changed 11 years ago by Nigel

(In [15971]) V20 from David Bussenschutt. See #4397

comment:33 Changed 11 years ago by Nigel

(In [15972]) (pick a branch, any branch) V20 from David Bussenschutt. See #4397

comment:34 Changed 11 years ago by achew22@…

Has anyone had success with the build scripts? Are they statically linked? Does anyone know what would be required to be able to distribute binaries formed from this script. Could a NSIS (http://nsis.sourceforge.net/) installer be made for these? That might by simplifying the process even more. I've played with NSIS before and I seem to remember that it can do autobuilds, so we could try and setup something like the Mac people have with a appfolder but in a NSIS installer package. Just a few ideas though if I have more time (and more hard drive space) I'll definitely take a look into it.

~Andrew Allen

comment:35 Changed 11 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Andrew A, I've personally had a lot of success with the win32 build script, and I kow that a couple of others have too, but most important is that thus is currently a "developer" oriented tool and is NOT reliable enough to just say "make me an installer", and expect it to work. The code-base follows not-too-far-behind SVN HEAD (I'm trying to keep script updates under a week apart) , but SVN is a volatile beast, and it's even more hazardous on the new Win32 platform, so as will all unreleased code, YMMV. However, that said, this win32 script could easily for the basis for building -release packages (when we get to that) , in conjunction with something like NSIS or similar.....so now the question is "Will win32 be ready for the .22 release? " I can't tell you that, as I don't know. :-)

Buzz.

comment:36 Changed 11 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

the win32 build requires about 30 .dll's, and a 'themes' folder, ( among other things) in order to run.

Changed 11 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

Attachment: win32-packager.21.patch added

v21 - superceeds all previous vers. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl

comment:37 Changed 11 years ago by David Bussenschutt (aka buzz) <davidbuzz@…>

changes in v21 of this script:

  • builds with most recent SVN.
  • includes the 4(four) outstanding known/required patches for getting a good Win32 build. (#4724,#4706,#4699,#4702)
  • now forces a 'make clean' whenever a SVN revision changes. it was already supposed to do this, but didn't.
  • includes msys*.dll's into the 'run' folder (run it from here), as these seem to be required.
  • re-tested entire build process for all dependancies in this release, All dependancies still build well.

TIP: this version is highly-likely to get you a WORKING win32 frontend. (It does for me, but YMMV). :-)

comment:38 Changed 11 years ago by Jeff Black <jmblack256@…>

svn rev 16196 (latest today)

note: these directories do not get created by win32-packager.pl c:\mythtv\myththemes\ c:\mythtv\mythplugins\ because the directories do not get created the script fails to grab source for them. If you manually create said directories the script is able to grab the source successfully.

comment:39 Changed 11 years ago by Jeff Black <jmblack256@…>

svn rev 16196

COMMENTS:------------------------------ COMMENTS:Second check - that the local mysql server is at least now now running?

COMMENTS:------------------------------

exec:C:/mythtv/testmysql.bat testing connection to a local mysql server... 'sleep' is not recognized as an internal or external command, operable program or batch file. 'sleep' is not recognized as an internal or external command, operable program or batch file.

comment:40 Changed 11 years ago by Jeff Black <jmblack256@…>

after applying latest patch v21, the 'sleep' issue is fixed. Please excuse the noise. AFAIK the directory issue is still present.

comment:41 in reply to:  38 Changed 11 years ago by davidbuzz@…

c:\mythtv\myththemes\ c:\mythtv\mythplugins\ because the directories do not get created the script fails to grab source for them. If you manually create said directories the script is able to grab the source successfully.

Jeff, Removing one or both of these directories entirely and re-runing the script re-creates it for me (the svn command creates them). I am unable to re-create your reported error. Please provide a cut-n-paste of the output you get if you try the same. email directly to me, if you like. Buzz.

comment:42 Changed 11 years ago by DannyCan@…

I have been trying to get this to work for the past ~6 hours and it just wont patch the mysql.h file. It appears to me that the patch is not correct in some way. I will post the output of what I am seeing.

Could someone fix it or direct me to the solution?

Thanks!

Changed 11 years ago by DannyCan@…

Attachment: mysqlhpatcherror.txt added

The mysql.h patch error

comment:43 Changed 11 years ago by arjeousski@…

Hey, I've sent this to buzz but also wanted to post it here...

I've done a full compile on my win32 box and here are the changes that i've had to make in order for it to work correctly...

  1. By default under /etc/fstab the mingw entry that I've had was:

c:Mingw /mingw

I had to change that to: c:/Mingw /mingw for it to work.

  1. When creating mysql.txt I had to manually create a folder ".mythtv" under my %HOMEPATH%. Maybe this could be automated as well.

Changed 11 years ago by Jay Modi <jaymode@…>

Attachment: win32-packager.21_2.patch added

Redo of V21 created by Buzz to fix patching issues as some formatting in the script was changed in r16550

comment:44 Changed 11 years ago by Jay Modi <jaymode@…>

I was just wondering if there is a reason V21 of the script has not made it into SVN yet? I attached a new patch, (no changes that are not in V21) against the current version of the script in SVN.

comment:45 Changed 11 years ago by Nigel

(In [16733]) V21 updates by David Bussenschutt and Jay Modi. See #4397

Changed 11 years ago by davidbuzz@…

Attachment: win32-packager.22.patch.zip added

v22 - superceeds all previous vers. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/build/win32-packager.pl (zipped because trac thought the unzipped file was spam)

comment:46 Changed 11 years ago by davidbuzz@…

changes in v22 of this script:

  • has early QT4 support (and continues QT3 support too)
  • integrates a lot of enhancements from #5160 by arnonm (thanks!) including command line parameters, usage, optional build support for a win32 "installer", compiling trunk, or branches, more thorough etc.
  • more intelligently resolves a users homefolder
  • makes applying patches optional
  • renames 'run' folder to 'build', and associated scripts, because it's really just a place to assemble/test the required binaries to then build an "installer". (thanks arnonm for that too)
  • this version is less thoroughly tested than previous versions, but at least buildd trunk for me.

comment:47 Changed 11 years ago by Nigel

(In [16990]) Patch from David, based on patch by Arnon. See #4397, See #5160. Note that I made some formatting changes, changed the paths for the extra packaging files to contrib/Win32/build, and took out all Config::IniFiles?

Changed 11 years ago by Buzz <davidbuzz@…>

Attachment: win32-packager.23.patch added

v23 - superceeds all previous vers. patch against current file at: http://svn.mythtv.org/svn/trunk/mythtv/contrib/Win32/win32-packager.pl

comment:48 Changed 11 years ago by Buzz <davidbuzz@…>

changes in v23 of this script:

  • fixed the QT4 configure parameters to actually work (doh!)
  • standardised commenting and layout of subroutines better.
  • re-arranged a couple of sections due to chicken-and-egg issues (like using the $msys variable in the perl2unix function before it was defined)
  • QT4 also needs sh.exe to NOT be in path, so added fixes for that

comment:49 Changed 11 years ago by arnonm@…

Nigel,

Two corrections to the script: 1127c1173 < #define MyAppVerName? "MythTv? '.$version.'(svn_'.$SVNRELEASE .')" ---

#define MyAppVerName? MythTv? "'.$version.'(svn_'.$SVNRELEASE .')"

1134c1180 < find . -type f -printf "Source: '.$mythtv.'build/%h/%f; Destdir: {app}/%h\n" | sed "s/\.\/" | grep -v ".svn" | grep -v "isfiles" | grep -v "include" > '.$unixmythtv.'/build/isfiles/files.iss ---

find . -type d -o -path "./include/*" -prune -o -path "*.svn*" -prune -o -printf "Source: c:/mythtv/build/%h/%f; Destdir: {app}/%h\n" | sed "s/\.\/" > '.$unixmythtv.'/build/isfiles/files.iss

comment:50 Changed 11 years ago by Nigel

(In [17017]) A few packaging corrections by David Bussenschutt. See #4397

comment:51 Changed 11 years ago by Buzz <davidbuzz@…>

Thanks Nigel, but actually that was Arnonm, not me for [17017]. :-)

comment:52 Changed 11 years ago by anonymous

Current trunk script does not work.

Complains about broken shell. Shell was downloaded and installed by script.

comment:53 Changed 11 years ago by anonymous

Anonymous, as this is an ongoing developer effort, there is no such thing as a free lunch. Please provide accurate details (ie the exact message) of what/how/why it's "not working", and we'll help you fix it. Yes, there are some minor issues with the current script, but that's not because the script is necessarily broken, it's more to do with the continual game of chase that we (the script authors) play trying to keep the script working while the code is changed out from under us by the other developers (the current issues mostly being related to the recent port to QT4).

comment:54 Changed 11 years ago by davidbuzz@…

(last comment was posted by me)

comment:55 Changed 11 years ago by anonymous

Configure sometimes complains about a broken shell if I run win32-packager.pl in a MSYS window.
Try .\win32-packager.pl in a DOS Command Prompt instead?

comment:56 Changed 11 years ago by davidbuzz@…

Anonymous, win32-packager.pl is a native application, so Yes to a DOS box, or double-clicking it from windows will work too. It's not tested to run under MSYS, but it does utilize parts of MSYS (ie bash, etc) to do it's dirty work.

Changed 11 years ago by davidbuzz@…

Attachment: win32-packager.24.patch added

patch to remove 4706 which is no longer required, tweak QT4 build parameters (both debug and release), and to comment-out the part of the QT4 build that skips the examples as it's flawed.

comment:57 in reply to:  53 ; Changed 11 years ago by anonymous

Replying to anonymous:

Anonymous, as this is an ongoing developer effort, there is no such thing as a free lunch. Please provide accurate details (ie the exact message) of what/how/why it's "not working", and we'll help you fix it. Yes, there are some minor issues with the current script, but that's not because the script is necessarily broken, it's more to do with the continual game of chase that we (the script authors) play trying to keep the script working while the code is changed out from under us by the other developers (the current issues mostly being related to the recent port to QT4).

Unfortunately, I can't do a copy paste of the error, as trac says it matches spam patterns (??)

Basically it starts the configure process of mythtv, but gives an error message saying "broken shell" trying bash, but then gives an error about memalign function, then the scripts stops.

comment:58 Changed 11 years ago by anonymous

Would it be possible for someone to post a working .exe for 0.21-fixes? I have been pulling my hair out for days to get this work, and it seems to be beyond me.

comment:59 Changed 11 years ago by anonymous

anonymous, Rather than struggle on your own, why not ask for help? It's early-days for the Win32, so everyone needs help. Oh, and please start posting to the -dev list for -dev related issues (like build failures), not the the TRAC bug-tracking system.

comment:60 Changed 11 years ago by anonymous

Its a bug with the script so surely appropriate here?

Anyway I will try and post the full message I get when I get home.

comment:61 Changed 11 years ago by arnonm@…

Anonymous, search the users mailing list. I posted a working copy of 0.21 a week or so ago. There are still some known bugs, but the more people who try it out, the quicker we will be able to find and fix them.

Arnon

comment:62 in reply to:  57 Changed 11 years ago by davidbuzz@…

Replying to anonymous:

Unfortunately, I can't do a copy paste of the error, as trac says it matches spam patterns (??) Basically it starts the configure process of mythtv, but gives an error message saying "broken shell" trying bash, but then gives an error about memalign function, then the scripts stops.

To 'Anonymous':

  • Please use your email address when asking for help, so that people can contact you.
  • Please don't post initial help requests to TRAC (that's what the email lists are for).
  • TRAC is for Tracking issues in the code (ie repeatable issues). And you must specify MUCH MORE detail if you plan to post here, so that others can try to repeat the circumstances of your fault.... Including your current SVN revision, exact error message (use a zip file if necessary, or email to the list!) , and preferably a suggested solution (if you know).
  • If you don't want to email to the list, then please email me off-list, and I'll happily help you: davidbuzz@…

comment:63 Changed 11 years ago by Nigel

(In [17176]) V24 update by Buzz, and a TODO fix by me. See #4397.

Changed 11 years ago by davidbuzz@…

Attachment: win32-packager.25.patch added

patch v25, adds 'always' functionality, converts existing code to use it, a few other minor fixes

comment:64 Changed 11 years ago by anonymous

v5 adds the following:

  • [always] keyword, which allows actions like [exec] and [shell] to always be triggered.
  • reworked/simplified sections of the code to use the new [always] feature.
  • moved a section that tweaks a makefile to before the section that done the 'make' (as it should have been)
  • removes a reference to $ENV{APPDATA} that should really be $home.
  • added another known spurious message to not display on the screen (the QT4 version of the QT3 dllimport message)

comment:65 Changed 11 years ago by Nigel

(In [17222]) V25 update from David Bussenschutt (and a few whitespace changes by me). See #4397

Changed 11 years ago by Buzz <davidbuzz@…>

Attachment: win32-packager.27.patch added

latest patch for win32-packager

comment:66 Changed 11 years ago by Buzz <davidbuzz@…>

fixes in patch .27:

  • SMALL build of QT4 didn't build the mysql plugin, so I've changed it to use the normal build for now till that can be fixed properly.
  • typo in the QT4 folder name (in 2 places) was preventing the QT libraries from being copied to the 'build/bin' folder
  • mythconfig.mak was not being copied to the proper install location (may not be necessary if you rebuild QT4 with all the current patches)
  • mythplugins are curently building the .dll's without the leading 'lib', so I changed the tests to test for 'mythmovies.dll' to measure the build success. the proper solution is to change the mythplugins to build the .dll's with a 'lib' prefix, like the main mythtv, but this hack at least allows the build script to complete now.
  • the script now gets a fully completed build. Unfortunately the build still does not run..... but it's something, isn't it.

Changed 11 years ago by Buzz <davidbuzz@…>

Attachment: win32-packager.28.zip added

first win32-packager to create working QT4 based binaries. (zipped because trac thought it was spam)

comment:67 Changed 11 years ago by Buzz <davidbuzz@…>

fixes in patch version 28 (patch applies to current HEAD):

It includes :

  • using QT 4.4.0 (up from 4.3.4)
  • using Andre's patches to "prevent the 0x000005 error"
  • separates the earlier QT patches so they are applied separately.
  • Many white-space fixups to make a lot of those "long lines" shorter and easier to understand

Buzz.

Changed 11 years ago by Buzz <davidbuzz@…>

Attachment: win32-packager.29.patch added

latest patch for win32-packager

comment:68 Changed 11 years ago by Buzz <davidbuzz@…>

changes in .29 include:

  • uses Mingw 5.1.4 (latest) , up from 5.1.3.
  • fixes a missing /etc/fstab file in Mingw ( a common problem that is easily fixed)
  • removes all unnecessary "outstanding" patches that are now applied or expired.
  • removes now unnecessary code for manually installing themes (make install works)
  • adds a minor fix to relocate any themees that are incorrectly positioned after a make install
  • corrects minor items in the readme file that is used in the "packager".

Changed 11 years ago by davidbuzz@…

latest patch for win32-packager

comment:69 Changed 11 years ago by anonymous

latest version (labeled 2ndAug2008) includes these new features:

  • much more meaningful output for users, including more "comment" fields
  • taglib now compiles and install properly
  • changed a number of libraries to test that the "make install" succeeded, rahter that just that a Makefile exits (ie the configure succeeded).
  • install a couple of troublesome libraries to both /usr and /mingw
  • libcdaudio is now downloaded and compiled (including custom patch for win32).
  • changed a partial qt3 build from failing as easily, by re-trying to mingw32-make
  • removed "pauses" that typical users don't want.
  • added alpha code to allow swithcing between SVN branches and trunk automatically, so that the script can theoretically build both trunk, and 0.21-branches without having to re-download all the SVN. (not 100 reliable yet, but improving).
  • extended the make_clean.sh script that is used in addition to a 'make clean', (which is inadequate on win32 at present) to cleanup .exe, .dll, .a, .o files.

Thanks! Buzz.

comment:70 Changed 11 years ago by davidbuzz@…

oh, and ne last this that patch includes.... it ENABLES mythmusic (which we can do now that we have libcdaudio compiling. :-)

comment:71 Changed 11 years ago by Nigel

(In [18042]) Latest version from David, some de-tabbing and long-line unwrapping by me. Refs #4397

comment:72 Changed 11 years ago by anonymous

All Win32 users..., I've found a couple of bugs in this latest version that I introduced into the 'make_clean.sh' script that gets generated by win32-packager.pl it over-zealously removes too many Makefiles (in .svn folders! ew! ), causing subversion to get itself confused, and temporarily hosing parts of your local repository ('svn update' doesn't work till the repo is 'revert'-ed, or similar). patch/simple fix is pending....

comment:73 Changed 11 years ago by anonymous

( commenting out lines 1186, and 1188 of the current release fixes these issues I wrote about).

Changed 11 years ago by davidbuzz@…

latest enhancements

comment:74 Changed 11 years ago by davidbuzz@…

latest version (labeled 22_sep_2008) includes these new features:

  • correctly compares files, using MD5 checksum in aditiomn to mtime and size.
  • added libMAD library to compilations, as a precursor for getting
  • adds support for fully unattended running (for a compile-server I've built)
  • upgrades the SVN release used to 1.5.x (from 1.4.6)
  • upgrades the MySQL downloads to 5.0.67 (from 5.0.45)
  • upgrades the ISetup software to 5.2.3 (from 5.2.2)
  • adds additional installs of ogg & vorbis & flac & libcdaudio to different prefix to support compatibility with libmad. ( not perfect having it installed twice, but it's a minor annoyance)
  • more whitespace, and layout cleanups
  • svn switch code now switches to the cirrect revision of a different branch. (building HEAD and -21-fixes in the same environment is still flawed though)
  • corrected some slashes that were the wrong way round.
  • added some (ordinary/poor but functional) code to work-around windows getting the permissions of files wrong when checked out with SVN.
  • disabled mythmusic again, as htere are still unresolved issues with it YMMV.
  • explicitly list mythcontrols in the configure parameters. initially it's disabled.

Buzz.

comment:75 Changed 11 years ago by Nigel

(In [18374]) Latest update from David Bussenschutt. See #4397

Changed 11 years ago by davidbuzz@…

minor enhancement and correction - change 'lib' to 'bin' to allow plugins to build to completion.

comment:76 Changed 11 years ago by davidbuzz@…

latest patch corrects introduced error in building plugins, and a few other less-important tweaks.

comment:77 Changed 11 years ago by Nigel

(In [18464]) Latest update from David Bussenschutt. See #4397

comment:78 Changed 11 years ago by rkfranklin@…

The latest change [18464] breaks the build for me. I had to revert back to the version [18374] in order to build 0.21-fixes with the command "win32-packager.pl -b -k"

comment:79 Changed 11 years ago by Nigel

Although the -b flag exists, the latest myth source sometimes breaks the packager's ability to build fixes. Using the version of the packager that is checked into the fixes tree is more likely to always work.

Changed 10 years ago by davidbuzz@…

win32 build script - upgraded version of many packages(qt,mysql,etc), and added patches so it now should build HEAD.

comment:80 Changed 10 years ago by davidbuzz@…

latest version (labeled win32-packager_26_jan_2009.patch) includes these new features:

  • qt upgraded from 4.4.0 to qt-win-opensource-src-4.4.3
  • mysql headers upgraded to mysql-essential-5.1.30-win32.msi
  • lame upgraded to lame-398-2.tar.gz
  • taglib upgraded to taglib 1.5 ( pre-compiled mingw 1.5 binaries )
  • SDL upgraded to SDL-1.2.13.tar.gz
  • libexif upgraded to libexif-0.6.17.tar.gz
  • fftw upgraded to fftw-3.2.tar.gz
  • sspi.h, stdlib.h, sched.h, bwap.h, pthread.c, H264Parser.h , dvd_reader.c all patched essentially as previously discussed in -dev list.
  • where relevant, comments in the script added to identify the last time the dependancy was checked to ensure it's the latests version
  • qatomic,
  • sh.exe no longer removed from qt4 builds - supposedly quicker this way now.
  • 'packaging' repository included in subversion repos to fetch.
  • more intelligent 'make_clean.sh'
  • less overflowing of the 80chr column width of some editors.
  • fix lack of SIGUSR2 in compat.h
  • added --disable-lirc due to reports of issues without it.

comment:81 Changed 10 years ago by Nigel

(In [19818]) MythFrontend uses SIGUSR2, MinGW doesn't have it. See #4397

comment:82 Changed 10 years ago by Nigel

(In [19821]) Another MinGW build fix. See #5980, #4397

comment:83 Changed 10 years ago by Nigel

(In [19841]) Enable another ghastly MinGW patch. See #4397, #5980.

comment:84 Changed 10 years ago by stuartm

Component: mythtvPorts - Windows
Milestone: unknown0.22
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.