Recent

Author Topic: Feedback and Thank you . . . .  (Read 2683 times)

Wilko500

  • Full Member
  • ***
  • Posts: 180
Feedback and Thank you . . . .
« on: March 22, 2021, 11:26:41 pm »
Appologies, A longer post than I intended.

By way of a thank you to FPC and LCL developers and forum posters I have posted an update of my first attempt to re-develop my most complex VB6 program in Lazarus/Free Pascal.  This is one of my LockDown (UK) successes, has helped maintain an element of sanity in a crazy world.  The challenge I set myself was to take a working VB6 program and re-develop in Lazarus/Free Pascal.  Although I am comfortable with programming the concept of OOP is new to me. 

I am hugely grateful to those who have responded to my help requests on the forum with suggestions and answers and of course to those who have developed the development tools.  Thank you all.

The purpose of the program is to document program logic, first written in Fortran back in the early (pre-PC's) 1980's with magnetic tape output direct to A0 plotter. Ahhh!  The good old days.   The notation is not one you will have seen but written by my boss at the time and used by me ever since.

The attachments show the main program, still a work in progress, and typical output.  The output part was quite challenging, particularly scaling the fonts on the page and predicting layout on the screen (the program copes with taskbar any position, large/small icons and different screen resolutions but not all themes). The page acts as a print preview and is formatted so that the output print is correctly proportioned for example A4 printing. Highlighting a row in the results window makes that page visible.

The formatting of output is fully parameterised and will, in time, include selection of page format, orientation, printer. 

While there is still lots to finish, particularly the printing, I feel confident that it can be achieved in FPC.  For now I'm developing in a Windows environment my ultimate target is Mac OS.  My first attempt to install Lazarus/Free Pascal Mac OS failed miserably.  I have since found additional documentation that should help my next attempt.

What did I get wrong? Probably lots but the most glaring error is failure to understand high DPI and include it from development inception.  However, in mitigation, it is unlikely that my program will be used anywhere other than on my own hardware so that's not a show stopper but it would be nice if the program would run on different hardware with different DPI's.

Perhaps also using Windows in a virtual environment (Parallels). While it works fine for most programs I suspect that it also has an impact on handling of High DPI.  I note here that the calculated size of screen elements based on DPI as reported by FPC is incorrect, I think the reported DPI value is incorrect.

What next. Well Printing, obviously, more work on classes and using them and completing the program functionality.
Next projects: RS485/ModBus energy monitor.    :PV Data capture and upload to internet

I might be busy for a few weeks!!!!!

Thank you all for your help
MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Feedback and Thank you . . . .
« Reply #1 on: March 23, 2021, 01:01:44 am »
Hey Wilko,

Quite a big post indeed, but I'm really glad that you're attempting your endeavours in my passion language, Object Pascal :D

[snip] My first attempt to install Lazarus/Free Pascal Mac OS failed miserably. [snip]

I just want to address this particular issue with a question: Have you heard of fpcupdeluxe?

This app for me was a revelation in terms of installing Lazarus/FPC.

You'll notice on the latest release that you have PowerPC/64b/32b options for macOS(Darwin).

I'll append a screenshot of it at the end of this post. It's on Ubuntu Dark Theme, but it works all the same under macOS.

With this little app you can install any combination of versions of FPC and Lazarus, as long as you put each combination under it's own folder, to your heart's content.
Under each of those folders you can then install cross compilation tools for Linux 32b/64b and Windows 32b/64b so you can distribute your software to other people.

Hope this helps solve this particular issue.

Cheers,
Gus

PS: The way I advertise fpcupdeluxe on the forum I should get advertiser's fee from DonAlfredo, LOL :D

lucamar

  • Hero Member
  • *****
  • Posts: 4217
Re: Feedback and Thank you . . . .
« Reply #2 on: March 23, 2021, 01:07:50 am »
PS: The way I advertise fpcupdeluxe on the forum I should get advertiser's fee from DonAlfredo, LOL :D

Ask him for a discount on the license price ;D :P
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Feedback and Thank you . . . .
« Reply #3 on: March 23, 2021, 01:17:07 am »
Hey Lucamar,

Ask him for a discount on the license price ;D :P

Humm a discount on free kinda means I'll have to pay HIM!!

Well that not right, is it? LOL :D :P

Cheers,
Gus

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12171
  • Debugger - SynEdit - and more
    • wiki
Re: Feedback and Thank you . . . .
« Reply #4 on: March 23, 2021, 02:20:42 am »
Humm a discount on free kinda means I'll have to pay HIM!!

Well that not right, is it? LOL :D :P

Nope.

If it is a percentage off, then nothing changed  xx% of $0 is still nothing.

But if you where to get $1 discount, then he has to pay you $1 each time you get a copy.
Think of it:
- You give him the free $0 payment, that everyone else would have to pay too.
- But you should pay $1 less (your discount)
- So you gave him $1 to much. And he has to give that $1 to you now.

That is maths for you. That is what your maths teacher meant, when they said that you do not learn for the school, but for real life.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Feedback and Thank you . . . .
« Reply #5 on: March 23, 2021, 02:26:21 am »
Hey Martin,

But if you where to get $1 discount, then he has to pay you $1 each time you get a copy.
Think of it:
- You give him the free $0 payment, that everyone else would have to pay too.
- But you should pay $1 less (your discount)
- So you gave him $1 to much. And he has to give that $1 to you now.

MAAAAANNNN my brain is all effed up today. I think it's mush... :D
You're completely right!! I was thinking in reverse.
A discount is him giving me money back!!

ARRRGHHH, many thanks for the correction, really appreciated!!

Cheers,
Gus

Wilko500

  • Full Member
  • ***
  • Posts: 180
Re: Feedback and Thank you . . . .
« Reply #6 on: March 24, 2021, 03:03:54 pm »
Gcarreno,

Quote
I just want to address this particular issue with a question: Have you heard of fpcupdeluxe?
No I had not but will look at it in due course. Thank you, but
Quote
You'll notice on the latest release that you have PowerPC/64b/32b options for macOS(Darwin).
but PowerPC apps are not supported on macOS Big Sur

Nevertheless I will investigate further

MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Feedback and Thank you . . . .
« Reply #7 on: March 25, 2021, 01:43:45 am »
Hey Wilko500,

Quote
You'll notice on the latest release that you have PowerPC/64b/32b options for macOS(Darwin).
but PowerPC apps are not supported on macOS Big Sur

Nevertheless I will investigate further

Ha, yes, I see I messed up...
When I said PowerPC/64b/32b, what I meant was:
  • PowerPC Darwin
  • PowerPC 64b Darwin
  • Intel 32b Darwin
  • Intel 64b Darwin

And most of them, if not all in both Cocoa or Carbon.
It's missing M1, but I think it's gonna be a long time until we see Lazarus and FPC ported to the M1 silicon.

Cheers,
Gus

PascalDragon

  • Hero Member
  • *****
  • Posts: 6349
  • Compiler Developer
Re: Feedback and Thank you . . . .
« Reply #8 on: March 25, 2021, 09:07:19 am »
It's missing M1, but I think it's gonna be a long time until we see Lazarus and FPC ported to the M1 silicon.

Ehm, newsflash, FPC and Lazarus are natively ported to aarch64-darwin since July/August '20 and as an exception due to its significance it has even been backported to 3.2.1 so the 3.2.2 release (currently available as RC1 (it's the intelarm64 one)) will provide it as well.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Feedback and Thank you . . . .
« Reply #9 on: March 25, 2021, 09:41:20 am »
Hey PascalDragon,

