"miniperl" is built using "./win32/Makefile"; this is part of normal build process invoked as dependency from wince/Makefile.ce
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.
All invokes of "Makefile.PL" are provided with "-MCross" so to enable cross- compile.
Tools & SDK
For compiling, you need following:
Needed source files can be downloaded at <http://www.rainer-keuchel.de/wince/dirlist.html>
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:
"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".
compile.bat compile.bat dist compile.bat CROSS_NAME=mips-wce300-thr "USE_ITHREADS=define" "USE_IMP_SYS=define" "USE_MULTI=define" compile.bat CROSS_NAME=mips-wce300-thr "USE_ITHREADS=define" "USE_IMP_SYS=define" "USE_MULTI=define" dist
If all goes okay and no errors during a build, you'll get two independent distributions: "wince-mips-pocket-wce300" and "mips-wce300-thr".
Target "dist" prepares distribution file set. Target "zipdist" performs same as "dist" but additionally compresses distribution files into zip archive.
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 auxilary files, but, and this is important to note, there should be no "Config.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
..\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 email@example.com mailing list.
The simple stdio implementation creates the files "stdin.txt", "stdout.txt" and "stderr.txt", so you might examine them if your console has only a liminted number of cols.
When exitcode is non-zero, a message box appears, otherwise the console closes, so you might have to catch an exit with status 0 in your program to see any output.
stdout/stderr now go into the files "/perl-stdout.txt" and "/perl-stderr.txt."
PerlIDE is handy to deal with perlce.
You can set these with cereg.exe, a (remote) registry editor or via the PerlIDE.
newXS("Win32::GetCwd", w32_GetCwd, file); newXS("Win32::SetCwd", w32_SetCwd, file); newXS("Win32::GetTickCount", w32_GetTickCount, file); newXS("Win32::GetOSVersion", w32_GetOSVersion, file); newXS("Win32::IsWinNT", w32_IsWinNT, file); newXS("Win32::IsWin95", w32_IsWin95, file); newXS("Win32::IsWinCE", w32_IsWinCE, file); newXS("Win32::CopyFile", w32_CopyFile, file); newXS("Win32::Sleep", w32_Sleep, file); newXS("Win32::MessageBox", w32_MessageBox, file); newXS("Win32::GetPowerStatus", w32_GetPowerStatus, file); newXS("Win32::GetOemInfo", w32_GetOemInfo, file); newXS("Win32::ShellEx", w32_ShellEx, file);
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.
After installation & testing processes will stabilize, information will be more precise.