perlsymbian.pod

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· POD 代码 · 共 434 行 · 第 1/2 页

POD
434
字号
If you read this file _as_is_, just ignore the funny characters you see.
It is written in the POD format (see pod/perlpod.pod) which is specially
designed to be readable as is.

=head1 NAME

README.symbian - Perl version 5 on Symbian OS

=head1 DESCRIPTION

This document describes various features of the Symbian operating
system that will affect how Perl version 5 (hereafter just Perl)
is compiled and/or runs.

B<NOTE: this port (as of 0.4.1) does not compile into a Symbian
OS GUI application, but instead it results in a Symbian DLL.>
The DLL includes a C++ class called CPerlBase, which one can then
(derive from and) use to embed Perl into applications, see F<symbian/README>.

The base port of Perl to Symbian only implements the basic POSIX-like
functionality; it does not implement any further Symbian or Series 60,
Series 80, or UIQ bindings for Perl.

It is also possible to generate Symbian executables for "miniperl"
and "perl", but since there is no standard command line interface
for Symbian (nor full keyboards in the devices), these are useful
mainly as demonstrations.

=head2 Compiling Perl on Symbian

(0) You need to have the appropriate Symbian SDK installed.

    These instructions have been tested under various Nokia Series 60
    Symbian SDKs (1.2 to 2.6, 2.8 should also work, 1.2 compiles but
    does not work), Series 80 2.0, and Nokia 7710 (Series 90) SDK.
    You can get the SDKs from Forum Nokia (http://www.forum.nokia.com/).
    A very rough port ("it compiles") to UIQ 2.1 has also been made.

    A prerequisite for any of the SDKs is to install ActivePerl
    from ActiveState, http://www.activestate.com/Products/ActivePerl/

    Having the SDK installed also means that you need to have either
    the Metrowerks CodeWarrior installed (2.8 and 3.0 were used in testing)
    or the Microsoft Visual C++ 6.0 installed (SP3 minimum, SP5 recommended).

    Note that for example the Series 60 2.0 VC SDK installation talks
    about ActivePerl build 518, which does no more (as of mid-2005) exist
    at the ActiveState website.  The ActivePerl 5.8.4 build 810 was
    used successfully for compiling Perl on Symbian.  The 5.6.x ActivePerls
    do not work.

    Other SDKs or compilers like Visual.NET, command-line-only
    Visual.NET, Borland, GnuPoc, or sdk2unix have not been tried.

    These instructions almost certainly won't work with older Symbian
    releases or other SDKs.  Patches to get this port running in other
    releases, SDKs, compilers, platforms, or devices are naturally welcome.

(1) Get a Perl source code distribution (for example the file
    perl-5.9.2.tar.gz is fine) from http://www.cpan.org/src/
    and unpack it in your the C:/Symbian directory of your Windows
    system.

(2) Change to the perl source directory.

	cd c:\Symbian\perl-5.x.x

(3) Run the following script using the perl coming with the SDK

	perl symbian\config.pl

    You must use the cmd.exe, the Cygwin shell will not work.
    The PATH must include the SDK tools, including a Perl,
    which should be the case under cmd.exe.  If you do not
    have that, see the end of symbian\sdk.pl for notes of
    how your environment should be set up for Symbian compiles.

(4) Build the project, either by

	make all

    in cmd.exe or by using either the Metrowerks CodeWarrior
    or the Visual C++ 6.0, or the Visual Studio 8 (the Visual C++
    2005 Express Edition works fine).

    If you use the VC IDE, you will have to run F<symbian\config.pl>
    first using the cmd.exe, and then run 'make win.mf vc6.mf' to generate
    the VC6 makefiles and workspaces.  "make vc6" will compile for the VC6,
    and "make cw" for the CodeWarrior.

    The following SDK and compiler configurations and Nokia phones were
    tested at some point in time (+ = compiled and PerlApp run, - = not),
    both for Perl 5.8.x and 5.9.x:

        SDK     | VC | CW |
        --------+----+----+---
        S60 1.2 | +  | +  | 3650 (*)
        S60 2.0 | +  | +  | 6600
        S60 2.1 | -  | +  | 6670
        S60 2.6 | +  | +  | 6630    
        S60 2.8 | +  | +  | (not tested in a device)
        S80 2.6 | -  | +  | 9300
        S90 1.1 | +  | -  | 7710
        UIQ 2.1 | -  | +  | (not tested in a device)

    (*) Compiles but does not work, unfortunately, a problem with Symbian.

    If you are using the 'make' directly, it is the GNU make from the SDKs,
    and it will invoke the right make commands for the Windows emulator
    build and the Arm target builds ('thumb' by default) as necessary.

    The build scripts assume the 'absolute style' SDK installs under C:,
    the 'subst style' will not work.

    If using the VC IDE, to build use for example the File->Open Workspace->
    C:\Symbian\8.0a\S60_2nd_FP2\epoc32\build\symbian\perl\perl\wins\perl.dsw
    The emulator binaries will appear in the same directory.

    If using the VC IDE, you will a lot of warnings in the beginning of
    the build because a lot of headers mentioned by the source cannot
    be found, but this is not serious since those headers are not used.

    The Metrowerks will give a lot of warnings about unused variables and
    empty declarations, you can ignore those.

    When the Windows and Arm DLLs are built do not be scared by a very long
    messages whizzing by: it is the "export freeze" phase where the whole
    (rather large) API of Perl is listed.

    Once the build is completed you need to create the DLL SIS file by

	make perldll.sis

    which will create the file perlXYZ.sis (the XYZ being the Perl version)
    which you can then install into your Symbian device: an easy way
    to do this is to send them via Bluetooth or infrared and just open
    the messages.

    Since the total size of all Perl SIS files once installed is
    over 2 MB, it is recommended to do the installation into a
    memory card (drive E:) instead of the C: drive.

    The size of the perlXYZ.SIS is about 370 kB but once it is in the
    device it is about one 750 kB (according to the application manager).

    The perlXYZ.sis includes only the Perl DLL: to create an additional
    SIS file which includes some of the standard (pure) Perl libraries,
    issue the command

        make perllib.sis

    Some of the standard Perl libraries are included, but not all:
    see L</HISTORY> or F<symbian\install.cfg> for more details
    (250 kB -> 700 kB).

    Some of the standard Perl XS extensions (see L</HISTORY> are
    also available:

        make perlext.sis

    which will create perlXYZext.sis (290 kB -> 770 kB).

    To compile the demonstration application PerlApp you need first to
    install the Perl headers under the SDK.

    To install the Perl headers and the class CPerlBase documentation
    so that you no more need the Perl sources around to compile Perl
    applications using the SDK:

        make sdkinstall

    The destination directory is C:\Symbian\perl\X.Y.Z.  For more
    details, see F<symbian\PerlBase.pod>.

    Once the headers have been installed, you can create a SIS for
    the PerlApp:

        make perlapp.sis

    The perlapp.sis (11 kB -> 16 kB) will be built in the symbian
    subdirectory, but a copy will also be made to the main directory.

    If you want to package the Perl DLLs (one for WINS, one for ARMI),
    the headers, and the documentation:

        make perlsdk.zip

    which will create perlXYZsdk.zip that can be used in another
    Windows system with the SDK, without having to compile Perl in
    that system.

    If you want to package the PerlApp sources:

        make perlapp.zip

    If you want to package the perl.exe and miniperl.exe, you
    can use the perlexe.sis and miniperlexe.sis make targets.
    You also probably want the perllib.sis for the libraries
    and maybe even the perlapp.sis for the recognizer.

    The make target 'allsis' combines all the above SIS targets.

    To clean up after compilation you can use either of

        make clean
        make distclean

    depending on how clean you want to be.

=head2 Compilation problems

If you see right after "make" this

    cat makefile.sh >makefile
    'cat' is not recognized as an internal or external command,
    operable program or batch file.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?