📄 perlce.1
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. \*(C+ will.\" give a nicer C++. Capital omega is used to do unbreakable dashes and.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.el \{\. de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "PERLCE 1".TH PERLCE 1 "2007-12-18" "perl v5.10.0" "Perl Programmers Reference Guide".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"perlce \- Perl for WinCE.SH "Building Perl for WinCE".IX Header "Building Perl for WinCE".Sh "\s-1DESCRIPTION\s0".IX Subsection "DESCRIPTION"This file gives the instructions for building Perl5.8 and above forWinCE. Please read and understand the terms under which thissoftware is distributed..Sh "General explanations on cross-compiling WinCE".IX Subsection "General explanations on cross-compiling WinCE".IP "\(bu" 4\&\f(CW\*(C`miniperl\*(C'\fR is built. This is a single executable (without \s-1DLL\s0), intendedto run on Win32, and it will facilitate remaining build process; all binariesbuilt after it are foreign and should not run locally..Sp\&\f(CW\*(C`miniperl\*(C'\fR is built using \f(CW\*(C`./win32/Makefile\*(C'\fR; this is part of normalbuild process invoked as dependency from wince/Makefile.ce.IP "\(bu" 4After \f(CW\*(C`miniperl\*(C'\fR is built, \f(CW\*(C`configpm\*(C'\fR is invoked to create right \f(CW\*(C`Config.pm\*(C'\fRin right place and its corresponding Cross.pm..SpUnlike Win32 build, miniperl will not have \f(CW\*(C`Config.pm\*(C'\fR of host within reach;it rather will use \f(CW\*(C`Config.pm\*(C'\fR from within cross-compilation directories..SpFile \f(CW\*(C`Cross.pm\*(C'\fR is dead simple: for given cross-architecture places in \f(CW@INC\fRa path where perl modules are, and right \f(CW\*(C`Config.pm\*(C'\fR in that place..SpThat said, \f(CW\*(C`miniperl \-Ilib \-MConfig \-we 1\*(C'\fR should report an error, becauseit can not find \f(CW\*(C`Config.pm\*(C'\fR. If it does not give an error \*(-- wrong \f(CW\*(C`Config.pm\*(C'\fRis substituted, and resulting binaries will be a mess..Sp\&\f(CW\*(C`miniperl \-MCross \-MConfig \-we 1\*(C'\fR should run okay, and it will provide right\&\f(CW\*(C`Config.pm\*(C'\fR for further compilations..IP "\(bu" 4During extensions build phase, a script \f(CW\*(C`./win32/buldext.pl\*(C'\fR is invoked,which in turn steps in \f(CW\*(C`./ext\*(C'\fR subdirectories and performs a build ofeach extension in turn..SpAll invokes of \f(CW\*(C`Makefile.PL\*(C'\fR are provided with \f(CW\*(C`\-MCross\*(C'\fR so to enable cross\-compile..Sh "\s-1BUILD\s0".IX Subsection "BUILD"This section describes the steps to be performed to build PerlCE.You may find additional information about building perl for WinCEat <http://perlce.sourceforge.net> and some pre-built binaries..PP\fITools & \s-1SDK\s0\fR.IX Subsection "Tools & SDK".PPFor compiling, you need following:.IP "\(bu" 4Microsoft Embedded Visual Tools.IP "\(bu" 4Microsoft Visual \*(C+.IP "\(bu" 4Rainer Keuchel's celib-sources.IP "\(bu" 4Rainer Keuchel's console-sources.PPNeeded source files can be downloaded at<http://www.rainer\-keuchel.de/wince/dirlist.html>.PP\fIMake\fR.IX Subsection "Make".PPNormally you only need to edit \f(CW\*(C`./win32/ce\-helpers/compile.bat\*(C'\fRto reflect your system and run it..PPFile \f(CW\*(C`./win32/ce\-helpers/compile.bat\*(C'\fR is actually a wrapper to call\&\f(CW\*(C`nmake \-f makefile.ce\*(C'\fR with appropriate parameters and it accepts extraparameters and forwards them to \f(CW\*(C`nmake\*(C'\fR command as additionalarguments. You should pass target this way..PPTo prepare distribution you need to do following:.IP "\(bu" 4go to \f(CW\*(C`./win32\*(C'\fR subdirectory.IP "\(bu" 4edit file \f(CW\*(C`./win32/ce\-helpers/compile.bat\*(C'\fR.IP "\(bu" 4run compile.bat.IP "\(bu" 4run compile.bat dist.PP\&\f(CW\*(C`Makefile.ce\*(C'\fR has \f(CW\*(C`CROSS_NAME\*(C'\fR macro, and it is used further to refer toyour cross-compilation scheme. You could assign a name to it, but thisis not necessary, because by default it is assigned after your machineconfiguration name, such as \*(L"wince\-sh3\-hpc\-wce211\*(R", and this is enoughto distinguish different builds at the same time. This option could behandy for several different builds on same platform to perform, say,threaded build. In a following example we assume that all requiredenvironment variables are set properly for C cross-compiler (a special*.bat file could fit perfectly to this purpose) and your \f(CW\*(C`compile.bat\*(C'\fRhas proper \*(L"\s-1MACHINE\s0\*(R" parameter set, to, say, \f(CW\*(C`wince\-mips\-pocket\-wce300\*(C'\fR..PP.Vb 4\& 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.Ve.PPIf all goes okay and no errors during a build, you'll get two independentdistributions: \f(CW\*(C`wince\-mips\-pocket\-wce300\*(C'\fR and \f(CW\*(C`mips\-wce300\-thr\*(C'\fR..PPTarget \f(CW\*(C`dist\*(C'\fR prepares distribution file set. Target \f(CW\*(C`zipdist\*(C'\fR performssame as \f(CW\*(C`dist\*(C'\fR but additionally compresses distribution files into ziparchive..PP\&\s-1NOTE:\s0 during a build there could be created a number (or one) of \f(CW\*(C`Config.pm\*(C'\fRfor cross-compilation (\*(L"foreign\*(R" \f(CW\*(C`Config.pm\*(C'\fR) and those are hidden inside\&\f(CW\*(C`../xlib/$(CROSS_NAME)\*(C'\fR with other auxilary files, but, and this is important tonote, there should be \fBno\fR \f(CW\*(C`Config.pm\*(C'\fR for host miniperl.If you'll get an error that perl could not find Config.pm somewhere in buildingprocess this means something went wrong. Most probably you forgot tospecify a cross-compilation when invoking miniperl.exe to Makefile.PLWhen building an extension for cross-compilation your command line shouldlook like.PP.Vb 1\& ..\eminiperl.exe \-I..\elib \-MCross=mips\-wce300\-thr Makefile.PL.Ve.PPor just.PP.Vb 1\& ..\eminiperl.exe \-I..\elib \-MCross Makefile.PL.Ve.PPto refer a cross-compilation that was created last time..PPAll questions related to building for WinCE devices could be asked in\&\fIperlce\-user@lists.sourceforge.net\fR mailing list..SH "Using Perl on WinCE".IX Header "Using Perl on WinCE".Sh "\s-1DESCRIPTION\s0".IX Subsection "DESCRIPTION"PerlCE is currently linked with a simple console window, so it alsoworks on non-hpc devices..PPThe simple stdio implementation creates the files \f(CW\*(C`stdin.txt\*(C'\fR,\&\f(CW\*(C`stdout.txt\*(C'\fR and \f(CW\*(C`stderr.txt\*(C'\fR, so you might examine them if yourconsole has only a liminted number of cols..PPWhen exitcode is non-zero, a message box appears, otherwise theconsole closes, so you might have to catch an exit withstatus 0 in your program to see any output..PPstdout/stderr now go into the files \f(CW\*(C`/perl\-stdout.txt\*(C'\fR and\&\f(CW\*(C`/perl\-stderr.txt.\*(C'\fR.PPPerlIDE is handy to deal with perlce..Sh "\s-1LIMITATIONS\s0".IX Subsection "LIMITATIONS"No \fIfork()\fR, \fIpipe()\fR, \fIpopen()\fR etc..Sh "\s-1ENVIRONMENT\s0".IX Subsection "ENVIRONMENT"All environment vars must be stored in HKLM\eEnvironment asstrings. They are read at process startup..IP "\s-1PERL5LIB\s0" 4.IX Item "PERL5LIB"Usual perl lib path (semi-list)..IP "\s-1PATH\s0" 4.IX Item "PATH"Semi-list for executables..IP "\s-1TMP\s0" 4.IX Item "TMP"\&\- Tempdir..IP "\s-1UNIXROOTPATH\s0" 4.IX Item "UNIXROOTPATH"\&\- Root for accessing some special files, i.e. \f(CW\*(C`/dev/null\*(C'\fR, \f(CW\*(C`/etc/services\*(C'\fR..IP "\s-1ROWS/COLS\s0" 4.IX Item "ROWS/COLS"\&\- Rows/cols for console..IP "\s-1HOME\s0" 4.IX Item "HOME"\&\- Home directory..IP "\s-1CONSOLEFONTSIZE\s0" 4.IX Item "CONSOLEFONTSIZE"\&\- Size for console font..PPYou can set these with cereg.exe, a (remote) registry editoror via the PerlIDE..Sh "\s-1REGISTRY\s0".IX Subsection "REGISTRY"To start perl by clicking on a perl source file, you haveto make the according entries in \s-1HKCR\s0 (see \f(CW\*(C`ce\-helpers/wince\-reg.bat\*(C'\fR).cereg.exe (which must be executed on a desktop pc withActiveSync) is reported not to work on some devices.You have to create the registry entries by hand using a registry editor..Sh "\s-1XS\s0".IX Subsection "XS"The following Win32\-Methods are built-in:.PP.Vb 10\& 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);.Ve.Sh "\s-1BUGS\s0".IX Subsection "BUGS"Opening files for read-write is currently not supported ifthey use stdio (normal perl file handles)..PPIf you find bugs or if it does not work at all on yourdevice, send mail to the address below. Please reportthe details of your device (processor, ceversion, devicetype (hpc/palm/pocket)) and the date of the downloadedfiles..Sh "\s-1INSTALLATION\s0".IX Subsection "INSTALLATION"Currently installation instructions are at <http://perlce.sourceforge.net/>..PPAfter installation & testing processes will stabilize, information willbe more precise..SH "ACKNOWLEDGEMENTS".IX Header "ACKNOWLEDGEMENTS"The port for Win32 was used as a reference..SH "History of WinCE port".IX Header "History of WinCE port".IP "5.6.0" 4.IX Item "5.6.0"Initial port of perl to WinCE. It was performed in separate directorynamed \f(CW\*(C`wince\*(C'\fR. This port was based on contents of \f(CW\*(C`./win32\*(C'\fR directory.\&\f(CW\*(C`miniperl\*(C'\fR was not built, user must have \s-1HOST\s0 perl and properly edit \&\f(CW\*(C`makefile.ce\*(C'\fR to reflect this..IP "5.8.0" 4.IX Item "5.8.0"wince port was kept in the same \f(CW\*(C`./wince\*(C'\fR directory, and \f(CW\*(C`wince/Makefile.ce\*(C'\fRwas used to invoke native compiler to create \s-1HOST\s0 miniperl, which thenfacilitates cross-compiling process.Extension building support was added..IP "5.9.4" 4.IX Item "5.9.4"Two directories \f(CW\*(C`./win32\*(C'\fR and \f(CW\*(C`./wince\*(C'\fR were merged, so perlce buildprocess comes in \f(CW\*(C`./win32\*(C'\fR directory..SH "AUTHORS".IX Header "AUTHORS".IP "Rainer Keuchel <coyxc@rainer\-keuchel.de>" 4.IX Item "Rainer Keuchel <coyxc@rainer-keuchel.de>"provided initial port of Perl, which appears to be most essential work, asit was a breakthrough on having Perl ported at all.Many thanks and obligations to Rainer!.IP "Vadim Konovalov" 4.IX Item "Vadim Konovalov"made further support of WinCE port.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -