Recent

Author Topic: KControls 1.7 + WinCE  (Read 13333 times)

CrazyDron

  • New Member
  • *
  • Posts: 13
KControls 1.7 + WinCE
« on: May 03, 2016, 08:32:11 am »
Good day!

I try to install KControls package on clean build of Lazarus Win32+cross_arm_ce. Operating system - Win7 x64.

I add control TKGrid on form, compile it and run. It works.

But when I change project options to:
1. Target OS: WinCE
2. Target CPU: arm

compilation stops at unit CairoCanvas and says
cairocanvas.pas(17,13) Fatal: Cannot find unit Cairo, used in CairoCanvas of package cairocanvas_pkg.

Units Pango, PangoCairo, GLib2 are not founded too.

As I understand - cannot put i386-units into arm-ce compiler.

Maybe someone can help me?

UPD: my first step was writing to developer. He says:
I think your Lazarus installation or build configuration is corrupt under Linux or not ready for cross compiling. I am not expert here. Please search or ask on Lazarus forum http://forum.lazarus.freepascal.org/. There are many clever people that might be able to help you.

zmoky

  • New member
  • *
  • Posts: 8
Re: KControls 1.7 + WinCE
« Reply #1 on: January 17, 2017, 09:49:09 pm »
I have a similar problem.

I installed from sourceforge:

lazarus-1.6.2-fpc-3.0.0-win32.exe
lazarus-1.6.2-fpc-3.0.0-cross-arm-wince-win32.exe

And for LCL Widget Type: wince, Target OS: WinCE, Target CPU: arm I get:

Code: [Select]
Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.0 [2016/11/12] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: WinCE for ARM
(3104) Compiling cairocanvas_pkg.pas
(3104) Compiling cairocanvasall.pas
(3104) Compiling cairocanvas.pas
C:\lazarus\components\cairocanvas\cairocanvas.pas(17,13) Fatal: (10022) Can't find unit Cairo used by CairoCanvas
Fatal: (1018) Compilation aborted
Error: C:\lazarus\fpc\3.0.0\bin\i386-win32\ppcrossarm.exe returned an error exitcode
Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.0 [2016/11/12] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: WinCE for ARM
(3104) Compiling lhelpcontrolpkg.pas
Free Pascal Compiler version 3.0.0 [2016/11/12] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: WinCE for ARM
(3104) Compiling pascalscript.pas
(3104) Compiling PascalScript_Core_Reg.pas
Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.0 [2016/11/12] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: WinCE for ARM
(3104) Compiling datetimectrls.pas
Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.0 [2016/11/12] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: WinCE for ARM
(3104) Compiling dbflaz.pas
Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.0 [2016/11/12] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: WinCE for ARM
(3104) Compiling externhelp.pas
Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.0 [2016/11/12] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: WinCE for ARM
(3104) Compiling fpcunitide.pas
Hint: (11030) Start of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\lazarus\fpc\3.0.0\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 3.0.0 [2016/11/12] for arm
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: WinCE for ARM
(3104) Compiling instantfpclaz.pas
(3104) Compiling instantfpcregisterlaz.pas

CrazyDron

  • New Member
  • *
  • Posts: 13
Re: KControls 1.7 + WinCE
« Reply #2 on: January 18, 2017, 06:22:48 am »
zmoky, I try lot of variants.

Works only one: Lazarus 0.9.28 beta + latest KControls. Works both under x86 and arm/ce.

So I'm using two versions together. When I need to build very small exe - working in 0.9.28+KControls, normal work is doing in 1.4.4/1.6.2.

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: KControls 1.7 + WinCE
« Reply #3 on: January 18, 2017, 01:53:15 pm »
Since I am the author of KControls, can I somehow simulate WinCE target on Windows?
I don't have a physical WinCE device.

I would like to test it with Lazarus 1.7.
If it works with 0.9.28 then clearly there are only some minor issues.

Shortly reviewed this http://wiki.lazarus.freepascal.org/WinCE_Programming_Tips
but did not find anything.

Btw. Are there still many people using WinCE? Thought it was a dead technology.

CrazyDron

  • New Member
  • *
  • Posts: 13
Re: KControls 1.7 + WinCE
« Reply #4 on: January 18, 2017, 02:09:56 pm »
tk, it's good to see author here  :)
Yes, some people uses WinCE-programming.

For example, here is my software: http://4pda.ru/forum/index.php?showtopic=721507
At spoiler "Additional software" (Дополнительный софт) - first file is WinCE-emulator from Microsoft, tuned for our tasks. Therefore - you can use it for launching arm/ce-exe's.

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: KControls 1.7 + WinCE
« Reply #5 on: January 18, 2017, 02:43:15 pm »
At spoiler "Additional software" (Дополнительный софт) - first file is WinCE-emulator from Microsoft, tuned for our tasks. Therefore - you can use it for launching arm/ce-exe's.

Luckily I had some Russian at school.
But when I click on WinCE_Emu.zip I get Error 404.

CrazyDron

  • New Member
  • *
  • Posts: 13
Re: KControls 1.7 + WinCE
« Reply #6 on: January 18, 2017, 05:30:02 pm »
I get Error 404.
I forgot :) You should register to use full functionality.
Here is the mirror: https://yadi.sk/d/8nrjjOzI39gS2p

Download is "Скачать".
« Last Edit: January 18, 2017, 06:13:15 pm by CrazyDron »

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: KControls 1.7 + WinCE
« Reply #7 on: January 19, 2017, 01:46:52 am »
Works only one: Lazarus 0.9.28 beta + latest KControls. Works both under x86 and arm/ce.

I don't have 0.9.28 anymore, but can you confirm that a fresh WinCE application works for you in 0.9.28, when you drop Dialogs/TPrinterSetupDialog on your main form? Or alternatively when you add Printers4Lazarus package as project dependency?

If this works then Printers4Lazarus is clearly broken under WinCE in newer Lazarus versions.

CrazyDron

  • New Member
  • *
  • Posts: 13
Re: KControls 1.7 + WinCE
« Reply #8 on: January 19, 2017, 02:03:26 pm »
I think that we don't need v0.9.28 anymore  ;)
Even so, here is old version: https://yadi.sk/d/g5waXNLr39pRCT

tk

  • Sr. Member
  • ****
  • Posts: 361
Re: KControls 1.7 + WinCE
« Reply #9 on: January 19, 2017, 04:24:40 pm »
I think that we don't need v0.9.28 anymore  ;)

Why? I thought KControls worked for you in this version.
For me, this version does not work even with a simple fresh app.
Get following errors:

Code: [Select]
windres: can't open file `TForm1': No such file or directory
Hint: Start of reading config file c:\lazarus\fpc\2.2.4\bin\i386-win32\fpc.cfg
Hint: End of reading config file c:\lazarus\fpc\2.2.4\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.2.4 [2009/09/29] for arm
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: WinCE for ARM
Compiling project1.lpr
Compiling unit1.pas
Assembling unit1
Compiling resource D:\Data\Delphi\Test\WinCETest\unit1.lfm
c:\lazarus\fpc\2.2.4\bin\i386-win32\arm-wince-windres.exe: can't open file `TForm1': No such file or directory
unit1.pas(27) Error: Error while linking
unit1.pas(27) Fatal: There were 1 errors compiling module, stopping

And I am really in doubt Printers4Lazarus package (->KControls) would work there.

In Lazarus 1.7 I am at least able to build a simple fresh app for WinCE/arm.

Anyway, I could not connect to and debug in your emulator at all, don't know how to setup it.
The manual (http://wiki.freepascal.org/Windows_CE_Interface) did not work for me either (having only Win7x64 and Win10 now).
For example, I could not setup Windows Mobile 6.5 Developer Tool Kit at all.

To proceed further, could you please answer my previous question whether you can use Printers4Lazarus or TPrinterSetupDialog in your WinCE applications (compiled in Lazarus v0.9.28 beta where you previously stated Kcontrols worked)?

  • If yes then Printers4Lazarus is broken -> Lazarus bug.
  • If not then WinCE widgetset is incomplete -> KControls cannot be used as such with WinCE widgetset because it requires this package. You would need to delete Printers4Lazarus from KControls dependencies and remove all stuff that uses it, for now it is only PrintersDlgs unit in file kprintsetup.pas so it should not be that hard.

EDIT:
Discovered now this http://wiki.lazarus.freepascal.org/Roadmap#Status_of_dialogs_on_each_LCL_Interface ->
TPrinterSetupDialog not implemented under WinCE. This explains everything. So KControls couldn't work with WinCE widgetset without above modifications (well, maybe some old version which did not have the Printers4Lazarus dependency).

I made modifications in the KControls trunk. Now it is possible to compile KControlsLaz package under WinCE with newest Lazarus + FPC (both from trunks).
All you have to do is to remove Printer4Lazarus package form the KControlsLaz package dependencies (you may want to make a copy of KControlsLaz.lpk for that).
« Last Edit: January 19, 2017, 05:25:20 pm by tk »

zmoky

  • New member
  • *
  • Posts: 8
Re: KControls 1.7 + WinCE
« Reply #10 on: January 19, 2017, 07:40:03 pm »
zmoky, I try lot of variants.

Works only one: Lazarus 0.9.28 beta + latest KControls. Works both under x86 and arm/ce.

So I'm using two versions together. When I need to build very small exe - working in 0.9.28+KControls, normal work is doing in 1.4.4/1.6.2.

I am writing to all the threads that I read and related to my issue, with the working solution

Compiling sample app with a button for closing it, using the following setup:

Target OS: WinCE
Target CPU family: arm
Target processor: Default
LCLWidgetType:=wince

Installed sourceforge Lazarus in this order:
    - lazarus-1.6.2-fpc-3.0.0-win32.exe
    - lazarus-1.6.2-fpc-3.0.0-cross-arm-wince-win32.exe

Tested on hardware:
    - Symbol MC2180 Windows CE 6.0 Core with Marvell PXA 320 CPU
    - Intermec Windows Embedded Handheld 6.5 Classic ( Windows CE 5.2.29354 ) with ARM Cortex-A8 OMAP3 processor

It worked on the WinCE 5.2.x but did not reacted in any way when I stared the app on the Win CE 6.0 Core.

After I copied the aygshell.dll file in the same dir with the app it started to work also on Windows CE 6.0 ( MC2180 ).

I used the http://hpcmonex.net/izemize.htm aygshell collection, file 12 ( size: 22,016 bytes ).

For any questions related to dev in the os and hw above you can contact me on my gmail id: zmooky.

I send my thanks to the fpc team for the great work that they did !

 

TinyPortal © 2005-2018