Recent

Author Topic: WinCE progress  (Read 20632 times)

Sandeep Chandra

  • Guest
WinCE progress
« on: June 15, 2006, 12:56:59 pm »
Hi

I was just wondering where is WinCE stuff at. I haven't seen much info regarding it in the forums lately. Where can I get latest info about WinCE stuff? How many people are working on this? I need answers as I will try to put my case to use Lazarus on WinCE to my boss who wants to use CF. Should I really be pushing  Lazarus against CF for PDA development.

It would be great if someone could shed some light on following:
1. Can I write a commercial application using Lazarus?
2. Will I own the source code or will I have to open source it?
3. Can I sell these applications?

Thanks is advance.

Sandeep

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
RE: WinCE progress
« Reply #1 on: June 15, 2006, 02:23:15 pm »
Well, I don't know who is involved in WinCe port, but you are helping to this project to growth, using it, reporting bugs, and of course, solving bugs through the Mantis BugTracking.

Quote
1. Can I write a commercial application using Lazarus?


Of course. I eat, drink and live like you ;)

Quote

2. Will I own the source code or will I have to open source it?


No, the code will have the licenses you want.
 
But, if you modify something about lazarus itself code or freepascal code (both GPLed), this improvements are opensource too.


Quote

3. Can I sell these applications?


This is like point 1, true? Well..yes, you can. If you want, you can sell Lazarus itself, but you must offer the source (in GPL license).

GPL (opensource) <> Free

Free as speak, not as a beer <- remember this.

CCRDude

  • Hero Member
  • *****
  • Posts: 502
RE: WinCE progress
« Reply #2 on: June 15, 2006, 02:38:16 pm »
Well, the main arguments against using Lazarus+WinCE in a end-user project for me currently are twese things:
1. the forms/windows are not yet fully fitting (forms can be moved, sub-forms do not appear completely at first)
2. threads: I have a button that starts a thread doing something that takes longer. Sometimes the thread starts, sometimes not.
3. the app I'm working on runs (except for #2) in the emulator, but not on the device, where it terminates after less than a second.

BUT: wit Lazarus, I've seen improvements every other day, so I'm staying :D

Which leads me to a question: where best to discuss WinCE problems? Shouldn't the be a WinCE subforum here? ;) And where exactly would I report problems to which bugtracker?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
RE: WinCE progress
« Reply #3 on: June 15, 2006, 03:40:04 pm »
> Which leads me to a question: where best to discuss WinCE problems? Shouldn't the be a WinCE subforum here?

Yes, seams a good idea to me.

> Wink And where exactly would I report problems to which bugtracker?

You report bugs on the main bug tracker. It´s the link called "Bugs" on the left part of lazarus website. It takes you to this bug tracker: http://www.freepascal.org/mantis/main_page.php

Then you can submit a bug as either a bug on the compiler or a bug on lazarus.

CCRDude

  • Hero Member
  • *****
  • Posts: 502
RE: WinCE progress
« Reply #4 on: June 15, 2006, 05:14:07 pm »
Ouch, how could I've missed that bug tracker link :D
Thanks, I'll probably get around to debugging this weekend and will try to use the bugtracker then :)
(it's a bit complicated currently since I've got one machine that can compile for ARM, one that does run the emulator, and one that can upload to a real device :D )

Sandeep Chandra

  • Guest
WinCE progress
« Reply #5 on: June 16, 2006, 03:45:01 am »
Has anyone done an install for WinCE stuff yet?

Regards

Sandeep

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
WinCE progress
« Reply #6 on: June 16, 2006, 07:41:03 am »
I will try in holidays next week.

Would be interesting if anyone compile it, disbribuite them to test.

I don't have time now to read the wiki page (compile, see errors why not compiled etc...etc..). But i have time to test in my ipaq.

I have HP iPaq 4150 (400mhz, 64 ram) with PocketPC 2003.

CCRDude

  • Hero Member
  • *****
  • Posts: 502
WinCE progress
« Reply #7 on: June 16, 2006, 10:35:35 am »
I haven't created an installer yet, but I guess installers don't care whether the file came form Lazarus or some other development system ;)
A quick search showed this one for example to create installers.

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
WinCE progress
« Reply #8 on: June 16, 2006, 11:02:39 am »
well..but would be possible a zip distributed system to our test, true?

I know how works my ipaq. I don't need an installer (if don't need key registris etc.) to test it.

An installer would be interesting when lazarus WinCe port become stable.

As i mentioned, i don't had time to compile it. Can you send me the binaries you use to run lazarus in the emulator? I will test in my iPaq.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: RE: WinCE progress
« Reply #9 on: June 16, 2006, 02:22:03 pm »
Quote
Well, the main arguments against using Lazarus+WinCE in a end-user project for me currently are twese things:
1. the forms/windows are not yet fully fitting (forms can be moved, sub-forms do not appear completely at first)


Another option if you need to develop immediately is to just use Free Pascal, and call the Windows API directly, just like you would do on c or c++

Quote
2. threads: I have a button that starts a thread doing something that takes longer. Sometimes the thread starts, sometimes not.


Ok, to isolate this bug we need to find out if it's on Lazarus or on the compiler.

Can you create a simple console application that uses threads and see if the bug still appears?

