Recent

Author Topic: Old chestnut: including a big block of raw text into a program  (Read 12845 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 3250
Re: Old chestnut: including a big block of raw text into a program
« Reply #30 on: August 01, 2021, 03:20:12 pm »
I habitually use Debian (mostly AMD64) and build both FPC and Lazarus from scratch. There is no windres on these systems, and Debian has no package of (some variant of) that name in their repositories.

IIRC it is part of cross win32 binutils. But as said better use trunk or 3.2.2 fpcres.

I confirm I've got fpcres, and note the comments about improvements... thanks.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 757
  • Professional amateur ;-P
Re: Old chestnut: including a big block of raw text into a program
« Reply #31 on: August 01, 2021, 10:04:24 pm »
Hey PascalDragon,

In the example I provided, my code is the logic equivalentl to yours.
There are the obvious differences:
I opted for a GUI and you opted for a CLI and the rest of the differences is to adapt to the necessary units for each case.

The only other diff is that I used the Resource section on the Project Options(CTRL+SHIFT+F11) and in your case one needs to manually compile the linkable objects from the *.rc files.

You then mention the necessary binaries to do so: windres, GoRC or fpcres.

I then had a look into my fpc/bin/x86_64-linux folder on all 3 of my installs: trunk(49634), stable(r49371) and even 3.2.0 and all tree have fpcres.

So my question is: In the background, on my Ubuntu 21.04 64b, fpcupdeluxe installed Lazarus, what is it using to compile the resources that I added on the Project Options', Resources section?

I now ask this cuz, if you read my previous post with the example, I mention that I'm ignorant of the process that occurs in the background, performed by Lazarus and I'm now curious.

Cheer,
Gus
Lazarus 2.3.0(trunk) FPC 3.3.1(trunk) Ubuntu 21.04 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.2(stable) Ubuntu 21.04 64b Dark Theme
http://github.com/gcarreno

PascalDragon

  • Hero Member
  • *****
  • Posts: 3403
  • Compiler Developer
Re: Old chestnut: including a big block of raw text into a program
« Reply #32 on: August 02, 2021, 09:30:56 am »
The only other diff is that I used the Resource section on the Project Options(CTRL+SHIFT+F11) and in your case one needs to manually compile the linkable objects from the *.rc files.

Please note that the compiler will automatically invoke the resource compiler if the x.res is missing, but a x.rc exists (by default calling windres or gorc and with FPC trunk fpcres if started with -FF (an option that will become default soon)).

So my question is: In the background, on my Ubuntu 21.04 64b, fpcupdeluxe installed Lazarus, what is it using to compile the resources that I added on the Project Options', Resources section?

I now ask this cuz, if you read my previous post with the example, I mention that I'm ignorant of the process that occurs in the background, performed by Lazarus and I'm now curious.

I don't know what Lazarus does exactly only that does indeed prepare the resource file for the project from the settings (resources themselves can be per-unit, e.g. the {$R *.lfm} are handled as such), but in the end it will either use windres/gorc (because up to now fpcres did not support compilation of rc-files) or it will use the code of the fcl-res package (which is also the base for fpcres) and manually create the res-file.

BeniBela

  • Hero Member
  • *****
  • Posts: 817
    • homepage
Re: Old chestnut: including a big block of raw text into a program
« Reply #33 on: August 02, 2021, 11:13:47 am »
I habitually use Debian (mostly AMD64) and build both FPC and Lazarus from scratch. There is no windres on these systems, and Debian has no package of (some variant of) that name in their repositories.


binutils-mingw-w64-i686 has i686-w64-mingw32-windres

MarkMLl

  • Hero Member
  • *****
  • Posts: 3250
Re: Old chestnut: including a big block of raw text into a program
« Reply #34 on: August 02, 2021, 12:20:37 pm »
I habitually use Debian (mostly AMD64) and build both FPC and Lazarus from scratch. There is no windres on these systems, and Debian has no package of (some variant of) that name in their repositories.


binutils-mingw-w64-i686 has i686-w64-mingw32-windres

I know. But noting a core developer's "you need to make sure that your buildchain is set up correctly (just like you need to make sure that as and ld are available)" I'd suggest that this is the first time that I've seen a suggestion that the standard buildchain on Linux should be considered to include Ming.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018