perlce (1) Linux Manual Page
NAME
perlce – Perl for WinCE
Building Perl for WinCE
WARNING
Much of this document has become very out of date and needs updating, rewriting or deleting. The build process was overhauled during the 5.19 development track and the current instructions as of that time are given in “CURRENT BUILD INSTRUCTIONS”; the previous build instructions, which are largely superseded but may still contain some useful information, are left in “OLD BUILD INSTRUCTIONS” but really need removing after anything of use has been extracted from them.
DESCRIPTION
This file gives the instructions for building Perl5.8 and above for WinCE. Please read and understand the terms under which this software is distributed.
General explanations on cross-compiling WinCE
- •
- miniperl is built. This is a single executable (without DLL), intended to run on Win32, and it will facilitate remaining build process; all binaries built after it are foreign and should not run locally.
miniperl is built using ./win32/Makefile; this is part of normal build process invoked as dependency from wince/Makefile.ce
- •
- After miniperl is built, configpm is invoked to create right Config.pm in right place and its corresponding Cross.pm.
Unlike Win32 build, miniperl will not have Config.pm of host within reach; it rather will use Config.pm from within cross-compilation directories.
File Cross.pm is dead simple: for given cross-architecture places in @INC a path where perl modules are, and right Config.pm in that place.
That said, "miniperl -Ilib -MConfig -we 1" should report an error, because it can not find Config.pm. If it does not give an error — wrong Config.pm is substituted, and resulting binaries will be a mess.
"miniperl -MCross -MConfig -we 1" should run okay, and it will provide right Config.pm for further compilations.
- •
- During extensions build phase, a script ./win32/buildext.pl is invoked, which in turn steps in ./ext subdirectories and performs a build of each extension in turn.
All invokes of Makefile.PL are provided with "-MCross" so to enable cross- compile.
CURRENT BUILD INSTRUCTIONS
(These instructions assume the host is 32-bit Windows. If you’re on 64-bit Windows then change “C:\Program Files” to “C:\Program Files (x86)” throughout.)
1. Install EVC4 from
http://download.microsoft.com/download/c/3/f/c3f8b58b-9753-4c2e-8b96-2dfe3476a2f7/eVC4.exe
Use the key mentioned at
http://download.cnet.com/Microsoft-eMbedded-Visual-C/3000-2212_4-10108490.html?tag=bc
The installer is ancient and has a few bugs on the paths it uses. You will have to fix them later. Basically, some things go into “C:/Program Files/Windows CE Tools”, others go into “C:/Windows CE Tools” regardless of the path you gave to the installer (the default will be “C:/Windows CE Tools”). Reboots will be required for the installer to proceed. Also .c and .h associations with Visual Studio might get overridden when installing EVC4. You have been warned.
2. Download celib from GitHub (using “Download ZIP”) at
https://github.com/bulk88/celib
Extract it to a spaceless path but not into the perl build source. I call this directory “celib-palm-3.0” but in the GitHub snapshot it will be called “celib-master”. Make a copy of the “wince-arm-pocket-wce300-release” folder and rename the copy to “wince-arm-pocket-wce400”. This is a hack so we can build a CE 4.0 binary by linking in CE 3.0 ARM asm; the linker doesn’t care. Windows Mobile/WinCE are backwards compatible with machine code like Desktop Windows.
3. Download console-1.3-src.tar.gz from
http://sourceforge.net/projects/perlce/files/PerlCE%20support%20files/console/
Extract it to a spaceless path but not into the perl build source. Don’t extract it into the same directory as celib. Make a copy of the “wince-arm-pocket-wce300” folder and rename the copy to “wince-arm-pocket-wce400”. This is a hack so we can build a CE 4.0 binary by linking in CE 3.0 ARM asm; the linker doesn’t care. Windows Mobile/WinCE are backwards compatible with machine code like Desktop Windows.
4. Open a command prompt, run your regular batch file to set the environment for desktop Visual C building, goto the perl source directory, cd into win32/, fill out Makefile, and do a “nmake all” to build a Desktop Perl.
5. Open win32/Makefile.ce in a text editor and do something similar to the following patch.
-CELIBDLLDIR = h:\src\wince
