Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Notes for Building the Shopping List with Windows CE and Lazarus
Sun, Oct 25 2009 11:19 PMPermanent Link

Richard Harding
Below are my notes for building the Shopping List application with Lazarus and Windows CE.
I have also attached an RTF file with the same information.

-------
Richard Harding



Installing Microsoft Device Emulator
=======================

Visual Studio contains Microsoft Device Emulator which allows the emulation of mobile
devices.  If you do not have Visual Studio you can obtain the emulator from the following
links.

Download Device Emulator 2.0
www.microsoft.com/downloads/details.aspx?familyid=
13F5DE85-30CD-4506-9C5B-A2068FA1EE9E&displaylang=en.

Download Device Emulator 3.0
http://www.microsoft.com/downloads/details.aspx?familyid=A6F6ADAF-12E3-4B2F-A394-356E2C2FB114&displaylang=en

The next step is to obtain some Windows CE OS kernel image files.  This can be obtained
from the Windows Mobile 6 SDK.  This download is several hundred MBytes.  

Download Windows Mobile 6 SDK
http://www.microsoft.com/downloads/details.aspx?FamilyID=20686a1d-97a8-4f80-bc6a-ae010e085a6e&displaylang=en

Copy the OS kernel files  from  
•   C:\Program Files\Windows Mobile 6 SDK folder
•   C:\Program Files\Microsoft Device Emulator\1.0.

OS kernel files have a bin extension.  Examples are PPC_USA_GSM_VR.bin  and
PPPC_USA_GSM_320x320_VR.bin.

Websites
Below are some links which helped me.

http://dotnet.sys-con.com/node/315038
http://blog.enterprisemobile.com/2008/05/device-emulator-setup-1/
http://msdn.microsoft.com/en-au/windowsmobile/bb264327.aspx


Running the emulator
•   Open an MS-DOS Command windows.
•   cd \Program Files\Microsoft Device Emulator\1.0
•   Run the emulator by:
       DeviceEmulator.exe PPC_USA_GSM_VR.bin /memsize 256 /cpucore ARMv5.
•   If you do not specify the memory size, it defaults to 16 which is useless.  Value must
be in the range 64 to 256.
•   Use File, Configure - Set a Shared Folder.  This allows you to copy files from your PC
to the emulator.
•   Wait until the Windows CE “desktop” appears.

Copying Files to Emulator
•   On the PC, copy the required files to the Emulator’s Share Folder.
•   Use the emulator to copy the files from the Shared Folder to the required folders on My
Device.

Configuration Settings for Lazarus
======================

Winsock
•   An error in winsock.pp is documented by http://bugs.freepascal.org/view.php?id=13614.
•   Copy the file C:\lazarus\fpc\2.2.4\source\rtl\wince\winsock.pp to the C:\Program
Files\ElevateDB LCL Standard with Source\Version 2\Lazarus (WinCE) 0.926\code\source folder
•   Make the changes to the winsock.pp.
•   After you Build the Wince application, ensure that winsock.o and winsock.ppu have been
created in your project folder.

Project Options
-----------------
Miscellaneous tab
•   Project is runnable - unchecked
•   Save .lrs files - unchecked
•   All other options - checked

Project Inspector
-------------------

Remove EDBRun (>=2.0) from the list

Environment Options
------------------------
Lazarus directory - C:\lazarus\
Compiler path - C:\lazarus\fpc\2.2.4\bin\i386-win32\fpc.exe
FPC source directory - C:\lazarus\fpc\2.2.4\source\
Make path - C:\lazarus\fpc\2.2.2\bin\i386-win32\make.exe


Compiler Options - Windows 32 Applications
--------------------------------------------------

Paths tab
Other Unit files
•   $(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\
•   $(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\$(LCLWidgetType)\
•   $(LazarusDir)\packager\units\$(TargetCPU)-$(TargetOS)\
•   C:\Program Files\ElevateDB LCL Standard with Source\Version 2\Lazarus (Wince)
0.926\code\source\

Include files
•   $(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\$(LCLWidgetType)\

LCL Gadget Type - win32/win64

Parsing tab
Assembler style - Default

Code tab
Target OS - Win32
Target CPU family - i386
Target Processor - default
Optimization - Level 1

Linking tab
Check Strip Symbols from Executable
Check Win32 GUI application


Compiler Options - WinCE Applications
--------------------------------------------

Paths tab
Other Unit files
•   $(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\
•   $(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\$(LCLWidgetType)\
•   $(LazarusDir)\packager\units\$(TargetCPU)-$(TargetOS)\
•   C:\Program Files\ElevateDB LCL Standard with Source\Version 2\Lazarus (Win32-Unicode)
0.926\code\source\
Include files
•   $(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\$(LCLWidgetType)\

LCL Gadget Type - wince

Parsing tab
Assembler style - Default

Code tab
Target OS - Wince
Target CPU family - ARM
Target Processor - default
Optimization - Level 1

Linking tab
Check Strip Symbols from Executable
Check Win32 GUI application

Building Lazarus Applications
---------------------------------
•   Use Build All
•   Do not run application from within IDE.



Attachments: Installing Microsoft Device Emulator.rtf
Tue, Oct 27 2009 8:44 AMPermanent Link

Leslie
Richard,

Great job, very helpful.

Just one question:

<<Make path - C:\lazarus\fpc\2.2.2\bin\i386-win32\make.exe >>

Every other place you are using fpc 2.2.4 but here the v2.2.2 make. Is this typo or  is it not working with latest make utility?


I would be more than happy to hear more about your advances with the WinCE port. Smile

Leslie
Tue, Oct 27 2009 6:42 PMPermanent Link

Richard Harding
Hi Leslie,


<<Make path - C:\lazarus\fpc\2.2.2\bin\i386-win32\make.exe >>

Every other place you are using fpc 2.2.4 but here the v2.2.2 make. Is this typo or  is it
not working with latest make utility?

>>>

It should be v2.2.4.  I cut and pasted from the IDE Environment Options form which was set
up incorrectly.

Richard Harding
Tue, Oct 27 2009 6:57 PMPermanent Link

Leslie
Thanks. Smile
Tue, Oct 27 2009 8:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Richard,

<< Below are my notes for building the Shopping List application with
Lazarus and Windows CE. I have also attached an RTF file with the same
information. >>

Cool, thanks very much.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image