Recent

Author Topic: Free pascal on Windows Phone 8, possible?  (Read 18569 times)

Daniello

  • Jr. Member
  • **
  • Posts: 64
Free pascal on Windows Phone 8, possible?
« on: December 28, 2013, 08:52:44 pm »
So I've heard that Windows Phone 8 supports C++.
Would this mean it might be possible to run pascal code on it?
Did anyone already tried it?
I want to port one of my games to this OS, I've heard about Oxygene, but that is somehow of a different language, if I could keep using FPC/Lazarus it would be great  ;)

bobihot

  • New Member
  • *
  • Posts: 35
Re: Free pascal on Windows Phone 8, possible?
« Reply #1 on: December 29, 2013, 10:46:10 am »
Hi,
I was tested on Windows Phone 6 and work. But for now I has not Windows Phone 8 and can't tested. May be You test this?

Daniello

  • Jr. Member
  • **
  • Posts: 64
Re: Free pascal on Windows Phone 8, possible?
« Reply #2 on: December 29, 2013, 11:08:17 am »
As far as I know, WP6, WP7 and WP8 are all different targets, so even if it works on 6, might not work on 8

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Free pascal on Windows Phone 8, possible?
« Reply #3 on: December 29, 2013, 11:22:39 am »
Daniello is right: Windows CE/Mobile and WP7/8 are too different. It won't work.

Search the forum and the wiki: there are no iniatives to start a WP8 port.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Daniello

  • Jr. Member
  • **
  • Posts: 64
Re: Free pascal on Windows Phone 8, possible?
« Reply #4 on: December 29, 2013, 11:29:08 am »
I have a WP8 phone, so lets say I wanted to port FPC to this new target, what should I do, is there any guide for adding new targets, whats envolved?
I have no experience with compilers, so not sure if I could do it

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Free pascal on Windows Phone 8, possible?
« Reply #5 on: December 29, 2013, 12:33:04 pm »
See the articles on porting to Z/OS (mainframe) for the experiences/to do list of somebody else who tried that (and seemingly stopped):
http://wiki.lazarus.freepascal.org/ZSeries
edit especially:
http://wiki.lazarus.freepascal.org/ZSeries/Part_1
http://wiki.lazarus.freepascal.org/ZSeries/Part_2
http://wiki.lazarus.freepascal.org/ZSeries/Part_3

You can also ask on the fpc and fpc-devel mailing lists...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Free pascal on Windows Phone 8, possible?
« Reply #6 on: December 29, 2013, 02:28:12 pm »
Quote
I have a WP8 phone, so lets say I wanted to port FPC to this new target, what should I do, is there any guide for adding new targets, whats envolved?
There you go
Quote
I have no experience with compilers, so not sure if I could do it
That would be extremely hard then, even I who have such experiences haven't been able to get the deep pictures of fpc architectures (I get the big one, but it's too narrow to be able to modify the compiler). Moreover, you will deal with the hardest part in porting: code generator. If you don't understand executable format and assembly programming, porting would be impossible, I say.

Daniello

  • Jr. Member
  • **
  • Posts: 64
Re: Free pascal on Windows Phone 8, possible?
« Reply #7 on: January 09, 2014, 03:13:07 pm »
Ok, I had an idea.
It is possible to build .dll files with Lazarus, compiled for arm7?
That would solve my problem, I would just build a dll with all my code and then bootstrap it from a c++ Windows Phone 8 app.

If not possible, how simple/complex would be to add this feature to fpc?
From what I know, fpc already can build Windows dlls, I expect the file format would be the same, with the only difference being the generated code, that would be arm7 instead of x86

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Free pascal on Windows Phone 8, possible?
« Reply #8 on: January 09, 2014, 03:17:36 pm »
well do winCE dlls work on windows phone 8? If yes then I guess you can use the existing cross compiler to build winCE dlls.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Daniello

  • Jr. Member
  • **
  • Posts: 64
Re: Free pascal on Windows Phone 8, possible?
« Reply #9 on: January 09, 2014, 03:21:48 pm »
I'm trying to investigate, but can't find any info about it, I guess I will try compile one dll and try it

hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: Free pascal on Windows Phone 8, possible?
« Reply #10 on: January 09, 2014, 05:59:22 pm »
It is possible to build .dll files with Lazarus, compiled for arm7?
That would solve my problem, I would just build a dll with all my code and then bootstrap it from a c++ Windows Phone 8 app.
I speculate that there actually is such possibility. It is known that Windows Phone still uses Windows CE core inside, so it can be actually possible to do this. You can try to compile a dll for arm-wince target and see if it works. I somehow think that all non-visual stuff from WinAPI (like accessing file system and registry) might actually work [because all Windows CE cores are supposedly backwards-compatible], but unfortunately WinAPI routines related to user interface will most likely NOT work
Too late to escape fate

Daniello

  • Jr. Member
  • **
  • Posts: 64
Re: Free pascal on Windows Phone 8, possible?
« Reply #11 on: January 09, 2014, 06:25:01 pm »
I am not worried about Windows interfaces since my interest is porting a 3D game, my only problem would be to have acess to DirectX from this DLL, but if I can make a simple test DLL work, then it might actually be possible to do this, I will see  :)

 

TinyPortal © 2005-2018