Recent

Author Topic: Automatic generation of .res  (Read 2321 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Automatic generation of .res
« on: June 30, 2021, 11:09:03 am »
Running on Debian Linux x86_64 with Lazarus trunk... I deleted non-essential files before creating a local svn repo but then found that I had to create the project's .res file using lazres manually.

Should the .res file be rebuilt reliably by the IDE, or should it be considered an essential file like the .lfm files from which it's derived?

Are there any other ambiguous files, e.g. ico?

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

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Automatic generation of .res
« Reply #1 on: June 30, 2021, 11:35:37 am »
Afaik, you either need windres, or you need a self build fpcres from trunk and pass special flags to it.

So, res files are currently part of pre-build files.

Also, sources in the IDE are set up, so they do not trigger a rebuild, but require the prebuild res.
To have them build from the rc file, find any {$R name.res}  and replace it by {$R name.rc}

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Automatic generation of .res
« Reply #2 on: June 30, 2021, 12:31:25 pm »
Thanks for that Martin. lazres worked in the current case, but I interpret what you're saying as that the .res is best stored in the repo.

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

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Automatic generation of .res
« Reply #3 on: June 30, 2021, 12:41:00 pm »
Afaik the fpcres changes are in 3.2.2, the compiler just doesn't use it that way yet. The merge to 3.2.2 was deliberate so that we don't have to add windres/gorc to the next major release just for bootstrapping purposes. (since 3.2.2 already has a capable fpcres)

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Automatic generation of .res
« Reply #4 on: June 30, 2021, 01:55:20 pm »
Afaik, you either need windres, or you need a self build fpcres from trunk and pass special flags to it.

As marcov said, fpcres from FPC 3.2.2 already supports that as well. A special flag is only required if you want the compiler to use fpcres instead of windres or gorc (though you do need to specify the correct input format as an rc-file is kinda a "catch all")

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Automatic generation of .res
« Reply #5 on: June 30, 2021, 06:49:24 pm »
Thanks everybody. As I've said elsewhere, I'm currently backing away from Trunk with my hands in sight so some of this stuff won't affect me for a while.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & 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