If threads on a console application are OK, then the problem is on Lazarus. If not, the problem is on the compiler.

Quote
3. the app I'm working on runs (except for #2) in the emulator, but not on the device, where it terminates after less than a second.


Console applications (acctually doesn't have to be console, but I mean an application that doesn't use anything from Lazarus) work on your device?

thanks,

Felipe

CCRDude

  • Hero Member
  • *****
  • Posts: 502
RE: Re: RE: WinCE progress
« Reply #10 on: June 17, 2006, 12:14:00 pm »
First, my environment: I updated my steps to install the arm-wince (did a fresh installation today), and even created a batch file that will do everything after downloading and extracting the three necessary archives; see the User:CCRDude page of the wiki.

For testing command lines, I tried both PPC Command Shell and PocketCmd+PocketConsole, along with the most simple test.pas from the wiki.

* Microsoft Device Emulator 2.0 Preview using Microsoft Windows Mobile 5.0 MSFP Emulator Images: test-wince.exe without one of the above installed just tells me "A critical component is either missing or cannot start"; same with console.dll copied into the Windows folder. But since even PocketCMD itself won't work, I'm not sure if it has anything to do with that.

* Compaq iPAQ H3870 running PocketPC 2002 (WinCE 3.0): i compiled test.pas anew with todays installation, but still the same effect: the hourglass appears and keeps rotating forever (meaning hours!), and after that I can't use the File Explorer (or PocketCmd if I started it from there) until I do a soft reset of the device.

Looking into the data segment of the compiled files, they've been using FPC 2.1.1 [2006/06/10] for arm - WinCE (last installation, 32 bit Windows and machine) as well as [2006/06/17] (this installation, 64 bit Windows and machine). But cause the same error.

Win API sounds good, too. Like in the good old TPWin days when there was no Delphi yet :D But if I can't even get a provided test console app to run (imho someone mentioned the same problem in another topic), I doubt I would get an API-based GUI application to work  :cry:

tony72

  • New Member
  • *
  • Posts: 13
Re: RE: Re: RE: WinCE progress
« Reply #11 on: June 17, 2006, 01:12:55 pm »
Quote from: "CCRDude"
...
But if I can't even get a provided test console app to run (imho someone mentioned the same problem in another topic), I doubt I would get an API-based GUI application to work  :cry:


I mentioned it, but I did subsequently manage to get the test console app to work. If you use the Lazarus Freepascal Program template, then add the  apptype console directive, it works (tested on my WM2003 ipaq 3850, haven't tested on the emulator). I haven't checked what makes the difference, but I suspect it's the {$mode objfpc}.

Edit: I just checked, all that's needed is to add the {$mode objfpc} directive.

Code: [Select]

program test;

{$mode objfpc}{$H+}
{$apptype console}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes
  { add your units here };

var
  Str: string;
begin
  WriteLn('Software Developed with:');
  WriteLn('The Free Pascal Compiler');
  WriteLn('');
  WriteLn('Please, enter your name:');
  ReadLn(Str);
  WriteLn('Your name is: ' + Str);
end.  

CCRDude

  • Hero Member
  • *****
  • Posts: 502
RE: Re: RE: Re: RE: WinCE progress
« Reply #12 on: June 17, 2006, 01:51:01 pm »
Very interesting! Your file compiled with ppcrossarm test.pas still does not work, but using the Lazarus IDE to compile it, I get a file of the same size that works. Thanks a lot, I can now start trying some small GUI-API things and a test case for threads :)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
RE: Re: RE: Re: RE: WinCE progress
« Reply #13 on: June 17, 2006, 02:31:37 pm »
Ok, good that the compiler works =)

Another IDE for quickly building GUI app with Free Pascal + Windows CE:

http://wiki.lazarus.freepascal.org/index.php/User:Roozbeh#KOL_for_Wince

Apparently Roozbeh is porting KOL from Delphi to FPC+WinCE. KOL is a lightweight library to build gui apps, googling around you can find more info about it.

We can talk to him about how KOL port is progressing.

CCRDude

  • Hero Member
  • *****
  • Posts: 502
RE: Re: RE: Re: RE: WinCE progress
« Reply #14 on: June 17, 2006, 05:38:16 pm »
I just took one of my own light-weight projects (creating a few controls and a message queue isn't that difficult :D ) and compiled it for CE. I was stuck for a few moments until I noticed that TWndClass may not use hCursor and lpszMenuName on CE, and CreateFontIndirect was not supported, but then it simply ran :)

The only minor annoyance is that the UI looks a bit "older" than the rest; the device is only CE 3.0, but stil, the Close button in the title bar in normal apps is an X in a round circle, in this simple app it's in a grey box. It does show the "correct" close button on the emulator (Mobile 5.0) though.
The window not the style I was looking at (same as File Explorer - not moving the Start menu to the bottom), but I guess that's part of the style parameter used in CreateWindow - I'll have to find out what is the "usual" setting on CE there (the SDK help isn't helpful regarding that - I thought I should use WS_EX_NODRAG, but that just returns an error that it cannot create a top-level child window - well, I'll find out :) ).

Anyway, now that I've got that running, I can see about the threads :)

 

TinyPortal © 2005-2018