From: Vadim Konovalov Date: Thu, 4 May 2006 17:32:12 +0000 (+0200) Subject: RE: [PATCH-for-28089] wince yet another step X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=45496817146ba03d8f19170832148858221299fd;p=p5sagit%2Fp5-mst-13.2.git RE: [PATCH-for-28089] wince yet another step From: "Konovalov, Vadim Vladimirovich (Vadim)** CTR **" Message-ID: p4raw-id: //depot/perl@28100 --- diff --git a/README.ce b/README.ce index ecb574d..41be58b 100644 --- a/README.ce +++ b/README.ce @@ -24,34 +24,34 @@ C 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. -C is built using ../win32/Makefile; this is part of normal +C is built using C<./win32/Makefile>; this is part of normal build process invoked as dependency from wince/Makefile.ce =item * -After C is built, 'configpm' is invoked to create right Config.pm +After C is built, C is invoked to create right C 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. +Unlike Win32 build, miniperl will not have C of host within reach; +it rather will use C 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. +File C is dead simple: for given cross-architecture places in @INC +a path where perl modules are, and right C in that place. That said, C should report an error, because -it can not find Config.pm. If it does not gives an error -- wrong Config.pm +it can not find C. If it does not gives an error -- wrong C is substituted, and resulting binaries will be a mess. C should run okay, and it will provide right -Config.pm for further compilations. +C for further compilations. =item * During extensions build phase, a script C<./win32/buldext.pl> is invoked, -which in turn steps in ./ext subdirectories and performs a build of +which in turn steps in C<./ext> subdirectories and performs a build of each extension in turn. -All invokes of Makefile.PL are provided with C<-MCross> so to enable cross- +All invokes of C are provided with C<-MCross> so to enable cross- compile. =item * @@ -85,21 +85,21 @@ L =head3 Make -Normally you only need to edit ./wince/compile.bat +Normally you only need to edit C<./win32/ce-helpers/compile.bat> to reflect your system and run it. -File ./wince/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 +File C<./wince/compile.bat> is actually a wrapper to call +C with appropriate parameters and it accepts extra +parameters and forwards them to C command as additional arguments. You should pass target this way. To prepare distribution you need to do following: =over 4 -=item * go to ./wince subdirectory +=item * go to C<./win32> subdirectory -=item * edit file compile.bat +=item * edit file C =item * run compile.bat @@ -109,7 +109,7 @@ To prepare distribution you need to do following: =back -makefile.ce has CROSS_NAME macro, and it is used further to refer to +C has C 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 @@ -117,8 +117,8 @@ 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". +*.bat file could fit perfectly to this purpose) and your C +has proper "MACHINE" parameter set, to, say, C. compile.bat compile.bat dist @@ -126,16 +126,16 @@ has proper "MACHINE" parameter set, to, say, "wince-mips-pocket-wce300". 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". +distributions: C and C. -Target 'dist' prepares distribution file set. Target 'zipdist' performs -same as 'dist' but additionally compresses distribution files into zip +Target C prepares distribution file set. Target C performs +same as C 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. +NOTE: during a build there could be created a number (or one) of C +for cross-compilation ("foreign" C) and those are hidden inside +C<../xlib/$(CROSS_NAME)> with other auxilary files, but, and this is important to +note, there should be B C 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 @@ -151,7 +151,7 @@ or just to refer a cross-compilation that was created last time. All questions related to building for WinCE devices could be asked in -perlce-users@lists.sourceforge.net mailing list. +L mailing list. =head1 Using Perl on WinCE @@ -160,16 +160,18 @@ perlce-users@lists.sourceforge.net mailing list. PerlCE is currently linked with a simple console window, so it also works on non-hpc devices. -The simple stdio implementation creates the files stdin.txt, -stdout.txt and stderr.txt, so you might examine them if your +The simple stdio implementation creates the files C, +C and C, 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. +stdout/stderr now go into the files C and +C + +PerlIDE is handy to deal with perlce. =head2 LIMITATIONS @@ -180,14 +182,37 @@ No fork(), pipe(), popen() etc. All environment vars must be stored in HKLM\Environment as strings. They are read at process startup. - PERL5LIB - Usual perl lib path (semi-list). - PATH - Semi-list for executables. - TMP - Tempdir. - UNIXROOTPATH - Root for accessing some special files, - i.e. /dev/null, /etc/services. - ROWS/COLS - Rows/cols for console. - HOME - Home directory. - CONSOLEFONTSIZE - Size for console font. +=over + +=item PERL5LIB + +Usual perl lib path (semi-list). + +=item PATH + +Semi-list for executables. + +=item TMP + +- Tempdir. + +=item UNIXROOTPATH + +- Root for accessing some special files, i.e. C, C. + +=item ROWS/COLS + +- Rows/cols for console. + +=item HOME + +- Home directory. + +=item CONSOLEFONTSIZE + +- Size for console font. + +=back You can set these with cereg.exe, a (remote) registry editor or via the PerlIDE. @@ -195,51 +220,12 @@ or via the PerlIDE. =head2 REGISTRY To start perl by clicking on a perl source file, you have -to make the according entries in HKCR (see wince-reg.bat). +to make the according entries in HKCR (see C). 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. -=head2 PERLFILES - -The following files are a reasonable minimum if you want to do -some socket stuff: - - ./auto - ./auto/DynaLoader - ./auto/DynaLoader/autosplit.ix - ./auto/DynaLoader/dl_expandspec.al - ./auto/DynaLoader/dl_findfile.al - ./auto/DynaLoader/dl_find_symbol_anywhere.al - ./auto/IO - ./auto/IO/IO.bs - ./auto/IO/IO.dll - ./auto/Socket - ./auto/Socket/Socket.bs - ./auto/Socket/Socket.dll - ./Carp - ./Carp/Heavy.pm - ./Carp.pm - ./Config.pm - ./DynaLoader.pm - ./Exporter - ./Exporter/Heavy.pm - ./Exporter.pm - ./IO - ./IO/File.pm - ./IO/Handle.pm - ./IO/Socket.pm - ./IO.pm - ./SelectSaver.pm - ./Socket.pm - ./strict.pm - ./Symbol.pm - ./warnings - ./warnings/register.pm - ./warnings.pm - ./XSLoader.pm - =head2 XS The following Win32-Methods are built-in: @@ -280,6 +266,32 @@ be more precise. The port for Win32 was used as a reference. +=head1 History of WinCE port + +=over + +=item 5.6.0 + +Initial port of perl to WinCE. It was performed in separate directory +named C. This port was based on contents of C<./win32> directory. +C was not built, user must have HOST perl and properly edit +C to reflect this. + +=item 5.8.0 + +wince port was kept in the same C<./wince> directory, and C +was used to invoke native compiler to create HOST miniperl, which then +facilitates cross-compiling process. +Extension building support was added. + +=item 5.9.4 + +Two directories C<./win32> and C<./wince> were merged, so perlce build +process comes in C<./win32> directory. + +=over + + =head1 AUTHORS =over diff --git a/win32/perllib.c b/win32/perllib.c index 5ce8fe7..1e4ba09 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -51,7 +51,7 @@ win32_checkTLS(PerlInterpreter *host_perl) dTHX; if (host_perl != my_perl) { int *nowhere = NULL; -#ifdef _WIN_CE +#ifdef UNDER_CE printf(" ... bad in win32_checkTLS\n"); printf(" %08X ne %08X\n",host_perl,my_perl); #endif diff --git a/win32/vmem.h b/win32/vmem.h index 1373121..3cb10a3 100644 --- a/win32/vmem.h +++ b/win32/vmem.h @@ -21,7 +21,7 @@ #ifndef ___VMEM_H_INC___ #define ___VMEM_H_INC___ -#ifndef _WIN_CE +#ifndef UNDER_CE #define _USE_MSVCRT_MEM_ALLOC #endif #define _USE_LINKED_LIST diff --git a/win32/win32.h b/win32/win32.h index 259728f..ad68699 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -572,7 +572,7 @@ EXTERN_C _CRTIMP ioinfo* __pioinfo[]; DllExport void *win32_signal_context(void); #define PERL_GET_SIG_CONTEXT win32_signal_context() -#ifdef _WIN_CE +#ifdef UNDER_CE #define Win_GetModuleHandle XCEGetModuleHandleA #define Win_GetProcAddress XCEGetProcAddressA #define Win_GetModuleFileName XCEGetModuleFileNameA