Difference between revisions of "XMLTVexeBuild"

From XMLTV
Jump to: navigation, search
(redoing instructions for xmltv.exe)
Line 1: Line 1:
== DRAFT, NOT FINISHED ==
 
  
 
== How to build XMLTV.EXE ==
 
== How to build XMLTV.EXE ==
  
First, let's be clear.. this is not cheap nor easy.  Building XMLTV.EXE requires purchasing [http://www.activestate.com/perl-dev-kit ActiveState's Perl Developer Kit] for about US$300.  Most people can easily live with the Windows distribution and [http://alpha-exe.xmltv.org Alpha EXE]Those that need to modify a script, I suggest running a [[XMLTVWindowsBuild]] Native Windows Build.
+
Previously, xmltv.exe was built using Activestate's Perl Development Kit. (about $300)That has been discontinued, and I was able to build xmltv.exe using the free PAR::Packer module!
 
+
 
+
 
+
For many years, this was black magic... I (Robert) had a PC where I had all the necessary modules working and I didn't touch it except to build XMLTV.EXE.  That version of perl was very old.. but it kept working.  Perl modules were obtained via ppm, cygwin, and more places than I could remember.  It wasn't reproducible.  The time had come to modernize and thanks to [[http://strawberryperl.com/ Strawberry Perl]] reproducible.
+
 
+
 
+
So, let's begin..
+
 
+
  
 
----
 
----
  
1. First follow the [[https://metacpan.org/pod/perldist_strawberry  Procedure to Build your own Strawberry Perl]]
+
# Follow instructions in [XMLTVWindowsBuild] to get a working xmltv under windows.
  I used c:\strawberryport  for my Portable Strawberry
+
# Install these modules
  I used c:\strawberry_build for my build directory
+
#: cpan Par::Packer
  I used c:\strawberry for my output directory
+
#: cpan App::PP::Autolink
  I used C:\strawberryport\perl\site\lib\auto\share\dist\Perl-Dist-Strawberry\32bit-5.18.2.1.pp to build
+
# execute "gmake xmltv.exe" from your xmltv directory.
 
+
2. Once I had could build a stock working Strawberry Perl I was ready to modify it!
+
 
+
3. Perl's Makefile.mk needs to be modified.  C:\strawberry_build\download  should have your official perl distribution in it. Copy the perl-5.x/win32/makefile.mk file from the perl TGZ file to c:\strawberryport\win32_makefile.mk
+
 
+
4. Make this change to your custom win32_makefile.mk
+
  old: LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
+
  new: LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" -static-libgcc -static-libstdc++ -static -lpthread
+
 
+
5. Make your own *.pp file based on 32bit-5.18.2.1.pp. (I used xmltv.pp, the name doesn't matter)
+
 
+
4. Edit the xmltv.pp (or whatever you called it)
+
  In the "InstallPerlCore" step, there should be a "Patch" section.  Tell it to replace makefile.mk with your modified version
+
  'win32_makefile.mk' => 'win32/makefile.mk',
+
 
+
5. Build Strawberry using your custom job
+
  perldist_strawberry -job xmltv.pp
+
 
+
6. You should have a working perl at c:\strawberry!
+
  
7. Install ActiveState's Perl Dev Kit  and give it a shot (add c:\strawberry to your path)
+
That's it!
  
8. Follow the [[XMLTVWindowsBuild]] Native Windows Build instructions to build a working XMLTV. (test it locally of course!)
+
The first time XMLTV.EXE is executed, it will take a long time.  For my XMLTV.EXE I add modified Par::Packer to add a warning
 +
# CPAN
 +
# look Par::Packer
 +
# edit myldr/boot.c
 +
#: boot.c:188
 +
#:  rc = my_mkdir(stmpdir, 0700);
 +
#:  // 2021-01-18 rmeden hack to print a message on first run
 +
#:  if ( rc == 0 ) fprintf(stderr,"Note: This will take a while on first run\n");
 +
#:  // rmeden
 +
#:  if ( rc == -1 && errno != EEXIST) {
 +
# perl Makefile.PL (PAR::Packer directory)
 +
# gmake install
 +
# now after build a new xmltv.exe it will print a warning on the first run.
  
9. If XMLTV works, and PerlApp works, you should be able to build xmltv!
 
  dmake xmltv.exe
 
  
 
== Good Luck ==
 
== Good Luck ==

Revision as of 19:37, 2 October 2021

How to build XMLTV.EXE

Previously, xmltv.exe was built using Activestate's Perl Development Kit. (about $300). That has been discontinued, and I was able to build xmltv.exe using the free PAR::Packer module!


  1. Follow instructions in [XMLTVWindowsBuild] to get a working xmltv under windows.
  2. Install these modules
    cpan Par::Packer
    cpan App::PP::Autolink
  3. execute "gmake xmltv.exe" from your xmltv directory.

That's it!

The first time XMLTV.EXE is executed, it will take a long time. For my XMLTV.EXE I add modified Par::Packer to add a warning

  1. CPAN
  2. look Par::Packer
  3. edit myldr/boot.c
    boot.c:188
    rc = my_mkdir(stmpdir, 0700);
    // 2021-01-18 rmeden hack to print a message on first run
    if ( rc == 0 ) fprintf(stderr,"Note: This will take a while on first run\n");
    // rmeden
    if ( rc == -1 && errno != EEXIST) {
  4. perl Makefile.PL (PAR::Packer directory)
  5. gmake install
  6. now after build a new xmltv.exe it will print a warning on the first run.


Good Luck