Ehm, newsflash, FPC and Lazarus are natively ported to aarch64-darwin since July/August '20 and as an exception due to its significance it has even been backported to 3.2.1 so the 3.2.2 release (currently available as RC1 (it's the intelarm64 one)) will provide it as well.

See, see, this is the breath of my ignorance!!! I wasn't aware that M1 is aarch64. I've heard of aarch64, but wasn't aware that M1 was an aarch64.

Thanks PascalDragon for another very good lesson on the craziness of nomenclatures.

So the only thing left to clarify would be: Is the version DonAlfredo calls aarch64-linux the one for the M1? If so, why not aarch64-darwin?

Cheers,
Gus

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1869
Re: Feedback and Thank you . . . .
« Reply #10 on: March 25, 2021, 10:42:58 am »
There is an aarch64-darwin: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2g/fpcupdeluxe-aarch64-darwin-cocoa.zip
However, its old. To get a working aarch64 Darwin binary, it has to be codesigned. The version above was codesigned by a helpful forum-member. Later, he gave me all tools to codesign myself. But I still have to look into this. I have no Mac, other than a 10.15 VM on Windows.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1342
  • Professional amateur ;-P
Re: Feedback and Thank you . . . .
« Reply #11 on: March 25, 2021, 12:00:12 pm »
Hey DonAlfredo,

Thanks for the clarification!!

Hope you can get those tools up and running :D

Cheers,
Gus

 

TinyPortal © 2005-2018