Skip to content
ggodart edited this page Jan 6, 2021 · 2 revisions

This page describes the work required to port Misterhouse to run under Activestate Perl 5.12. Hopefully this page will be useful for Windows porting in the future. Disclaimer: I did not test very many of the features of Misterhouse and had only a handful of the common code files enabled. Please update this page if you find more issues that need to be resolved.

toc

Table of Contents

Install Activestate Perl 5.12

I made a basic install of the Activestate Perl 5.12 and didn't install any other packages http://www.activestate.com/activeperl/versions

Update mh Perl Script for New site_winXX Directory

code format="perl" Index: bin/mh

=======================================================

--- bin/mh (revision 1970) +++ bin/mh (working copy) @@ -192,9 +192,12 @@

             elsif ($build < 800) {
                 push @INC, "${Pgm_Path}/../lib/site_win56";
             }

- else { + elsif ($build < 900) {

                 push @INC, "${Pgm_Path}/../lib/site_win58";
             }

+ elsif ($build < 1300 and $build &gt; 1199) { + push @INC, "${Pgm_Path}/../lib/site_win512"; + }

         }
         require 'handy_utilities.pl';
     }

code

Conflicts with Existing ./lib/site Files

The versions of Win32::Registry and Win32API::Registry installed in the ./lib/site directory are too old for modules in Activestate Perl 5.12 and Win32::setupsup. These files were moved from ./lib/site to each of the existing ./lib/site_winXX directories for backwards compatibility. The affected files are: code format="bash" lib/site/Win32API/Registry.pm lib/site/Win32API/Registry lib/site/Win32API/Registry/cRegistry.pc lib/site/Win32/Registry.pm code

Install Win32::setupsup

Activestate is no longer providing the Win32::setupsup package. I'm not sure why but it might be because there are compile errors. I decided to build it from CPAN and then create a ./lib/site_win512 folder in the repository so others will be spared. I have the instructions here for future builds on new Perl releases.

This is a real pain because setupsup will not compile with gcc and I don't own Visual Studio C++. However I did figure out how to compile under VS C++ Express with a "trick" to over come features missing from the Express version. Primarily MFC is not supported and this required a bit of trickery. Steps:

  • Download and install VS C++ Express (I used Version 2010)
  • Open the Visual Studio Command Prompt
The VS C++ installer will create a shortcut for "Visual Studio Command Prompt" in the start menu. This command prompt will set the correct environment vars. Open that command prompt.
  • Now for the VS Express trick
Make a copy of the file: code copy "\Program Files\Microsoft SDKs\Windows\v7.0A\Include\WinResrc.h" "\Program Files\Microsoft SDKs\Windows\v7.0A\Include\WinRes.h" code
  • Prepare the installation directory in the MH code base
code mkdir "C:\Files\perl\misterhouse_trunk\lib\site_win512" code
  • Run cpan and download "but don't make" the setupsup package
Activestate Perl installation should have added "C:\Perl\site\bin;C:\Perl\bin" to your path. You can confirm this with "echo %PATH%". This will allow you to run cpan from the VS command prompt. code cpan cpan> get /Win32-Setupsup/ cpan> quit code
  • cd in to the cpan build directory:
code cd \perl\cpan\build\Win32-setupsup* code
  • Apply the diff to setupsup.cpp if needed.
setupsup.diff
  • Create the Makefile specifying a custom install dir
code perl Makefile.PL INSTALLARCHLIB="C:\Files\perl\misterhouse_trunk\lib\site_win512" INSTALLSITEARCH="C:\Files\perl\misterhouse_trunk\lib\site_win512" nmake nmake test nmake install code

Install DB_File

Oracle has really FUBARed the Berkeley DB by changing the license so that it is no longer compatible with Perl. Because of this Activestate will not provide a PPM for it. I'm not sure if we can distribute the compiled DB_File once it is linked to libdb because MH has the same incompatible license as Perl. So.... I didn't add these files to the repository, rather I built and installed them in my Activestate path. At a minimum we may need to make users go through this when installing the first time. We should also consider ripping DBM support out of MH replacing it with SQLite (DBD::SQLite and Tie::Hash::DBD); both are available from Activestate and CPAN. Install DB_File on Strawberry Perl - This is not exactly what I did but I based my process on it with some adaptions for ActiveState and CPAN.

  • Find, download and install the Berkeley DB db-4.3.29 from Oracle
http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html http://download.oracle.com/berkeley-db/db-4.3.29.msi - I used this one.
  • Open a standard command prompt
It is also possible to compile from Visual Studio but it is not necessary. CPAN should detect that you have no c++ compiler and install gcc under minGW. If it asks allow the installation.
  • Run cpan and download "but don't make" the DB_File package
code cpan cpan> get DB_File cpan> quit code
  • cd in to the cpan build directory:
code cd \perl\cpan\build\DB_File* code
  • Edit the config.in file adding correct paths and lib name
code INCLUDE = "C:\Program Files\Sleepycat Software\Berkeley DB 4.3.29\include" LIB = "C:\Program Files\Sleepycat Software\Berkeley DB 4.3.29\lib" DBNAME = -llibdb43 code
  • Apply patch to C:\Program Files\Sleepycat Software\Berkeley DB 4.3.29\include\db.h
db.diff
  • Make and Install the Package
code perl Makefile.PL dmake dmake test dmake install code
  • Now we have a choice:
>1. Add the Berkeley DB installation directory to the PATH >2. Copy the libdb43.dll to c:\windows\system32 >3. Copy libdb43.dll to c:\perl\site\bin >4. Copy libdb43.dll to misterhouse's .\bin I chose option 2: code copy "C:\Program Files\Sleepycat Software\Berkeley DB 4.3.29\bin\libdb43.dll" "C:\perl\site\bin" copy "C:\Program Files\Sleepycat Software\Berkeley DB 4.3.29\bin\msvcp71.dll" "C:\perl\site\bin" code
      1. Windows CPU and task mnoitor
Another handy utility for Windows users will help you monitor how much CPU and memory MisterHouse takes. [TaskInfo80](http://www.iarsn.com/index.html)
      1. Out of environment space
If you are getting the message "Out of environment space" try adding these records:
config.sys:   shell=command.com /e:8000 /p
autoexec.bat: set comspec=c:\command.com
Clone this wiki locally