Difference between revisions of "WinCE port"

From Free Pascal wiki
Jump to navigationJump to search
Line 37: Line 37:
 
* WinCE does not have support for console applications by default. But you can install console support by yourself. Please note that FPC creates GUI applications for WinCE target by default. To create console application you should use -WC compiler switch or put {$APPTYPE CONSOLE} directive to source code.<br>To enable console in WinCE install one of the following programs:
 
* WinCE does not have support for console applications by default. But you can install console support by yourself. Please note that FPC creates GUI applications for WinCE target by default. To create console application you should use -WC compiler switch or put {$APPTYPE CONSOLE} directive to source code.<br>To enable console in WinCE install one of the following programs:
 
** '''PocketCMD''' by SymbolicTools. It is recommended solution. Get it [http://www.symbolictools.de/public/pocketconsole/applications/PocketCMD here]
 
** '''PocketCMD''' by SymbolicTools. It is recommended solution. Get it [http://www.symbolictools.de/public/pocketconsole/applications/PocketCMD here]
**'''PPC Command Shell''' from Microsoft Windows Mobile Developer Power Toys. Get it [http://www.microsoft.com/downloads/details.aspx?FamilyID=74473fd6-1dcc-47aa-ab28-6a2b006edfe9&displaylang=en here]<br>PPC Command Shell have less features than PocketCMD. Also it have some issues. One of them - a new console window is opened even if an application is run from a console command prompt.
+
**'''PPC Command Shell''' from Microsoft Windows Mobile Developer Power Toys. Get it [http://www.microsoft.com/downloads/details.aspx?FamilyID=74473fd6-1dcc-47aa-ab28-6a2b006edfe9&displaylang=en here]<br>PPC Command Shell have less features than PocketCMD. Also it have some issues. One of them - a new console window is opened even if an application is started from a console command prompt.
  
 
== Links ==
 
== Links ==

Revision as of 09:06, 15 August 2005

The WinCE port is under development. Currently only WinCE on ARM and i386 (WinCE emulator) is supported.

Status

The 2.1.x compiler has compiler support for arm-wince and a partial working system unit.

TODO

Windows unit

Converting PocketPC SDK headers to Windows unit is needed. It is main show-stopper now.

Since H2PAS dont eat MS headers the easiest way to port is to use win32 Windows unit and remove all functions which are missing in WinCE. The following list of WinCE API functions can be used as a reference: http://www.rainer-keuchel.de/wince/dllexports/ipaq-coredll.txt First of all there are almost no functions with A suffix and they must be removed. Also some functions exists as wrappers (SetEvent,ResetEvent and some other). Some of them are already implemented in system.pp

Building

At a certain point this breaks when the native compiler is compiled. This doesn't hurt, because you usually don't need the native compiler.

You should end with the units compiled to fpc/rtl/units/arm-wince and a ppccrossarm.exe in fpc/compiler. Copy them to locations fitting your fpc installation.

Documentation

WinCE port notes

  • chdir always produces an error (WinCE does not support setting of current directory).
  • All file/dir paths must be absolute (started with \).
  • WinCE is unicode OS. All string parameters to API calls must be PWideChar.
  • WinCE does not have support for console applications by default. But you can install console support by yourself. Please note that FPC creates GUI applications for WinCE target by default. To create console application you should use -WC compiler switch or put {$APPTYPE CONSOLE} directive to source code.
    To enable console in WinCE install one of the following programs:
    • PocketCMD by SymbolicTools. It is recommended solution. Get it here
    • PPC Command Shell from Microsoft Windows Mobile Developer Power Toys. Get it here
      PPC Command Shell have less features than PocketCMD. Also it have some issues. One of them - a new console window is opened even if an application is started from a console command prompt.

Links

Contacts

Write any questions regarding WinCE port to Yury Sidorov