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/buldext.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.

Normally you only need to edit ./win32/ce-helpers/compile.bat to reflect your system and run it.

File ./win32/ce-helpers/compile.bat is actually a wrapper to call nmake -f makefile.ce with appropriate parameters and it accepts extra parameters and forwards them to nmake command as additional arguments.
You should pass target this way.

To prepare distribution you need to do following:

go to ./win32 subdirectory

edit file ./win32/ce-helpers/compile.bat

run compile.bat

run compile.bat dist

Makefile.ce has CROSS_NAME macro,
and it is used further to refer to your cross-compilation scheme.
You could assign a name to it,
but this is not necessary,
because by default it is assigned after your machine configuration name,
such as "wince-sh3-hpc-wce211",
and this is enough to distinguish different builds at the same time.
This option could be handy for several different builds on same platform to perform,
say,
threaded build.
In a following example we assume that all required environment variables are set properly for C cross-compiler (a special *.bat file could fit perfectly to this purpose) and your compile.bat has proper "MACHINE" parameter set,
to,
say,
wince-mips-pocket-wce300.

NOTE: during a build there could be created a number (or one) of Config.pm for cross-compilation ("foreign" Config.pm) and those are hidden inside ../xlib/$(CROSS_NAME) with other auxiliary files, but, and this is important to note, there should be noConfig.pm for host miniperl. If you'll get an error that perl could not find Config.pm somewhere in building process this means something went wrong. Most probably you forgot to specify a cross-compilation when invoking miniperl.exe to Makefile.PL When building an extension for cross-compilation your command line should look like

..\miniperl.exe -I..\lib -MCross=mips-wce300-thr Makefile.PL

or just

..\miniperl.exe -I..\lib -MCross Makefile.PL

to refer a cross-compilation that was created last time.

All questions related to building for WinCE devices could be asked in perlce-user@lists.sourceforge.net mailing list.

To start perl by clicking on a perl source file, you have to make the according entries in HKCR (see ce-helpers/wince-reg.bat). cereg.exe (which must be executed on a desktop pc with ActiveSync) is reported not to work on some devices. You have to create the registry entries by hand using a registry editor.

Opening files for read-write is currently not supported if they use stdio (normal perl file handles).

If you find bugs or if it does not work at all on your device, send mail to the address below. Please report the details of your device (processor, ceversion, devicetype (hpc/palm/pocket)) and the date of the downloaded files.

Initial port of perl to WinCE. It was performed in separate directory named wince. This port was based on contents of ./win32 directory. miniperl was not built, user must have HOST perl and properly edit makefile.ce to reflect this.

wince port was kept in the same ./wince directory, and wince/Makefile.ce was used to invoke native compiler to create HOST miniperl, which then facilitates cross-compiling process. Extension building support was added.