forked from XMLTV/xmltv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexe_build.html
78 lines (77 loc) · 16.7 KB
/
exe_build.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head></head><body><font color="#330099">originally from: http://www.kudos.byethost15.com/freeguide/Compiling_XMLTV_from_source.htm<br></font><div align="left"><font color="#330099"><b><br>Note from Robert: </b> these
instructions can also be used to build a local (non exe) install of
XMLTV. You don't need the Activestate Perl Development Kit
and simply do a "<tt>nmake install</tt>" instead of "<tt>nmake xmltv.exe</tt>".
As you can see, quite a bit is still involved, for most folks, it's
easier to just grab the exe distribution (or alpha-exe
http://alpha-exe.xmltv.org ). </font></div><span style="font-size: 16pt;"></span><hr size="2" width="100%"><p class="MsoNormal" style="text-align: center;" align="center"><b style=""><span style="font-size: 16pt;">CREATING <span style=""> </span>XMLTV.EXE<span style=""> </span><span style=""> </span>FROM
SOURCE<o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-align: center;" align="center"><b style=""><span style="font-size: 16pt;"><o:p>How to produce a (working) Windows
executable direct from the CVS repository</o:p></span></b></p>
<p class="MsoNormal" style="text-align: center;" align="center"><b style=""><span style="font-size: 16pt;"><o:p><font size="3">This guide owes much
to Robert Eden, Ed Avis, Davide Chiarini and Andy Balaam</font></o:p></span></b></p>
<p class="MsoNormal" style="text-align: center;" align="center"><b style=""><span style="font-size: 16pt;"><o:p><font size="2">
<!-- #BeginDate format:Am1 -->January 17, 2007</font></o:p></span></b></p><p class="MsoNormal" align="left"><font color="#330099"><o:p></o:p></font>Download CamelPack from<span style="">
</span><a href="http://stennie.org/camelpack/">http://stennie.org/camelpack/</a>
using the installer .<br>
This is to install most of the necessary software that is necessary to compile
XMLTV.exe from source. You need all 3 programs.</p>
<p class="MsoNormal" align="left"><o:p> </o:p><b><span style="font-size: 10pt; font-family: Arial;">Note:</span></b><span style="font-size: 10pt; font-family: Arial;"> this installer provides options to
download and install the following into default locations that work for compiling
from CPAN. <o:p></o:p></span><br>
<span style="font-size: 10pt; font-family: Symbol;"><span style="">·<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></span></span> <span style="font-size: 10pt; font-family: Arial;">ActiveState's
Active Perl (<i>c:\perl\</i>) <o:p></o:p></span><br>
<span style="font-size: 10pt; font-family: Symbol;"><span style="">·<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></span></span> <span style="font-size: 10pt; font-family: Arial;">BloodShed
Dev-C++ 5 (<i>c:\dev-cpp</i>) .. will optionally be added to end of %PATH%
environment var <o:p></o:p></span><br>
<span style="font-size: 10pt; font-family: Symbol;" lang="NL"><span style="">·<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
</span></span></span> <span style="font-size: 10pt; font-family: Arial;" lang="NL">Microsoft Nmake (<i>c:\perl\bin</i>) <o:p></o:p></span></p>
<p class="MsoNormal" align="left"><span style="font-size: 10pt; font-family: Arial;" lang="NL"><span style=""> </span></span><span style="font-family: Arial;">If all
is well, you should be able to compile a module like Text::CSV_XS: <o:p></o:p></span><o:p></o:p></p>
<pre>Typing C:\>perl -MCPAN -e shell should give you the cpan environment ......</pre>
<pre><o:p></o:p><em>Set up gcc environment - 3.4.2 (mingw-special)<br>cpan shell -- CPAN exploration and modules installation (v1.7601)ReadLine support enabled</em></pre>
<pre><o:p></o:p><em>cpan></em> test Text::CSV_XS (type this in at the cpan prompt)<br><o:p></o:p># ... time passes ... #<br><em>Nmake test – OK</em></pre>
<pre><o:p></o:p>The only other piece of software necessary is unfortunately not free although you can download a 30 day working copy<br>from <a href="http://www.activestate.com/Products/Perl_Dev_Kit/?utm_source=ASPN_Perl&utm_medium=banner&utm_campaign=PerlDevKit">http://www.activestate.com/Products/Perl_Dev_Kit/?utm_source=ASPN_Perl&utm_medium=banner&utm_campaign=PerlDevKit</a></pre>
<pre><o:p></o:p>After installing the PDK you are ready to start wrestling with Perl modules.</pre>
<pre>As I wanted to compile XMLTV directly from source, I set up the software to download directly from SourceForce. This <br>is done with a piece of software called TortoiseCVS which “Checks out” a copy of the source code from the SourceForge <br>“Repository”</pre>
<pre><o:p></o:p><span style=""><span style="">1. </span></span>Install TortoiseCVS from <a href="http://sourceforge.net/project/showfiles.php?group_id=142108">http://sourceforge.net/project/showfiles.php?group_id=142108<br></a><span style=""><span style="">2.</span></span> Right click from within Windows Explorer and choose CVS Checkout. <br>3. A screen will appear from the Checkout Module of TortoiseCVS. Under CVSROOT, enter the following text </pre>
<div align="center">
<pre><o:p><strong> </strong></o:p><strong>:pserver:[email protected]:/cvsroot/xmltv<o:p></o:p></strong></pre>
</div>
<pre><o:p></o:p>This will set all the various parameters for anonymous access. Use Fetch List to get the module names and then choose <br>xmltv. Go to the tab Options and use <b style="">Enter Your Own Folder Name</b> to download to the correct folder. I created a short <br>folder name without spaces in the root which I called XMLTV_Source. <u><font color="#8000ff"><strong>This is important</strong></font></u><strong> </strong>The source files will now be <br>downloaded into XMLTV_Source where they can be updated at any time by right-clicking Update from within the folder. <br>This folder will be our working folder for compiling the Perl modules.</pre>
<pre><o:p> </o:p><span style=""><span style="">4.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span>Install Expat from <a href="ftp://ftp.jclark.com/pub/xml/expat.zip">ftp://ftp.jclark.com/pub/xml/expat.zip</a><span style=""> </span>just install it with its default settings and forget it.<o:p></o:p><o:p></o:p></pre>
<pre><b style=""><u>Starting to compile<o:p></o:p></u></b></pre>
<pre>The first step is to install all the various PERL modules that XMLTV needs, and there are a lot of them<br>I used 2 command line windows under Windows XP for convenience to avoid changing directories. <br>At the command line enter> <b style="">ppm</b> <span style=""> </span>to run the Perl Package Manager<span style=""> </span>(EXIT to quit)<o:p></o:p><o:p></o:p></pre>
<pre>First set PPM to have 3 good repositories to seach. At the ppm prompt enter….<br><br>ppm><strong> repos add University_of_Winnipeg</strong> <a href="http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58" target="_top">http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58<br></a>ppm> <strong>repos add crazyinsomniac</strong> <span style=""> </span><a href="http://crazyinsomniac.perlmonk.org/perl/ppm/5.8" target="_top">http://crazyinsomniac.perlmonk.org/perl/ppm/5.8<br></a>ppm><strong> repos add Bribes</strong> <span style=""> </span><a href="http://www.bribes.org/perl/ppm" target="_top">http://www.bribes.org/perl/ppm</a></pre>
<pre><o:p> </o:p>At the ppm prompt > <strong>ppm repos</strong></pre>
<pre><o:p> </o:p>MUST return… </pre>
<pre><o:p><em> </em></o:p><em>Repositories:<br>[1] ActiveState Package Repository<br>[2] University_of_Winnipeg<br>[3] crazyinsomniac<br>[4] Bribes</em><br><br>if not use <b style="">repos help</b></pre>
<pre><o:p> </o:p>If you haven’t got a good sources for downloading modules from you won't be able to find the more difficult ones !<br>Now we have a decent source for PRECOMPILED modules, which have the advantage that they automatically know if there are dependent packages.</pre>
<pre><o:p> </o:p>We will start with the first module on this list</pre>
<pre><o:p><em> </em></o:p><em>ppm></em> <strong>search Class-MethodMaker</strong> (In PPM for Windows the colons are replaced by a hyphen) returns..<o:p>......</o:p></pre>
<pre><o:p></o:p><em>Searching in Active Repositories<o:p></o:p><br>1. Class-MethodMaker [2.03] Routines for parsing/manipulating dates and time.<o:p></o:p></em><br><em>ppm><o:p></o:p></em><br><o:p></o:p><em>ppm></em> <strong>install 1</strong><span style=""> </span></pre>
<pre><o:p> </o:p>(this will install the package)- don’t be put off if the package, once found, does not install the first time. Just repeat the install. Install the highest version that you can find.<o:p></o:p>This procedure is repeated for all the other modules in the list (use the same version or higher if you can find it)<o:p></o:p></pre>
<pre>Class-MethodMaker v2.02<br>HTML-Tagset v3.03<br>TermReadKey v2.21<br>XML-LibXML-Common v0.13 DO NOT FORGET TO SAY YES TO install libxml2.dll !!!!<br>XML-NamespaceSupport v1.08<br>Date-Manip v5.42a<br>HTML-TableExtract v1.08 (multiple installs)<br>Lingua-Preferred-0.2.4<span style=""> <br></span>PerlIO-gzip v0.15<br>Tk-TableMatrix v1.1<span style=""> <br></span>XML-LibXML v1.58<br>XML-Twig v3.15<br>XML-Writer-0.500<br>WWW-Mechanize (version 1.02 or higher)<br>HTTP-Cache-Transparent<br>Unicode-UTF8simple<br>File-Slurp<br>Log-Tracemessages<br>DB_File</pre>
<pre><o:p></o:p>These will probably be already installed but it is best to check<br><br>Tk v804.027<br>URI v1.30<br>XML-Parser v2.34<br>HTML-Parser v3.36<br>libwww-perl v5.79<br>Compress-Zlib v1.33<br>Unicode-String v2.07<br>HTML-Tree v3.18<br>Lingua-EN-Numbers-Ordinate v0.01<br>SOAP-Lite v0.60<br><br><o:p></o:p>The following modules need to be installed from CPAN, so use exit to quit PPM and type <strong>cpan</strong> to run cpan</pre>
<pre>To install the first of the 3 missing modules type> <b style="">install IO::Scalar</b><span style=""> </span></pre>
<pre>And then add the other 2<o:p></o:p><br><br>IO::Scalar<span style=""> </span>from CPAN<br>HTML::FormatText get from CPAN<br>Term::ProgressBar v2.06 from CPAN<br>Text::Bidi from CPAN <span style=""> </span>(only install if you need Hebrew for the Israel grabber)<br>needs to downloaded as a compressed file and installed as shown below. Cannot be used direct from CPAN<br><br><o:p></o:p>Text-Kakasi-2.04 is only required for the Japanese grabber – DO NOT INSTALL</pre>
<pre><o:p> </o:p>The modules than are not available as shown above, should be installed in order from the pre-requisites download from <br>SourceForge <a href="http://sourceforge.net/project/showfiles.php?group_id=39046&package_id=91929">http://sourceforge.net/project/showfiles.php?group_id=39046&package_id=91929</a></pre>
<pre><o:p> </o:p>This is more laborious and can be tricky as they don’t sort themselves out like the pre-compiled ppms.</pre>
<pre style="margin-left: 0cm; text-indent: 0cm;"><span style=""><span style="">1.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span>cd to directory of required module<br><span style=""><span style="">2.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span>at prompt enter ><span style=""> </span>makefile.pl<br><span style=""><span style="">3.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span>at prompt enter ><span style=""> </span>nmake<br><span style=""><span style="">4.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span>at prompt enter ><span style=""> </span>nmake test<br><span style=""><span style="">5.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span>at prompt enter ><span style=""> </span>nmake install</pre>
<pre style="">Everything must run without errors</pre>
<pre style=""><o:p> </o:p>When all the modules on the list have been installed it is time to do a Makefile.pl</pre>
<pre style="">At the command prompt, pointing to the directory where your source files are, in this case XMLTV_Source, <br>enter ><span style=""> </span><strong>makefile.pl</strong></pre>
<pre style=""><o:p> </o:p>When asked to accept the default config, say NO and step through the code while checking for warnings of dependencies. <br>The only warnings should be for Text-Kakasi and the library for Hebrew, neither of which are used.</pre>
<pre style="">When makefile has finished, enter ><span style=""> <strong> </strong></span><strong>nmake</strong></pre>
<pre style="">The compilation should run to the end. If it doesn’t then there is something seriously wrong.You will see error <br>messages on the left hand side of the screen. These refer to missing or incorrectly installed modules. <br>Once <b style="">nmake</b> runs error free you can go for<span style=""> </span>it and try to build the exe <o:p></o:p><span style="font-family: Wingdings;"><br><br><span style=""><span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><strong> </strong></span></span></span>enter ><strong> nmake xmltv.exe</strong></pre>
<pre style=""><o:p> </o:p>the result is an executable in your XMLTV_Source folder.</pre>
<pre style="">Each time you have performed a make and wish to repeat a makefile you will get a warning to do a distclean. <br>Just enter<span style="">> </span><b style="">nmake distclean</b> to clean out any files from the last nmake<o:p></o:p></pre>
<pre style="">I had absolutely no knowledge of Perl and have now performed this dubious operation twice. The first time was on my usual PC ( Windows XP SP2) and the second the day after on a new portable also with XP to document installation on a virgin PC.</pre>
<pre style="">The first time it took me 14 hours to get a working exe. The second time took me 2 hours including documenting <br>everything and writing this at the same time.</pre>
<pre style="">My best advice is to follow this script. Every time that anything asks you something, reply with YES. <u>At no time did I configure anything or add anything to the PATH environment.</u> During my first attempt I spent 4 hours trying to get <br>libxml2.dll to function. The answer was simple, you are trying to do something a lot like Linux on a Windows machine, so it is important that your source code is not on a different drive than C and that there are no spaces in your path names.</pre>
<pre style=""><o:p> </o:p>Have fun</pre>
<pre style=""><o:p> </o:p>Richard<o:p></o:p></pre>
<span style="font-size: 10pt; font-family: Arial;"><o:p></o:p></span></body></html>